diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 0519ecb..0000000 --- a/.dockerignore +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 013fc67..0000000 --- a/Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -# Development -FROM node:18-alpine AS development -WORKDIR /app -COPY package*.json ./ -RUN npm install -COPY . . -EXPOSE 3001 -CMD ["npm", "run", "dev"] - -# Production Build -FROM node:18-alpine AS build -WORKDIR /app - -# Install backend dependencies and build -COPY backend/package*.json ./backend/ -RUN cd backend && npm ci --only=production - -# Install frontend dependencies and build -COPY frontend/package*.json ./frontend/ -RUN cd frontend && npm ci -COPY frontend/ ./frontend/ -RUN cd frontend && npm run build - -# Copy backend source and build -COPY backend/ ./backend/ -RUN cd backend && npm run build - -# Production -FROM node:18-alpine AS production -WORKDIR /app - -# Copy built backend -COPY --from=build /app/backend/dist ./backend/dist -COPY --from=build /app/backend/package*.json ./backend/ -COPY --from=build /app/backend/node_modules ./backend/node_modules -COPY --from=build /app/backend/prisma ./backend/prisma - -# Copy built frontend -COPY --from=build /app/frontend/dist ./frontend/dist - -EXPOSE 3001 -CMD ["node", "backend/dist/index.js"] diff --git a/PROJECT_GUIDE.md b/PROJECT_GUIDE.md new file mode 100644 index 0000000..c900cdd --- /dev/null +++ b/PROJECT_GUIDE.md @@ -0,0 +1,343 @@ +# InfoServices Tripura — Project Guide + +A unified government services portal for the citizens of Tripura. This application allows administrators to manage government services (schemes, certificates, contact directories) and citizens to browse, search and access them without authentication. + +--- + +## Table of Contents + +1. [Tech Stack](#tech-stack) +2. [Prerequisites](#prerequisites) +3. [Quick Start](#quick-start) +4. [Environment Variables](#environment-variables) +5. [Database Setup](#database-setup) +6. [Running the Application](#running-the-application) +7. [Default Credentials](#default-credentials) +8. [User Roles & Permissions](#user-roles--permissions) +9. [Project Structure](#project-structure) +10. [API Endpoints](#api-endpoints) +11. [Admin Features](#admin-features) +12. [Public Features](#public-features) +13. [Troubleshooting](#troubleshooting) + +--- + +## Tech Stack + +| Layer | Technology | +| ---------- | --------------------------------------------- | +| Frontend | React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui | +| Backend | Node.js, Express, TypeScript | +| Database | PostgreSQL (Neon serverless) | +| ORM | Prisma 6 | +| Auth | JWT (access + refresh tokens), bcrypt | +| Validation | express-validator | +| Security | helmet, cors, express-rate-limit, cookie-parser | + +--- + +## Prerequisites + +- **Node.js** ≥ 18 +- **npm** ≥ 9 +- **PostgreSQL** database (local or hosted — Neon, Supabase, etc.) + +--- + +## Quick Start + +```bash +# 1. Clone the repo +git clone +cd Information-Service-part2 + +# 2. Install dependencies +cd backend && npm install +cd ../frontend && npm install +cd .. + +# 3. Configure environment +cp backend/.env.example backend/.env # Edit with your DB URL and JWT secret + +# 4. Set up database +cd backend +npx prisma migrate deploy +npx prisma generate +npx tsx prisma/seed.ts + +# 5. Start both servers +# Terminal 1 — Backend +cd backend && npm run dev # Runs on http://localhost:3001 + +# Terminal 2 — Frontend +cd frontend && npm run dev # Runs on http://localhost:5173 +``` + +--- + +## Environment Variables + +Create `backend/.env` with the following: + +```env +# Database +DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE?sslmode=require" + +# JWT Secret — generate with: node -e "console.log(require('crypto').randomBytes(64).toString('hex'))" +JWT_SECRET="your-long-random-secret" + +# Server +PORT=3001 +NODE_ENV=development +FRONTEND_URL="http://localhost:5173" + +# Optional: Override default SuperAdmin credentials during seeding +SUPER_ADMIN_EMAIL="admin@govservices.in" +SUPER_ADMIN_PASSWORD="Admin@123456" +SUPER_ADMIN_NAME="Super Admin" +``` + +--- + +## Database Setup + +### Apply migrations + +```bash +cd backend +npx prisma migrate deploy +``` + +### Generate Prisma client + +```bash +npx prisma generate +``` + +### Seed default data + +Seeds 10 departments + 1 SuperAdmin account: + +```bash +npx tsx prisma/seed.ts +``` + +### Reset database (destructive) + +```bash +npx prisma migrate reset --force +``` + +--- + +## Running the Application + +### Development + +```bash +# Backend (Terminal 1) +cd backend +npm run dev # tsx watch index.ts — hot reload on port 3001 + +# Frontend (Terminal 2) +cd frontend +npm run dev # Vite dev server on port 5173 +``` + +### Production build + +```bash +# Frontend +cd frontend +npm run build # Outputs to frontend/dist/ + +# Backend +cd backend +npm run build # Compiles to backend/dist/ +npm start # Runs compiled JS +``` + +--- + +## Default Credentials + +### SuperAdmin (full access) + +| Field | Value | +| -------- | ---------------------- | +| Email | `admin@govservices.in` | +| Password | `Admin@123456` | +| Role | `super_admin` | + +> **Important:** Change the default password immediately after first login in a production environment. You can also override these during seeding via environment variables. + +### Creating department admins + +1. Log in as SuperAdmin +2. Navigate to **Admin Management** in the sidebar (under "Management" section) +3. Click **Add Admin** to create a new department admin +4. Assign them to a specific department + +--- + +## User Roles & Permissions + +| Role | Can do | +| ----------------- | --------------------------------------------------------------------------------------------- | +| **super_admin** | Everything — manage departments, admins, audit logs, all services across all departments | +| **department_admin** | Manage services (schemes, certificates, contacts) within their assigned department only | +| **Public user** | Browse all published services, file grievances, submit feedback (no login required) | + +--- + +## Project Structure + +``` +Information-Service-part2/ +├── backend/ +│ ├── index.ts # Express entry point +│ ├── lib/ +│ │ ├── prisma.ts # Prisma singleton +│ │ └── auditLog.ts # Audit logging utility +│ ├── middleware/ +│ │ ├── auth.ts # JWT auth & RBAC guards +│ │ ├── rateLimiter.ts # Rate limiting configs +│ │ └── errorHandler.ts # Global error handler +│ ├── routes/ +│ │ ├── adminAuth.ts # Login, register, refresh, sessions +│ │ ├── adminManagement.ts # Admin CRUD (SuperAdmin only) +│ │ ├── departments.ts # Department CRUD +│ │ ├── auditLogs.ts # Audit log viewer +│ │ ├── schemeService.ts # Scheme CRUD + public endpoints +│ │ ├── certificateService.ts +│ │ ├── contactService.ts +│ │ ├── officeManagement.ts +│ │ ├── feedback.ts +│ │ ├── grievance.ts +│ │ └── notifications.ts +│ └── prisma/ +│ ├── schema.prisma # Database schema +│ ├── seed.ts # Seed script +│ └── migrations/ # Migration history +├── frontend/ +│ ├── src/ +│ │ ├── App.tsx # Routes & auth guards +│ │ ├── contexts/AuthContext.tsx +│ │ ├── types/api.ts # API client class +│ │ ├── pages/ # All page components +│ │ └── components/ui/ # shadcn/ui + AdminSidebar +│ └── vite.config.ts +└── PROJECT_GUIDE.md # This file +``` + +--- + +## API Endpoints + +### Public (no authentication) + +| Method | Endpoint | Description | +| ------ | --------------------------------------- | ------------------------------ | +| GET | `/api/scheme-services/public/list` | List published schemes | +| GET | `/api/scheme-services/public/:id` | Single scheme details | +| GET | `/api/certificate-services/public/list` | List published certificates | +| GET | `/api/certificate-services/public/:id` | Single certificate details | +| GET | `/api/contact-services/public/list` | List published contacts | +| GET | `/api/offices/public/by-name/:name` | Office lookup by name | +| GET | `/api/offices/public/:id/posts` | Office posts | +| POST | `/api/grievances` | Submit a grievance | +| POST | `/api/feedbacks` | Submit feedback | +| GET | `/api/health` | Health check | + +### Authentication + +| Method | Endpoint | Description | +| ------ | ------------------------- | -------------------- | +| POST | `/api/auth/login` | Admin login | +| POST | `/api/auth/refresh` | Refresh access token | +| POST | `/api/auth/logout` | Logout (clear token) | +| POST | `/api/auth/register` | Register admin (SuperAdmin only) | + +### Admin (requires JWT) + +| Method | Endpoint | Description | +| ------ | --------------------------------- | --------------------------------- | +| GET | `/api/scheme-services` | List admin's schemes | +| POST | `/api/scheme-services/create` | Create scheme | +| PUT | `/api/scheme-services/:id` | Update scheme | +| DELETE | `/api/scheme-services/:id` | Delete scheme | +| PATCH | `/api/scheme-services/:id/publish`| Publish scheme | +| GET | `/api/certificate-services` | List admin's certificates | +| GET | `/api/contact-services` | List admin's contacts | +| GET | `/api/departments` | List departments | +| POST | `/api/departments` | Create department (SuperAdmin) | +| GET | `/api/admin/admins` | List admins (SuperAdmin) | +| GET | `/api/audit-logs` | View audit logs (SuperAdmin) | + +--- + +## Admin Features + +- **Dashboard** — Overview of services, recent activity +- **Scheme Management** — Create, edit, publish, unpublish, delete government schemes +- **Certificate Management** — Manage certificate services with documents, steps, eligibility items +- **Contact Management** — Manage government office contacts and directories +- **Grievance Management** — View and respond to citizen grievances +- **Feedback Management** — View citizen feedback and ratings +- **Department Management** — Create and manage departments (SuperAdmin) +- **Admin Management** — Add, edit, deactivate admin accounts (SuperAdmin) +- **Audit Logs** — View all admin actions with filtering (SuperAdmin) +- **Profile** — View and update admin profile + +--- + +## Public Features + +All public features are available **without login**: + +- **Service Browser** — Search and filter through all published government services +- **Scheme Details** — View full scheme info including eligibility, documents, application mode +- **Certificate Details** — Step-by-step guide with document requirements +- **Contact Directory** — Find government offices with phone, email, and address +- **Grievance Filing** — Submit complaints about government services +- **Feedback** — Rate and review services +- **Emergency Services** — Access emergency contacts and helplines + +--- + +## Troubleshooting + +### "Prisma query" logs appearing in terminal + +The Prisma client is configured to only log errors. If you see query logs, delete `node_modules/.prisma` and restart: + +```bash +cd backend +rm -rf node_modules/.prisma +npx prisma generate +npm run dev +``` + +### Frontend shows 404 for user service pages + +Make sure the frontend routes in `App.tsx` match the sidebar links in `sidebar.tsx`. The correct user-facing routes are: + +- `/scheme-service` +- `/certificate-service` +- `/contact-service` +- `/grievances-service` +- `/feedback-service` + +### API returns 401 on public endpoints + +Public endpoints use the `/public/list` and `/public/:id` paths. If you're hitting the root endpoints (e.g., `/api/scheme-services`), those require admin authentication. + +### Database connection errors + +1. Check `DATABASE_URL` in `backend/.env` +2. Ensure the database is accessible from your network +3. Run `npx prisma db pull` to verify connectivity + +### TypeScript errors in VS Code but build succeeds + +Restart the TypeScript server: **Ctrl+Shift+P** → "TypeScript: Restart TS Server" diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 0000000..2303b72 --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,23 @@ +# Database +DATABASE_URL="postgresql://user:password@localhost:5432/govservices?schema=public" + +# JWT Secret — REQUIRED in production (use a strong random string, min 64 chars) +JWT_SECRET="change-this-to-a-cryptographically-secure-random-string-in-production" + +# Server +PORT=3001 +NODE_ENV=development + +# Frontend URL (for CORS) +FRONTEND_URL=http://localhost:5173 + +# SuperAdmin Seed Credentials +SUPER_ADMIN_EMAIL=admin@govservices.in +SUPER_ADMIN_PASSWORD=Admin@123456 +SUPER_ADMIN_NAME=Super Admin + +# Oracle OCI Object Storage — Pre-Authenticated Request (PAR) URL +# Create a PAR with read+write access on your OCI bucket. +# The URL should end with /o/ e.g.: +# https://objectstorage..oraclecloud.com/p//n//b//o/ +OCI_PAR_URL= diff --git a/backend/generated/prisma/client.d.ts b/backend/generated/prisma/client.d.ts deleted file mode 100644 index bc20c6c..0000000 --- a/backend/generated/prisma/client.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./index" \ No newline at end of file diff --git a/backend/generated/prisma/client.js b/backend/generated/prisma/client.js deleted file mode 100644 index 72afab7..0000000 --- a/backend/generated/prisma/client.js +++ /dev/null @@ -1,4 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -module.exports = { ...require('.') } \ No newline at end of file diff --git a/backend/generated/prisma/default.d.ts b/backend/generated/prisma/default.d.ts deleted file mode 100644 index bc20c6c..0000000 --- a/backend/generated/prisma/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./index" \ No newline at end of file diff --git a/backend/generated/prisma/default.js b/backend/generated/prisma/default.js deleted file mode 100644 index 72afab7..0000000 --- a/backend/generated/prisma/default.js +++ /dev/null @@ -1,4 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -module.exports = { ...require('.') } \ No newline at end of file diff --git a/backend/generated/prisma/edge.d.ts b/backend/generated/prisma/edge.d.ts deleted file mode 100644 index 274b8fa..0000000 --- a/backend/generated/prisma/edge.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./default" \ No newline at end of file diff --git a/backend/generated/prisma/edge.js b/backend/generated/prisma/edge.js deleted file mode 100644 index f485ee4..0000000 --- a/backend/generated/prisma/edge.js +++ /dev/null @@ -1,439 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - getPrismaClient, - sqltag, - empty, - join, - raw, - skip, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime, - createParam, -} = require('./runtime/edge.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.13.0 - * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd - */ -Prisma.prismaVersion = { - client: "6.13.0", - engine: "361e86d0ea4987e9f53a565309b3eed797a6bcbd" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = Extensions.getExtensionContext -Prisma.defineExtension = Extensions.defineExtension - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - - - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.AdminScalarFieldEnum = { - id: 'id', - email: 'email', - password: 'password', - name: 'name', - role: 'role', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SchemeServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - schemeDetails: 'schemeDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.ContactPersonScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - schemeServiceId: 'schemeServiceId' -}; - -exports.Prisma.SupportiveDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - schemeServiceId: 'schemeServiceId' -}; - -exports.Prisma.CertificateServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - certificateDetails: 'certificateDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.CertificateContactScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateProcessStepScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - stepDetails: 'stepDetails', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateEligibilityScalarFieldEnum = { - id: 'id', - eligibilityDetail: 'eligibilityDetail', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.ContactServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - contactDetails: 'contactDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.ContactServiceContactScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - contactServiceId: 'contactServiceId' -}; - -exports.Prisma.ContactServiceDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - contactServiceId: 'contactServiceId' -}; - -exports.Prisma.PostScalarFieldEnum = { - id: 'id', - postName: 'postName', - rank: 'rank', - description: 'description', - department: 'department', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - officeId: 'officeId' -}; - -exports.Prisma.EmployeeScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - designation: 'designation', - employeeId: 'employeeId', - joiningDate: 'joiningDate', - salary: 'salary', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - postId: 'postId' -}; - -exports.Prisma.FeedbackScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - subject: 'subject', - message: 'message', - rating: 'rating', - category: 'category', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - resolvedAt: 'resolvedAt', - resolvedBy: 'resolvedBy', - adminNotes: 'adminNotes' -}; - -exports.Prisma.GrievanceScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - address: 'address', - subject: 'subject', - description: 'description', - category: 'category', - priority: 'priority', - status: 'status', - attachments: 'attachments', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - assignedTo: 'assignedTo', - adminNotes: 'adminNotes', - resolvedAt: 'resolvedAt', - trackingId: 'trackingId' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - Admin: 'Admin', - SchemeService: 'SchemeService', - ContactPerson: 'ContactPerson', - SupportiveDocument: 'SupportiveDocument', - CertificateService: 'CertificateService', - CertificateContact: 'CertificateContact', - CertificateDocument: 'CertificateDocument', - CertificateProcessStep: 'CertificateProcessStep', - CertificateEligibility: 'CertificateEligibility', - ContactService: 'ContactService', - ContactServiceContact: 'ContactServiceContact', - ContactServiceDocument: 'ContactServiceDocument', - Post: 'Post', - Employee: 'Employee', - Feedback: 'Feedback', - Grievance: 'Grievance' -}; -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "C:\\Users\\udaid\\OneDrive\\Desktop\\information services full\\backend\\generated\\prisma", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "windows", - "native": true - } - ], - "previewFeatures": [], - "sourceFilePath": "C:\\Users\\udaid\\OneDrive\\Desktop\\information services full\\backend\\prisma\\schema.prisma", - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": "../../.env", - "schemaEnvPath": "../../.env" - }, - "relativePath": "../../prisma", - "clientVersion": "6.13.0", - "engineVersion": "361e86d0ea4987e9f53a565309b3eed797a6bcbd", - "datasourceNames": [ - "db" - ], - "activeProvider": "postgresql", - "postinstall": false, - "inlineDatasources": { - "db": { - "url": { - "fromEnvVar": "DATABASE_URL", - "value": null - } - } - }, - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel Admin {\n id Int @id @default(autoincrement())\n email String @unique\n password String\n name String\n role String @default(\"admin\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n schemeServices SchemeService[]\n certificateServices CertificateService[]\n contactServices ContactService[]\n}\n\nmodel SchemeService {\n id Int @id @default(autoincrement())\n name String\n summary String\n type String?\n targetAudience String[]\n applicationMode String\n onlineUrl String?\n offlineAddress String?\n status String @default(\"draft\") // draft, pending, published\n isActive Boolean @default(true) // Admin dashboard control\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Admin relation\n adminId Int\n admin Admin @relation(fields: [adminId], references: [id])\n\n // Extended details\n eligibilityDetails String[]\n schemeDetails String[]\n processDetails String[]\n\n // Process flows\n processNew String?\n processUpdate String?\n processLost String?\n processSurrender String?\n\n // Document requirements\n docNew String?\n docUpdate String?\n docLost String?\n docSurrender String?\n\n // Related entities\n contacts ContactPerson[]\n documents SupportiveDocument[]\n}\n\nmodel ContactPerson {\n id Int @id @default(autoincrement())\n serviceName String\n district String\n subDistrict String\n block String\n name String\n designation String\n contact String\n email String\n\n schemeServiceId Int\n schemeService SchemeService @relation(fields: [schemeServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel SupportiveDocument {\n id Int @id @default(autoincrement())\n slNo Int\n documentType String\n validProof String\n isRequired Boolean @default(true)\n\n schemeServiceId Int\n schemeService SchemeService @relation(fields: [schemeServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel CertificateService {\n id Int @id @default(autoincrement())\n name String\n summary String\n type String?\n targetAudience String[]\n applicationMode String\n onlineUrl String?\n offlineAddress String?\n status String @default(\"draft\") // draft, pending, published\n isActive Boolean @default(true) // Admin dashboard control\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Admin relation\n adminId Int\n admin Admin @relation(fields: [adminId], references: [id])\n\n // Extended details\n eligibilityDetails String[]\n certificateDetails String[]\n processDetails String[]\n\n // Process flows\n processNew String?\n processUpdate String?\n processLost String?\n processSurrender String?\n\n // Document requirements\n docNew String?\n docUpdate String?\n docLost String?\n docSurrender String?\n\n // Related entities\n contacts CertificateContact[]\n documents CertificateDocument[]\n processSteps CertificateProcessStep[]\n eligibilityItems CertificateEligibility[]\n}\n\nmodel CertificateContact {\n id Int @id @default(autoincrement())\n serviceName String\n district String\n subDistrict String\n block String\n name String\n designation String\n contact String\n email String\n applicationType String @default(\"New Application\") // New Application, Lost Application, etc.\n\n certificateServiceId Int\n certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel CertificateDocument {\n id Int @id @default(autoincrement())\n slNo Int\n documentType String\n validProof String\n isRequired Boolean @default(true)\n applicationType String @default(\"New Application\") // New Application, Lost Application, etc.\n\n certificateServiceId Int\n certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel CertificateProcessStep {\n id Int @id @default(autoincrement())\n slNo Int\n stepDetails String\n applicationType String @default(\"New Application\") // New Application, Lost Application, etc.\n\n certificateServiceId Int\n certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel CertificateEligibility {\n id Int @id @default(autoincrement())\n eligibilityDetail String\n applicationType String @default(\"New Application\") // New Application, Lost Application, etc.\n\n certificateServiceId Int\n certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel ContactService {\n id Int @id @default(autoincrement())\n name String\n summary String\n type String?\n targetAudience String[]\n applicationMode String\n onlineUrl String?\n offlineAddress String?\n status String @default(\"draft\") // draft, pending, published\n isActive Boolean @default(true) // Admin dashboard control\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Admin relation\n adminId Int\n admin Admin @relation(fields: [adminId], references: [id])\n\n // Extended details\n eligibilityDetails String[]\n contactDetails String[]\n processDetails String[]\n\n // Process flows\n processNew String?\n processUpdate String?\n processLost String?\n processSurrender String?\n\n // Document requirements\n docNew String?\n docUpdate String?\n docLost String?\n docSurrender String?\n\n // Related entities\n contacts ContactServiceContact[]\n documents ContactServiceDocument[]\n}\n\nmodel ContactServiceContact {\n id Int @id @default(autoincrement())\n serviceName String\n district String\n subDistrict String\n block String\n name String\n designation String\n contact String\n email String\n\n contactServiceId Int\n contactService ContactService @relation(fields: [contactServiceId], references: [id], onDelete: Cascade)\n\n // Related entities for office management\n posts Post[]\n}\n\nmodel ContactServiceDocument {\n id Int @id @default(autoincrement())\n slNo Int\n documentType String\n validProof String\n isRequired Boolean @default(true)\n\n contactServiceId Int\n contactService ContactService @relation(fields: [contactServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel Post {\n id Int @id @default(autoincrement())\n postName String // Changed from 'title' to match frontend\n rank String // Changed from 'level' to match frontend\n description String?\n department String?\n status String @default(\"active\") // active, inactive\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Office relation\n officeId Int\n office ContactServiceContact @relation(fields: [officeId], references: [id], onDelete: Cascade)\n\n // Related entities\n employees Employee[]\n}\n\nmodel Employee {\n id Int @id @default(autoincrement())\n name String\n email String\n phone String\n designation String\n employeeId String? // Employee ID/Number (optional)\n joiningDate DateTime?\n salary Float?\n status String @default(\"active\") // active, inactive, on_leave\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Post relation\n postId Int\n post Post @relation(fields: [postId], references: [id], onDelete: Cascade)\n}\n\nmodel Feedback {\n id Int @id @default(autoincrement())\n name String\n email String\n phone String?\n subject String\n message String\n rating Int? // 1-5 star rating (optional)\n category String? // General, Service, Technical, etc.\n status String @default(\"new\") // new, resolved\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n resolvedAt DateTime?\n resolvedBy String? // Admin name who resolved it\n adminNotes String? // Internal notes by admin\n}\n\nmodel Grievance {\n id Int @id @default(autoincrement())\n name String\n email String\n phone String\n address String\n subject String\n description String\n category String? // Service Related, Technical, Policy, etc.\n priority String @default(\"medium\") // low, medium, high, urgent\n status String @default(\"new\") // new, pending, solved\n attachments String[] // File paths or URLs\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Admin tracking\n assignedTo String? // Admin name who is handling\n adminNotes String? // Internal notes by admin\n resolvedAt DateTime?\n\n // Tracking information\n trackingId String @unique // Unique tracking ID for users\n}\n", - "inlineSchemaHash": "2bbf99ea6dc974f756459e9f00002138d9a33e0eea289986377d51c9b6049dce", - "copyEngine": true -} -config.dirname = '/' - -config.runtimeDataModel = JSON.parse("{\"models\":{\"Admin\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"admin\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"schemeServices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SchemeService\",\"nativeType\":null,\"relationName\":\"AdminToSchemeService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateServices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateService\",\"nativeType\":null,\"relationName\":\"AdminToCertificateService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactServices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactService\",\"nativeType\":null,\"relationName\":\"AdminToContactService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SchemeService\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"summary\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"targetAudience\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"onlineUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"offlineAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"draft\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"adminId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"admin\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Admin\",\"nativeType\":null,\"relationName\":\"AdminToSchemeService\",\"relationFromFields\":[\"adminId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eligibilityDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemeDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contacts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactPerson\",\"nativeType\":null,\"relationName\":\"ContactPersonToSchemeService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SupportiveDocument\",\"nativeType\":null,\"relationName\":\"SchemeServiceToSupportiveDocument\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ContactPerson\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serviceName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"district\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subDistrict\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"block\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contact\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemeServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemeService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SchemeService\",\"nativeType\":null,\"relationName\":\"ContactPersonToSchemeService\",\"relationFromFields\":[\"schemeServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SupportiveDocument\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slNo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documentType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"validProof\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isRequired\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemeServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemeService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SchemeService\",\"nativeType\":null,\"relationName\":\"SchemeServiceToSupportiveDocument\",\"relationFromFields\":[\"schemeServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CertificateService\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"summary\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"targetAudience\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"onlineUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"offlineAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"draft\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"adminId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"admin\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Admin\",\"nativeType\":null,\"relationName\":\"AdminToCertificateService\",\"relationFromFields\":[\"adminId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eligibilityDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contacts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateContact\",\"nativeType\":null,\"relationName\":\"CertificateContactToCertificateService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateDocument\",\"nativeType\":null,\"relationName\":\"CertificateDocumentToCertificateService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processSteps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateProcessStep\",\"nativeType\":null,\"relationName\":\"CertificateProcessStepToCertificateService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eligibilityItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateEligibility\",\"nativeType\":null,\"relationName\":\"CertificateEligibilityToCertificateService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CertificateContact\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serviceName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"district\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subDistrict\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"block\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contact\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"New Application\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateService\",\"nativeType\":null,\"relationName\":\"CertificateContactToCertificateService\",\"relationFromFields\":[\"certificateServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CertificateDocument\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slNo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documentType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"validProof\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isRequired\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"New Application\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateService\",\"nativeType\":null,\"relationName\":\"CertificateDocumentToCertificateService\",\"relationFromFields\":[\"certificateServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CertificateProcessStep\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slNo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stepDetails\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"New Application\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateService\",\"nativeType\":null,\"relationName\":\"CertificateProcessStepToCertificateService\",\"relationFromFields\":[\"certificateServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CertificateEligibility\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eligibilityDetail\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"New Application\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateService\",\"nativeType\":null,\"relationName\":\"CertificateEligibilityToCertificateService\",\"relationFromFields\":[\"certificateServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ContactService\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"summary\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"targetAudience\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"onlineUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"offlineAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"draft\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"adminId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"admin\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Admin\",\"nativeType\":null,\"relationName\":\"AdminToContactService\",\"relationFromFields\":[\"adminId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eligibilityDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contacts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactServiceContact\",\"nativeType\":null,\"relationName\":\"ContactServiceToContactServiceContact\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactServiceDocument\",\"nativeType\":null,\"relationName\":\"ContactServiceToContactServiceDocument\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ContactServiceContact\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serviceName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"district\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subDistrict\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"block\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contact\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactService\",\"nativeType\":null,\"relationName\":\"ContactServiceToContactServiceContact\",\"relationFromFields\":[\"contactServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"posts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Post\",\"nativeType\":null,\"relationName\":\"ContactServiceContactToPost\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ContactServiceDocument\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slNo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documentType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"validProof\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isRequired\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactService\",\"nativeType\":null,\"relationName\":\"ContactServiceToContactServiceDocument\",\"relationFromFields\":[\"contactServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Post\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rank\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"department\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"active\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"officeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"office\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactServiceContact\",\"nativeType\":null,\"relationName\":\"ContactServiceContactToPost\",\"relationFromFields\":[\"officeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"employees\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Employee\",\"nativeType\":null,\"relationName\":\"EmployeeToPost\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Employee\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"employeeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"joiningDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"salary\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"active\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"postId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"post\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Post\",\"nativeType\":null,\"relationName\":\"EmployeeToPost\",\"relationFromFields\":[\"postId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Feedback\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subject\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rating\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"new\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"resolvedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resolvedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminNotes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Grievance\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subject\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"priority\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"medium\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"new\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attachments\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"assignedTo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminNotes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resolvedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trackingId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") -defineDmmfProperty(exports.Prisma, config.runtimeDataModel) -config.engineWasm = undefined -config.compilerWasm = undefined - -config.injectableEdgeEnv = () => ({ - parsed: { - DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined - } -}) - -if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { - Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) -} - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - diff --git a/backend/generated/prisma/index-browser.js b/backend/generated/prisma/index-browser.js deleted file mode 100644 index 8421acf..0000000 --- a/backend/generated/prisma/index-browser.js +++ /dev/null @@ -1,425 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum, - Public, - getRuntime, - skip -} = require('./runtime/index-browser.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.13.0 - * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd - */ -Prisma.prismaVersion = { - client: "6.13.0", - engine: "361e86d0ea4987e9f53a565309b3eed797a6bcbd" -} - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.AdminScalarFieldEnum = { - id: 'id', - email: 'email', - password: 'password', - name: 'name', - role: 'role', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SchemeServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - schemeDetails: 'schemeDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.ContactPersonScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - schemeServiceId: 'schemeServiceId' -}; - -exports.Prisma.SupportiveDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - schemeServiceId: 'schemeServiceId' -}; - -exports.Prisma.CertificateServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - certificateDetails: 'certificateDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.CertificateContactScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateProcessStepScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - stepDetails: 'stepDetails', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateEligibilityScalarFieldEnum = { - id: 'id', - eligibilityDetail: 'eligibilityDetail', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.ContactServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - contactDetails: 'contactDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.ContactServiceContactScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - contactServiceId: 'contactServiceId' -}; - -exports.Prisma.ContactServiceDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - contactServiceId: 'contactServiceId' -}; - -exports.Prisma.PostScalarFieldEnum = { - id: 'id', - postName: 'postName', - rank: 'rank', - description: 'description', - department: 'department', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - officeId: 'officeId' -}; - -exports.Prisma.EmployeeScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - designation: 'designation', - employeeId: 'employeeId', - joiningDate: 'joiningDate', - salary: 'salary', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - postId: 'postId' -}; - -exports.Prisma.FeedbackScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - subject: 'subject', - message: 'message', - rating: 'rating', - category: 'category', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - resolvedAt: 'resolvedAt', - resolvedBy: 'resolvedBy', - adminNotes: 'adminNotes' -}; - -exports.Prisma.GrievanceScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - address: 'address', - subject: 'subject', - description: 'description', - category: 'category', - priority: 'priority', - status: 'status', - attachments: 'attachments', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - assignedTo: 'assignedTo', - adminNotes: 'adminNotes', - resolvedAt: 'resolvedAt', - trackingId: 'trackingId' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - Admin: 'Admin', - SchemeService: 'SchemeService', - ContactPerson: 'ContactPerson', - SupportiveDocument: 'SupportiveDocument', - CertificateService: 'CertificateService', - CertificateContact: 'CertificateContact', - CertificateDocument: 'CertificateDocument', - CertificateProcessStep: 'CertificateProcessStep', - CertificateEligibility: 'CertificateEligibility', - ContactService: 'ContactService', - ContactServiceContact: 'ContactServiceContact', - ContactServiceDocument: 'ContactServiceDocument', - Post: 'Post', - Employee: 'Employee', - Feedback: 'Feedback', - Grievance: 'Grievance' -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message - const runtime = getRuntime() - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` - - throw new Error(message) - } - }) - } -} - -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma) diff --git a/backend/generated/prisma/index.d.ts b/backend/generated/prisma/index.d.ts deleted file mode 100644 index dbeda3f..0000000 --- a/backend/generated/prisma/index.d.ts +++ /dev/null @@ -1,30561 +0,0 @@ - -/** - * Client -**/ - -import * as runtime from './runtime/library.js'; -import $Types = runtime.Types // general types -import $Public = runtime.Types.Public -import $Utils = runtime.Types.Utils -import $Extensions = runtime.Types.Extensions -import $Result = runtime.Types.Result - -export type PrismaPromise = $Public.PrismaPromise - - -/** - * Model Admin - * - */ -export type Admin = $Result.DefaultSelection -/** - * Model SchemeService - * - */ -export type SchemeService = $Result.DefaultSelection -/** - * Model ContactPerson - * - */ -export type ContactPerson = $Result.DefaultSelection -/** - * Model SupportiveDocument - * - */ -export type SupportiveDocument = $Result.DefaultSelection -/** - * Model CertificateService - * - */ -export type CertificateService = $Result.DefaultSelection -/** - * Model CertificateContact - * - */ -export type CertificateContact = $Result.DefaultSelection -/** - * Model CertificateDocument - * - */ -export type CertificateDocument = $Result.DefaultSelection -/** - * Model CertificateProcessStep - * - */ -export type CertificateProcessStep = $Result.DefaultSelection -/** - * Model CertificateEligibility - * - */ -export type CertificateEligibility = $Result.DefaultSelection -/** - * Model ContactService - * - */ -export type ContactService = $Result.DefaultSelection -/** - * Model ContactServiceContact - * - */ -export type ContactServiceContact = $Result.DefaultSelection -/** - * Model ContactServiceDocument - * - */ -export type ContactServiceDocument = $Result.DefaultSelection -/** - * Model Post - * - */ -export type Post = $Result.DefaultSelection -/** - * Model Employee - * - */ -export type Employee = $Result.DefaultSelection -/** - * Model Feedback - * - */ -export type Feedback = $Result.DefaultSelection -/** - * Model Grievance - * - */ -export type Grievance = $Result.DefaultSelection - -/** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Admins - * const admins = await prisma.admin.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ -export class PrismaClient< - ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, - const U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs -> { - [K: symbol]: { types: Prisma.TypeMap['other'] } - - /** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Admins - * const admins = await prisma.admin.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ - - constructor(optionsArg ?: Prisma.Subset); - $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; - - /** - * Connect with the database - */ - $connect(): $Utils.JsPromise; - - /** - * Disconnect from the database - */ - $disconnect(): $Utils.JsPromise; - - /** - * Add a middleware - * @deprecated since 4.16.0. For new code, prefer client extensions instead. - * @see https://pris.ly/d/extensions - */ - $use(cb: Prisma.Middleware): void - -/** - * Executes a prepared raw query and returns the number of affected rows. - * @example - * ``` - * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Executes a raw query and returns the number of affected rows. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a prepared raw query and returns the `SELECT` data. - * @example - * ``` - * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a raw query and returns the `SELECT` data. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - - /** - * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. - * @example - * ``` - * const [george, bob, alice] = await prisma.$transaction([ - * prisma.user.create({ data: { name: 'George' } }), - * prisma.user.create({ data: { name: 'Bob' } }), - * prisma.user.create({ data: { name: 'Alice' } }), - * ]) - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). - */ - $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> - - $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise - - - $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, $Utils.Call, { - extArgs: ExtArgs - }>> - - /** - * `prisma.admin`: Exposes CRUD operations for the **Admin** model. - * Example usage: - * ```ts - * // Fetch zero or more Admins - * const admins = await prisma.admin.findMany() - * ``` - */ - get admin(): Prisma.AdminDelegate; - - /** - * `prisma.schemeService`: Exposes CRUD operations for the **SchemeService** model. - * Example usage: - * ```ts - * // Fetch zero or more SchemeServices - * const schemeServices = await prisma.schemeService.findMany() - * ``` - */ - get schemeService(): Prisma.SchemeServiceDelegate; - - /** - * `prisma.contactPerson`: Exposes CRUD operations for the **ContactPerson** model. - * Example usage: - * ```ts - * // Fetch zero or more ContactPeople - * const contactPeople = await prisma.contactPerson.findMany() - * ``` - */ - get contactPerson(): Prisma.ContactPersonDelegate; - - /** - * `prisma.supportiveDocument`: Exposes CRUD operations for the **SupportiveDocument** model. - * Example usage: - * ```ts - * // Fetch zero or more SupportiveDocuments - * const supportiveDocuments = await prisma.supportiveDocument.findMany() - * ``` - */ - get supportiveDocument(): Prisma.SupportiveDocumentDelegate; - - /** - * `prisma.certificateService`: Exposes CRUD operations for the **CertificateService** model. - * Example usage: - * ```ts - * // Fetch zero or more CertificateServices - * const certificateServices = await prisma.certificateService.findMany() - * ``` - */ - get certificateService(): Prisma.CertificateServiceDelegate; - - /** - * `prisma.certificateContact`: Exposes CRUD operations for the **CertificateContact** model. - * Example usage: - * ```ts - * // Fetch zero or more CertificateContacts - * const certificateContacts = await prisma.certificateContact.findMany() - * ``` - */ - get certificateContact(): Prisma.CertificateContactDelegate; - - /** - * `prisma.certificateDocument`: Exposes CRUD operations for the **CertificateDocument** model. - * Example usage: - * ```ts - * // Fetch zero or more CertificateDocuments - * const certificateDocuments = await prisma.certificateDocument.findMany() - * ``` - */ - get certificateDocument(): Prisma.CertificateDocumentDelegate; - - /** - * `prisma.certificateProcessStep`: Exposes CRUD operations for the **CertificateProcessStep** model. - * Example usage: - * ```ts - * // Fetch zero or more CertificateProcessSteps - * const certificateProcessSteps = await prisma.certificateProcessStep.findMany() - * ``` - */ - get certificateProcessStep(): Prisma.CertificateProcessStepDelegate; - - /** - * `prisma.certificateEligibility`: Exposes CRUD operations for the **CertificateEligibility** model. - * Example usage: - * ```ts - * // Fetch zero or more CertificateEligibilities - * const certificateEligibilities = await prisma.certificateEligibility.findMany() - * ``` - */ - get certificateEligibility(): Prisma.CertificateEligibilityDelegate; - - /** - * `prisma.contactService`: Exposes CRUD operations for the **ContactService** model. - * Example usage: - * ```ts - * // Fetch zero or more ContactServices - * const contactServices = await prisma.contactService.findMany() - * ``` - */ - get contactService(): Prisma.ContactServiceDelegate; - - /** - * `prisma.contactServiceContact`: Exposes CRUD operations for the **ContactServiceContact** model. - * Example usage: - * ```ts - * // Fetch zero or more ContactServiceContacts - * const contactServiceContacts = await prisma.contactServiceContact.findMany() - * ``` - */ - get contactServiceContact(): Prisma.ContactServiceContactDelegate; - - /** - * `prisma.contactServiceDocument`: Exposes CRUD operations for the **ContactServiceDocument** model. - * Example usage: - * ```ts - * // Fetch zero or more ContactServiceDocuments - * const contactServiceDocuments = await prisma.contactServiceDocument.findMany() - * ``` - */ - get contactServiceDocument(): Prisma.ContactServiceDocumentDelegate; - - /** - * `prisma.post`: Exposes CRUD operations for the **Post** model. - * Example usage: - * ```ts - * // Fetch zero or more Posts - * const posts = await prisma.post.findMany() - * ``` - */ - get post(): Prisma.PostDelegate; - - /** - * `prisma.employee`: Exposes CRUD operations for the **Employee** model. - * Example usage: - * ```ts - * // Fetch zero or more Employees - * const employees = await prisma.employee.findMany() - * ``` - */ - get employee(): Prisma.EmployeeDelegate; - - /** - * `prisma.feedback`: Exposes CRUD operations for the **Feedback** model. - * Example usage: - * ```ts - * // Fetch zero or more Feedbacks - * const feedbacks = await prisma.feedback.findMany() - * ``` - */ - get feedback(): Prisma.FeedbackDelegate; - - /** - * `prisma.grievance`: Exposes CRUD operations for the **Grievance** model. - * Example usage: - * ```ts - * // Fetch zero or more Grievances - * const grievances = await prisma.grievance.findMany() - * ``` - */ - get grievance(): Prisma.GrievanceDelegate; -} - -export namespace Prisma { - export import DMMF = runtime.DMMF - - export type PrismaPromise = $Public.PrismaPromise - - /** - * Validator - */ - export import validator = runtime.Public.validator - - /** - * Prisma Errors - */ - export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError - export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError - export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError - export import PrismaClientInitializationError = runtime.PrismaClientInitializationError - export import PrismaClientValidationError = runtime.PrismaClientValidationError - - /** - * Re-export of sql-template-tag - */ - export import sql = runtime.sqltag - export import empty = runtime.empty - export import join = runtime.join - export import raw = runtime.raw - export import Sql = runtime.Sql - - - - /** - * Decimal.js - */ - export import Decimal = runtime.Decimal - - export type DecimalJsLike = runtime.DecimalJsLike - - /** - * Metrics - */ - export type Metrics = runtime.Metrics - export type Metric = runtime.Metric - export type MetricHistogram = runtime.MetricHistogram - export type MetricHistogramBucket = runtime.MetricHistogramBucket - - /** - * Extensions - */ - export import Extension = $Extensions.UserArgs - export import getExtensionContext = runtime.Extensions.getExtensionContext - export import Args = $Public.Args - export import Payload = $Public.Payload - export import Result = $Public.Result - export import Exact = $Public.Exact - - /** - * Prisma Client JS version: 6.13.0 - * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd - */ - export type PrismaVersion = { - client: string - } - - export const prismaVersion: PrismaVersion - - /** - * Utility Types - */ - - - export import JsonObject = runtime.JsonObject - export import JsonArray = runtime.JsonArray - export import JsonValue = runtime.JsonValue - export import InputJsonObject = runtime.InputJsonObject - export import InputJsonArray = runtime.InputJsonArray - export import InputJsonValue = runtime.InputJsonValue - - /** - * Types of the values used to represent different kinds of `null` values when working with JSON fields. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - namespace NullTypes { - /** - * Type of `Prisma.DbNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class DbNull { - private DbNull: never - private constructor() - } - - /** - * Type of `Prisma.JsonNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class JsonNull { - private JsonNull: never - private constructor() - } - - /** - * Type of `Prisma.AnyNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class AnyNull { - private AnyNull: never - private constructor() - } - } - - /** - * Helper for filtering JSON entries that have `null` on the database (empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const DbNull: NullTypes.DbNull - - /** - * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const JsonNull: NullTypes.JsonNull - - /** - * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const AnyNull: NullTypes.AnyNull - - type SelectAndInclude = { - select: any - include: any - } - - type SelectAndOmit = { - select: any - omit: any - } - - /** - * Get the type of the value, that the Promise holds. - */ - export type PromiseType> = T extends PromiseLike ? U : T; - - /** - * Get the return type of a function which returns a Promise. - */ - export type PromiseReturnType $Utils.JsPromise> = PromiseType> - - /** - * From T, pick a set of properties whose keys are in the union K - */ - type Prisma__Pick = { - [P in K]: T[P]; - }; - - - export type Enumerable = T | Array; - - export type RequiredKeys = { - [K in keyof T]-?: {} extends Prisma__Pick ? never : K - }[keyof T] - - export type TruthyKeys = keyof { - [K in keyof T as T[K] extends false | undefined | null ? never : K]: K - } - - export type TrueKeys = TruthyKeys>> - - /** - * Subset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection - */ - export type Subset = { - [key in keyof T]: key extends keyof U ? T[key] : never; - }; - - /** - * SelectSubset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. - * Additionally, it validates, if both select and include are present. If the case, it errors. - */ - export type SelectSubset = { - [key in keyof T]: key extends keyof U ? T[key] : never - } & - (T extends SelectAndInclude - ? 'Please either choose `select` or `include`.' - : T extends SelectAndOmit - ? 'Please either choose `select` or `omit`.' - : {}) - - /** - * Subset + Intersection - * @desc From `T` pick properties that exist in `U` and intersect `K` - */ - export type SubsetIntersection = { - [key in keyof T]: key extends keyof U ? T[key] : never - } & - K - - type Without = { [P in Exclude]?: never }; - - /** - * XOR is needed to have a real mutually exclusive union type - * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types - */ - type XOR = - T extends object ? - U extends object ? - (Without & U) | (Without & T) - : U : T - - - /** - * Is T a Record? - */ - type IsObject = T extends Array - ? False - : T extends Date - ? False - : T extends Uint8Array - ? False - : T extends BigInt - ? False - : T extends object - ? True - : False - - - /** - * If it's T[], return T - */ - export type UnEnumerate = T extends Array ? U : T - - /** - * From ts-toolbelt - */ - - type __Either = Omit & - { - // Merge all but K - [P in K]: Prisma__Pick // With K possibilities - }[K] - - type EitherStrict = Strict<__Either> - - type EitherLoose = ComputeRaw<__Either> - - type _Either< - O extends object, - K extends Key, - strict extends Boolean - > = { - 1: EitherStrict - 0: EitherLoose - }[strict] - - type Either< - O extends object, - K extends Key, - strict extends Boolean = 1 - > = O extends unknown ? _Either : never - - export type Union = any - - type PatchUndefined = { - [K in keyof O]: O[K] extends undefined ? At : O[K] - } & {} - - /** Helper Types for "Merge" **/ - export type IntersectOf = ( - U extends unknown ? (k: U) => void : never - ) extends (k: infer I) => void - ? I - : never - - export type Overwrite = { - [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; - } & {}; - - type _Merge = IntersectOf; - }>>; - - type Key = string | number | symbol; - type AtBasic = K extends keyof O ? O[K] : never; - type AtStrict = O[K & keyof O]; - type AtLoose = O extends unknown ? AtStrict : never; - export type At = { - 1: AtStrict; - 0: AtLoose; - }[strict]; - - export type ComputeRaw = A extends Function ? A : { - [K in keyof A]: A[K]; - } & {}; - - export type OptionalFlat = { - [K in keyof O]?: O[K]; - } & {}; - - type _Record = { - [P in K]: T; - }; - - // cause typescript not to expand types and preserve names - type NoExpand = T extends unknown ? T : never; - - // this type assumes the passed object is entirely optional - type AtLeast = NoExpand< - O extends unknown - ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) - | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O - : never>; - - type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; - - export type Strict = ComputeRaw<_Strict>; - /** End Helper Types for "Merge" **/ - - export type Merge = ComputeRaw<_Merge>>; - - /** - A [[Boolean]] - */ - export type Boolean = True | False - - // /** - // 1 - // */ - export type True = 1 - - /** - 0 - */ - export type False = 0 - - export type Not = { - 0: 1 - 1: 0 - }[B] - - export type Extends = [A1] extends [never] - ? 0 // anything `never` is false - : A1 extends A2 - ? 1 - : 0 - - export type Has = Not< - Extends, U1> - > - - export type Or = { - 0: { - 0: 0 - 1: 1 - } - 1: { - 0: 1 - 1: 1 - } - }[B1][B2] - - export type Keys = U extends unknown ? keyof U : never - - type Cast = A extends B ? A : B; - - export const type: unique symbol; - - - - /** - * Used by group by - */ - - export type GetScalarType = O extends object ? { - [P in keyof T]: P extends keyof O - ? O[P] - : never - } : never - - type FieldPaths< - T, - U = Omit - > = IsObject extends True ? U : T - - type GetHavingFields = { - [K in keyof T]: Or< - Or, Extends<'AND', K>>, - Extends<'NOT', K> - > extends True - ? // infer is only needed to not hit TS limit - // based on the brilliant idea of Pierre-Antoine Mills - // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 - T[K] extends infer TK - ? GetHavingFields extends object ? Merge> : never> - : never - : {} extends FieldPaths - ? never - : K - }[keyof T] - - /** - * Convert tuple to union - */ - type _TupleToUnion = T extends (infer E)[] ? E : never - type TupleToUnion = _TupleToUnion - type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T - - /** - * Like `Pick`, but additionally can also accept an array of keys - */ - type PickEnumerable | keyof T> = Prisma__Pick> - - /** - * Exclude all keys with underscores - */ - type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T - - - export type FieldRef = runtime.FieldRef - - type FieldRefInputType = Model extends never ? never : FieldRef - - - export const ModelName: { - Admin: 'Admin', - SchemeService: 'SchemeService', - ContactPerson: 'ContactPerson', - SupportiveDocument: 'SupportiveDocument', - CertificateService: 'CertificateService', - CertificateContact: 'CertificateContact', - CertificateDocument: 'CertificateDocument', - CertificateProcessStep: 'CertificateProcessStep', - CertificateEligibility: 'CertificateEligibility', - ContactService: 'ContactService', - ContactServiceContact: 'ContactServiceContact', - ContactServiceDocument: 'ContactServiceDocument', - Post: 'Post', - Employee: 'Employee', - Feedback: 'Feedback', - Grievance: 'Grievance' - }; - - export type ModelName = (typeof ModelName)[keyof typeof ModelName] - - - export type Datasources = { - db?: Datasource - } - - interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs }, $Utils.Record> { - returns: Prisma.TypeMap - } - - export type TypeMap = { - globalOmitOptions: { - omit: GlobalOmitOptions - } - meta: { - modelProps: "admin" | "schemeService" | "contactPerson" | "supportiveDocument" | "certificateService" | "certificateContact" | "certificateDocument" | "certificateProcessStep" | "certificateEligibility" | "contactService" | "contactServiceContact" | "contactServiceDocument" | "post" | "employee" | "feedback" | "grievance" - txIsolationLevel: Prisma.TransactionIsolationLevel - } - model: { - Admin: { - payload: Prisma.$AdminPayload - fields: Prisma.AdminFieldRefs - operations: { - findUnique: { - args: Prisma.AdminFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.AdminFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.AdminFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.AdminFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.AdminFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.AdminCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.AdminCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.AdminCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.AdminDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.AdminUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.AdminDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.AdminUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.AdminUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.AdminUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.AdminAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.AdminGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.AdminCountArgs - result: $Utils.Optional | number - } - } - } - SchemeService: { - payload: Prisma.$SchemeServicePayload - fields: Prisma.SchemeServiceFieldRefs - operations: { - findUnique: { - args: Prisma.SchemeServiceFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.SchemeServiceFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.SchemeServiceFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.SchemeServiceFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.SchemeServiceFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.SchemeServiceCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.SchemeServiceCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.SchemeServiceCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.SchemeServiceDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.SchemeServiceUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.SchemeServiceDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.SchemeServiceUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.SchemeServiceUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.SchemeServiceUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.SchemeServiceAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.SchemeServiceGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.SchemeServiceCountArgs - result: $Utils.Optional | number - } - } - } - ContactPerson: { - payload: Prisma.$ContactPersonPayload - fields: Prisma.ContactPersonFieldRefs - operations: { - findUnique: { - args: Prisma.ContactPersonFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ContactPersonFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.ContactPersonFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ContactPersonFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.ContactPersonFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.ContactPersonCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.ContactPersonCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.ContactPersonCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.ContactPersonDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.ContactPersonUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ContactPersonDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.ContactPersonUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.ContactPersonUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.ContactPersonUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.ContactPersonAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.ContactPersonGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.ContactPersonCountArgs - result: $Utils.Optional | number - } - } - } - SupportiveDocument: { - payload: Prisma.$SupportiveDocumentPayload - fields: Prisma.SupportiveDocumentFieldRefs - operations: { - findUnique: { - args: Prisma.SupportiveDocumentFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.SupportiveDocumentFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.SupportiveDocumentFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.SupportiveDocumentFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.SupportiveDocumentFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.SupportiveDocumentCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.SupportiveDocumentCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.SupportiveDocumentCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.SupportiveDocumentDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.SupportiveDocumentUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.SupportiveDocumentDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.SupportiveDocumentUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.SupportiveDocumentUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.SupportiveDocumentUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.SupportiveDocumentAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.SupportiveDocumentGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.SupportiveDocumentCountArgs - result: $Utils.Optional | number - } - } - } - CertificateService: { - payload: Prisma.$CertificateServicePayload - fields: Prisma.CertificateServiceFieldRefs - operations: { - findUnique: { - args: Prisma.CertificateServiceFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.CertificateServiceFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.CertificateServiceFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.CertificateServiceFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.CertificateServiceFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.CertificateServiceCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.CertificateServiceCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.CertificateServiceCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.CertificateServiceDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.CertificateServiceUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.CertificateServiceDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.CertificateServiceUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.CertificateServiceUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.CertificateServiceUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.CertificateServiceAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.CertificateServiceGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.CertificateServiceCountArgs - result: $Utils.Optional | number - } - } - } - CertificateContact: { - payload: Prisma.$CertificateContactPayload - fields: Prisma.CertificateContactFieldRefs - operations: { - findUnique: { - args: Prisma.CertificateContactFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.CertificateContactFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.CertificateContactFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.CertificateContactFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.CertificateContactFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.CertificateContactCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.CertificateContactCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.CertificateContactCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.CertificateContactDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.CertificateContactUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.CertificateContactDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.CertificateContactUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.CertificateContactUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.CertificateContactUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.CertificateContactAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.CertificateContactGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.CertificateContactCountArgs - result: $Utils.Optional | number - } - } - } - CertificateDocument: { - payload: Prisma.$CertificateDocumentPayload - fields: Prisma.CertificateDocumentFieldRefs - operations: { - findUnique: { - args: Prisma.CertificateDocumentFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.CertificateDocumentFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.CertificateDocumentFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.CertificateDocumentFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.CertificateDocumentFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.CertificateDocumentCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.CertificateDocumentCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.CertificateDocumentCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.CertificateDocumentDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.CertificateDocumentUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.CertificateDocumentDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.CertificateDocumentUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.CertificateDocumentUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.CertificateDocumentUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.CertificateDocumentAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.CertificateDocumentGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.CertificateDocumentCountArgs - result: $Utils.Optional | number - } - } - } - CertificateProcessStep: { - payload: Prisma.$CertificateProcessStepPayload - fields: Prisma.CertificateProcessStepFieldRefs - operations: { - findUnique: { - args: Prisma.CertificateProcessStepFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.CertificateProcessStepFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.CertificateProcessStepFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.CertificateProcessStepFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.CertificateProcessStepFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.CertificateProcessStepCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.CertificateProcessStepCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.CertificateProcessStepCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.CertificateProcessStepDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.CertificateProcessStepUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.CertificateProcessStepDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.CertificateProcessStepUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.CertificateProcessStepUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.CertificateProcessStepUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.CertificateProcessStepAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.CertificateProcessStepGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.CertificateProcessStepCountArgs - result: $Utils.Optional | number - } - } - } - CertificateEligibility: { - payload: Prisma.$CertificateEligibilityPayload - fields: Prisma.CertificateEligibilityFieldRefs - operations: { - findUnique: { - args: Prisma.CertificateEligibilityFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.CertificateEligibilityFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.CertificateEligibilityFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.CertificateEligibilityFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.CertificateEligibilityFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.CertificateEligibilityCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.CertificateEligibilityCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.CertificateEligibilityCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.CertificateEligibilityDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.CertificateEligibilityUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.CertificateEligibilityDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.CertificateEligibilityUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.CertificateEligibilityUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.CertificateEligibilityUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.CertificateEligibilityAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.CertificateEligibilityGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.CertificateEligibilityCountArgs - result: $Utils.Optional | number - } - } - } - ContactService: { - payload: Prisma.$ContactServicePayload - fields: Prisma.ContactServiceFieldRefs - operations: { - findUnique: { - args: Prisma.ContactServiceFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ContactServiceFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.ContactServiceFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ContactServiceFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.ContactServiceFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.ContactServiceCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.ContactServiceCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.ContactServiceCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.ContactServiceDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.ContactServiceUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ContactServiceDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.ContactServiceUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.ContactServiceUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.ContactServiceUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.ContactServiceAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.ContactServiceGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.ContactServiceCountArgs - result: $Utils.Optional | number - } - } - } - ContactServiceContact: { - payload: Prisma.$ContactServiceContactPayload - fields: Prisma.ContactServiceContactFieldRefs - operations: { - findUnique: { - args: Prisma.ContactServiceContactFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ContactServiceContactFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.ContactServiceContactFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ContactServiceContactFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.ContactServiceContactFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.ContactServiceContactCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.ContactServiceContactCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.ContactServiceContactCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.ContactServiceContactDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.ContactServiceContactUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ContactServiceContactDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.ContactServiceContactUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.ContactServiceContactUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.ContactServiceContactUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.ContactServiceContactAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.ContactServiceContactGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.ContactServiceContactCountArgs - result: $Utils.Optional | number - } - } - } - ContactServiceDocument: { - payload: Prisma.$ContactServiceDocumentPayload - fields: Prisma.ContactServiceDocumentFieldRefs - operations: { - findUnique: { - args: Prisma.ContactServiceDocumentFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ContactServiceDocumentFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.ContactServiceDocumentFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ContactServiceDocumentFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.ContactServiceDocumentFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.ContactServiceDocumentCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.ContactServiceDocumentCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.ContactServiceDocumentCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.ContactServiceDocumentDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.ContactServiceDocumentUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ContactServiceDocumentDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.ContactServiceDocumentUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.ContactServiceDocumentUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.ContactServiceDocumentUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.ContactServiceDocumentAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.ContactServiceDocumentGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.ContactServiceDocumentCountArgs - result: $Utils.Optional | number - } - } - } - Post: { - payload: Prisma.$PostPayload - fields: Prisma.PostFieldRefs - operations: { - findUnique: { - args: Prisma.PostFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.PostFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.PostFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.PostFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.PostFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.PostCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.PostCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.PostCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.PostDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.PostUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.PostDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.PostUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.PostUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.PostUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.PostAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.PostGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.PostCountArgs - result: $Utils.Optional | number - } - } - } - Employee: { - payload: Prisma.$EmployeePayload - fields: Prisma.EmployeeFieldRefs - operations: { - findUnique: { - args: Prisma.EmployeeFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.EmployeeFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.EmployeeFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.EmployeeFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.EmployeeFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.EmployeeCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.EmployeeCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.EmployeeCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.EmployeeDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.EmployeeUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.EmployeeDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.EmployeeUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.EmployeeUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.EmployeeUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.EmployeeAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.EmployeeGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.EmployeeCountArgs - result: $Utils.Optional | number - } - } - } - Feedback: { - payload: Prisma.$FeedbackPayload - fields: Prisma.FeedbackFieldRefs - operations: { - findUnique: { - args: Prisma.FeedbackFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.FeedbackFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.FeedbackFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.FeedbackFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.FeedbackFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.FeedbackCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.FeedbackCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.FeedbackCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.FeedbackDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.FeedbackUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.FeedbackDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.FeedbackUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.FeedbackUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.FeedbackUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.FeedbackAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.FeedbackGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.FeedbackCountArgs - result: $Utils.Optional | number - } - } - } - Grievance: { - payload: Prisma.$GrievancePayload - fields: Prisma.GrievanceFieldRefs - operations: { - findUnique: { - args: Prisma.GrievanceFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.GrievanceFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.GrievanceFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.GrievanceFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.GrievanceFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.GrievanceCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.GrievanceCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.GrievanceCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.GrievanceDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.GrievanceUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.GrievanceDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.GrievanceUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.GrievanceUpdateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - upsert: { - args: Prisma.GrievanceUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.GrievanceAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.GrievanceGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.GrievanceCountArgs - result: $Utils.Optional | number - } - } - } - } - } & { - other: { - payload: any - operations: { - $executeRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - } - $executeRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - } - $queryRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - } - $queryRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - } - } - } - } - export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> - export type DefaultPrismaClient = PrismaClient - export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' - export interface PrismaClientOptions { - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasourceUrl?: string - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat - /** - * @example - * ``` - * // Shorthand for `emit: 'stdout'` - * log: ['query', 'info', 'warn', 'error'] - * - * // Emit as events only - * log: [ - * { emit: 'event', level: 'query' }, - * { emit: 'event', level: 'info' }, - * { emit: 'event', level: 'warn' } - * { emit: 'event', level: 'error' } - * ] - * - * / Emit as events and log to stdout - * og: [ - * { emit: 'stdout', level: 'query' }, - * { emit: 'stdout', level: 'info' }, - * { emit: 'stdout', level: 'warn' } - * { emit: 'stdout', level: 'error' } - * - * ``` - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). - */ - log?: (LogLevel | LogDefinition)[] - /** - * The default values for transactionOptions - * maxWait ?= 2000 - * timeout ?= 5000 - */ - transactionOptions?: { - maxWait?: number - timeout?: number - isolationLevel?: Prisma.TransactionIsolationLevel - } - /** - * Global configuration for omitting model fields by default. - * - * @example - * ``` - * const prisma = new PrismaClient({ - * omit: { - * user: { - * password: true - * } - * } - * }) - * ``` - */ - omit?: Prisma.GlobalOmitConfig - } - export type GlobalOmitConfig = { - admin?: AdminOmit - schemeService?: SchemeServiceOmit - contactPerson?: ContactPersonOmit - supportiveDocument?: SupportiveDocumentOmit - certificateService?: CertificateServiceOmit - certificateContact?: CertificateContactOmit - certificateDocument?: CertificateDocumentOmit - certificateProcessStep?: CertificateProcessStepOmit - certificateEligibility?: CertificateEligibilityOmit - contactService?: ContactServiceOmit - contactServiceContact?: ContactServiceContactOmit - contactServiceDocument?: ContactServiceDocumentOmit - post?: PostOmit - employee?: EmployeeOmit - feedback?: FeedbackOmit - grievance?: GrievanceOmit - } - - /* Types for Logging */ - export type LogLevel = 'info' | 'query' | 'warn' | 'error' - export type LogDefinition = { - level: LogLevel - emit: 'stdout' | 'event' - } - - export type CheckIsLogLevel = T extends LogLevel ? T : never; - - export type GetLogType = CheckIsLogLevel< - T extends LogDefinition ? T['level'] : T - >; - - export type GetEvents = T extends Array - ? GetLogType - : never; - - export type QueryEvent = { - timestamp: Date - query: string - params: string - duration: number - target: string - } - - export type LogEvent = { - timestamp: Date - message: string - target: string - } - /* End Types for Logging */ - - - export type PrismaAction = - | 'findUnique' - | 'findUniqueOrThrow' - | 'findMany' - | 'findFirst' - | 'findFirstOrThrow' - | 'create' - | 'createMany' - | 'createManyAndReturn' - | 'update' - | 'updateMany' - | 'updateManyAndReturn' - | 'upsert' - | 'delete' - | 'deleteMany' - | 'executeRaw' - | 'queryRaw' - | 'aggregate' - | 'count' - | 'runCommandRaw' - | 'findRaw' - | 'groupBy' - - /** - * These options are being passed into the middleware as "params" - */ - export type MiddlewareParams = { - model?: ModelName - action: PrismaAction - args: any - dataPath: string[] - runInTransaction: boolean - } - - /** - * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation - */ - export type Middleware = ( - params: MiddlewareParams, - next: (params: MiddlewareParams) => $Utils.JsPromise, - ) => $Utils.JsPromise - - // tested in getLogLevel.test.ts - export function getLogLevel(log: Array): LogLevel | undefined; - - /** - * `PrismaClient` proxy available in interactive transactions. - */ - export type TransactionClient = Omit - - export type Datasource = { - url?: string - } - - /** - * Count Types - */ - - - /** - * Count Type AdminCountOutputType - */ - - export type AdminCountOutputType = { - schemeServices: number - certificateServices: number - contactServices: number - } - - export type AdminCountOutputTypeSelect = { - schemeServices?: boolean | AdminCountOutputTypeCountSchemeServicesArgs - certificateServices?: boolean | AdminCountOutputTypeCountCertificateServicesArgs - contactServices?: boolean | AdminCountOutputTypeCountContactServicesArgs - } - - // Custom InputTypes - /** - * AdminCountOutputType without action - */ - export type AdminCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the AdminCountOutputType - */ - select?: AdminCountOutputTypeSelect | null - } - - /** - * AdminCountOutputType without action - */ - export type AdminCountOutputTypeCountSchemeServicesArgs = { - where?: SchemeServiceWhereInput - } - - /** - * AdminCountOutputType without action - */ - export type AdminCountOutputTypeCountCertificateServicesArgs = { - where?: CertificateServiceWhereInput - } - - /** - * AdminCountOutputType without action - */ - export type AdminCountOutputTypeCountContactServicesArgs = { - where?: ContactServiceWhereInput - } - - - /** - * Count Type SchemeServiceCountOutputType - */ - - export type SchemeServiceCountOutputType = { - contacts: number - documents: number - } - - export type SchemeServiceCountOutputTypeSelect = { - contacts?: boolean | SchemeServiceCountOutputTypeCountContactsArgs - documents?: boolean | SchemeServiceCountOutputTypeCountDocumentsArgs - } - - // Custom InputTypes - /** - * SchemeServiceCountOutputType without action - */ - export type SchemeServiceCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the SchemeServiceCountOutputType - */ - select?: SchemeServiceCountOutputTypeSelect | null - } - - /** - * SchemeServiceCountOutputType without action - */ - export type SchemeServiceCountOutputTypeCountContactsArgs = { - where?: ContactPersonWhereInput - } - - /** - * SchemeServiceCountOutputType without action - */ - export type SchemeServiceCountOutputTypeCountDocumentsArgs = { - where?: SupportiveDocumentWhereInput - } - - - /** - * Count Type CertificateServiceCountOutputType - */ - - export type CertificateServiceCountOutputType = { - contacts: number - documents: number - processSteps: number - eligibilityItems: number - } - - export type CertificateServiceCountOutputTypeSelect = { - contacts?: boolean | CertificateServiceCountOutputTypeCountContactsArgs - documents?: boolean | CertificateServiceCountOutputTypeCountDocumentsArgs - processSteps?: boolean | CertificateServiceCountOutputTypeCountProcessStepsArgs - eligibilityItems?: boolean | CertificateServiceCountOutputTypeCountEligibilityItemsArgs - } - - // Custom InputTypes - /** - * CertificateServiceCountOutputType without action - */ - export type CertificateServiceCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the CertificateServiceCountOutputType - */ - select?: CertificateServiceCountOutputTypeSelect | null - } - - /** - * CertificateServiceCountOutputType without action - */ - export type CertificateServiceCountOutputTypeCountContactsArgs = { - where?: CertificateContactWhereInput - } - - /** - * CertificateServiceCountOutputType without action - */ - export type CertificateServiceCountOutputTypeCountDocumentsArgs = { - where?: CertificateDocumentWhereInput - } - - /** - * CertificateServiceCountOutputType without action - */ - export type CertificateServiceCountOutputTypeCountProcessStepsArgs = { - where?: CertificateProcessStepWhereInput - } - - /** - * CertificateServiceCountOutputType without action - */ - export type CertificateServiceCountOutputTypeCountEligibilityItemsArgs = { - where?: CertificateEligibilityWhereInput - } - - - /** - * Count Type ContactServiceCountOutputType - */ - - export type ContactServiceCountOutputType = { - contacts: number - documents: number - } - - export type ContactServiceCountOutputTypeSelect = { - contacts?: boolean | ContactServiceCountOutputTypeCountContactsArgs - documents?: boolean | ContactServiceCountOutputTypeCountDocumentsArgs - } - - // Custom InputTypes - /** - * ContactServiceCountOutputType without action - */ - export type ContactServiceCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the ContactServiceCountOutputType - */ - select?: ContactServiceCountOutputTypeSelect | null - } - - /** - * ContactServiceCountOutputType without action - */ - export type ContactServiceCountOutputTypeCountContactsArgs = { - where?: ContactServiceContactWhereInput - } - - /** - * ContactServiceCountOutputType without action - */ - export type ContactServiceCountOutputTypeCountDocumentsArgs = { - where?: ContactServiceDocumentWhereInput - } - - - /** - * Count Type ContactServiceContactCountOutputType - */ - - export type ContactServiceContactCountOutputType = { - posts: number - } - - export type ContactServiceContactCountOutputTypeSelect = { - posts?: boolean | ContactServiceContactCountOutputTypeCountPostsArgs - } - - // Custom InputTypes - /** - * ContactServiceContactCountOutputType without action - */ - export type ContactServiceContactCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the ContactServiceContactCountOutputType - */ - select?: ContactServiceContactCountOutputTypeSelect | null - } - - /** - * ContactServiceContactCountOutputType without action - */ - export type ContactServiceContactCountOutputTypeCountPostsArgs = { - where?: PostWhereInput - } - - - /** - * Count Type PostCountOutputType - */ - - export type PostCountOutputType = { - employees: number - } - - export type PostCountOutputTypeSelect = { - employees?: boolean | PostCountOutputTypeCountEmployeesArgs - } - - // Custom InputTypes - /** - * PostCountOutputType without action - */ - export type PostCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the PostCountOutputType - */ - select?: PostCountOutputTypeSelect | null - } - - /** - * PostCountOutputType without action - */ - export type PostCountOutputTypeCountEmployeesArgs = { - where?: EmployeeWhereInput - } - - - /** - * Models - */ - - /** - * Model Admin - */ - - export type AggregateAdmin = { - _count: AdminCountAggregateOutputType | null - _avg: AdminAvgAggregateOutputType | null - _sum: AdminSumAggregateOutputType | null - _min: AdminMinAggregateOutputType | null - _max: AdminMaxAggregateOutputType | null - } - - export type AdminAvgAggregateOutputType = { - id: number | null - } - - export type AdminSumAggregateOutputType = { - id: number | null - } - - export type AdminMinAggregateOutputType = { - id: number | null - email: string | null - password: string | null - name: string | null - role: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type AdminMaxAggregateOutputType = { - id: number | null - email: string | null - password: string | null - name: string | null - role: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type AdminCountAggregateOutputType = { - id: number - email: number - password: number - name: number - role: number - createdAt: number - updatedAt: number - _all: number - } - - - export type AdminAvgAggregateInputType = { - id?: true - } - - export type AdminSumAggregateInputType = { - id?: true - } - - export type AdminMinAggregateInputType = { - id?: true - email?: true - password?: true - name?: true - role?: true - createdAt?: true - updatedAt?: true - } - - export type AdminMaxAggregateInputType = { - id?: true - email?: true - password?: true - name?: true - role?: true - createdAt?: true - updatedAt?: true - } - - export type AdminCountAggregateInputType = { - id?: true - email?: true - password?: true - name?: true - role?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type AdminAggregateArgs = { - /** - * Filter which Admin to aggregate. - */ - where?: AdminWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Admins to fetch. - */ - orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: AdminWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Admins from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Admins. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Admins - **/ - _count?: true | AdminCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: AdminAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: AdminSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AdminMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AdminMaxAggregateInputType - } - - export type GetAdminAggregateType = { - [P in keyof T & keyof AggregateAdmin]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type AdminGroupByArgs = { - where?: AdminWhereInput - orderBy?: AdminOrderByWithAggregationInput | AdminOrderByWithAggregationInput[] - by: AdminScalarFieldEnum[] | AdminScalarFieldEnum - having?: AdminScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AdminCountAggregateInputType | true - _avg?: AdminAvgAggregateInputType - _sum?: AdminSumAggregateInputType - _min?: AdminMinAggregateInputType - _max?: AdminMaxAggregateInputType - } - - export type AdminGroupByOutputType = { - id: number - email: string - password: string - name: string - role: string - createdAt: Date - updatedAt: Date - _count: AdminCountAggregateOutputType | null - _avg: AdminAvgAggregateOutputType | null - _sum: AdminSumAggregateOutputType | null - _min: AdminMinAggregateOutputType | null - _max: AdminMaxAggregateOutputType | null - } - - type GetAdminGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof AdminGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type AdminSelect = $Extensions.GetSelect<{ - id?: boolean - email?: boolean - password?: boolean - name?: boolean - role?: boolean - createdAt?: boolean - updatedAt?: boolean - schemeServices?: boolean | Admin$schemeServicesArgs - certificateServices?: boolean | Admin$certificateServicesArgs - contactServices?: boolean | Admin$contactServicesArgs - _count?: boolean | AdminCountOutputTypeDefaultArgs - }, ExtArgs["result"]["admin"]> - - export type AdminSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - email?: boolean - password?: boolean - name?: boolean - role?: boolean - createdAt?: boolean - updatedAt?: boolean - }, ExtArgs["result"]["admin"]> - - export type AdminSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - email?: boolean - password?: boolean - name?: boolean - role?: boolean - createdAt?: boolean - updatedAt?: boolean - }, ExtArgs["result"]["admin"]> - - export type AdminSelectScalar = { - id?: boolean - email?: boolean - password?: boolean - name?: boolean - role?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - export type AdminOmit = $Extensions.GetOmit<"id" | "email" | "password" | "name" | "role" | "createdAt" | "updatedAt", ExtArgs["result"]["admin"]> - export type AdminInclude = { - schemeServices?: boolean | Admin$schemeServicesArgs - certificateServices?: boolean | Admin$certificateServicesArgs - contactServices?: boolean | Admin$contactServicesArgs - _count?: boolean | AdminCountOutputTypeDefaultArgs - } - export type AdminIncludeCreateManyAndReturn = {} - export type AdminIncludeUpdateManyAndReturn = {} - - export type $AdminPayload = { - name: "Admin" - objects: { - schemeServices: Prisma.$SchemeServicePayload[] - certificateServices: Prisma.$CertificateServicePayload[] - contactServices: Prisma.$ContactServicePayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: number - email: string - password: string - name: string - role: string - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["admin"]> - composites: {} - } - - type AdminGetPayload = $Result.GetResult - - type AdminCountArgs = - Omit & { - select?: AdminCountAggregateInputType | true - } - - export interface AdminDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Admin'], meta: { name: 'Admin' } } - /** - * Find zero or one Admin that matches the filter. - * @param {AdminFindUniqueArgs} args - Arguments to find a Admin - * @example - * // Get one Admin - * const admin = await prisma.admin.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Admin that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AdminFindUniqueOrThrowArgs} args - Arguments to find a Admin - * @example - * // Get one Admin - * const admin = await prisma.admin.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Admin that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AdminFindFirstArgs} args - Arguments to find a Admin - * @example - * // Get one Admin - * const admin = await prisma.admin.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Admin that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AdminFindFirstOrThrowArgs} args - Arguments to find a Admin - * @example - * // Get one Admin - * const admin = await prisma.admin.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Admins that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AdminFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Admins - * const admins = await prisma.admin.findMany() - * - * // Get first 10 Admins - * const admins = await prisma.admin.findMany({ take: 10 }) - * - * // Only select the `id` - * const adminWithIdOnly = await prisma.admin.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Admin. - * @param {AdminCreateArgs} args - Arguments to create a Admin. - * @example - * // Create one Admin - * const Admin = await prisma.admin.create({ - * data: { - * // ... data to create a Admin - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Admins. - * @param {AdminCreateManyArgs} args - Arguments to create many Admins. - * @example - * // Create many Admins - * const admin = await prisma.admin.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Admins and returns the data saved in the database. - * @param {AdminCreateManyAndReturnArgs} args - Arguments to create many Admins. - * @example - * // Create many Admins - * const admin = await prisma.admin.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Admins and only return the `id` - * const adminWithIdOnly = await prisma.admin.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a Admin. - * @param {AdminDeleteArgs} args - Arguments to delete one Admin. - * @example - * // Delete one Admin - * const Admin = await prisma.admin.delete({ - * where: { - * // ... filter to delete one Admin - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Admin. - * @param {AdminUpdateArgs} args - Arguments to update one Admin. - * @example - * // Update one Admin - * const admin = await prisma.admin.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Admins. - * @param {AdminDeleteManyArgs} args - Arguments to filter Admins to delete. - * @example - * // Delete a few Admins - * const { count } = await prisma.admin.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Admins. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AdminUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Admins - * const admin = await prisma.admin.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Admins and returns the data updated in the database. - * @param {AdminUpdateManyAndReturnArgs} args - Arguments to update many Admins. - * @example - * // Update many Admins - * const admin = await prisma.admin.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Admins and only return the `id` - * const adminWithIdOnly = await prisma.admin.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one Admin. - * @param {AdminUpsertArgs} args - Arguments to update or create a Admin. - * @example - * // Update or create a Admin - * const admin = await prisma.admin.upsert({ - * create: { - * // ... data to create a Admin - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Admin we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Admins. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AdminCountArgs} args - Arguments to filter Admins to count. - * @example - * // Count the number of Admins - * const count = await prisma.admin.count({ - * where: { - * // ... the filter for the Admins we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Admin. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AdminAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Admin. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AdminGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends AdminGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AdminGroupByArgs['orderBy'] } - : { orderBy?: AdminGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAdminGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Admin model - */ - readonly fields: AdminFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Admin. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__AdminClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - schemeServices = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - certificateServices = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - contactServices = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the Admin model - */ - interface AdminFieldRefs { - readonly id: FieldRef<"Admin", 'Int'> - readonly email: FieldRef<"Admin", 'String'> - readonly password: FieldRef<"Admin", 'String'> - readonly name: FieldRef<"Admin", 'String'> - readonly role: FieldRef<"Admin", 'String'> - readonly createdAt: FieldRef<"Admin", 'DateTime'> - readonly updatedAt: FieldRef<"Admin", 'DateTime'> - } - - - // Custom InputTypes - /** - * Admin findUnique - */ - export type AdminFindUniqueArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelect | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AdminInclude | null - /** - * Filter, which Admin to fetch. - */ - where: AdminWhereUniqueInput - } - - /** - * Admin findUniqueOrThrow - */ - export type AdminFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelect | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AdminInclude | null - /** - * Filter, which Admin to fetch. - */ - where: AdminWhereUniqueInput - } - - /** - * Admin findFirst - */ - export type AdminFindFirstArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelect | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AdminInclude | null - /** - * Filter, which Admin to fetch. - */ - where?: AdminWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Admins to fetch. - */ - orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Admins. - */ - cursor?: AdminWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Admins from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Admins. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Admins. - */ - distinct?: AdminScalarFieldEnum | AdminScalarFieldEnum[] - } - - /** - * Admin findFirstOrThrow - */ - export type AdminFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelect | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AdminInclude | null - /** - * Filter, which Admin to fetch. - */ - where?: AdminWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Admins to fetch. - */ - orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Admins. - */ - cursor?: AdminWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Admins from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Admins. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Admins. - */ - distinct?: AdminScalarFieldEnum | AdminScalarFieldEnum[] - } - - /** - * Admin findMany - */ - export type AdminFindManyArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelect | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AdminInclude | null - /** - * Filter, which Admins to fetch. - */ - where?: AdminWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Admins to fetch. - */ - orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Admins. - */ - cursor?: AdminWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Admins from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Admins. - */ - skip?: number - distinct?: AdminScalarFieldEnum | AdminScalarFieldEnum[] - } - - /** - * Admin create - */ - export type AdminCreateArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelect | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AdminInclude | null - /** - * The data needed to create a Admin. - */ - data: XOR - } - - /** - * Admin createMany - */ - export type AdminCreateManyArgs = { - /** - * The data used to create many Admins. - */ - data: AdminCreateManyInput | AdminCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Admin createManyAndReturn - */ - export type AdminCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelectCreateManyAndReturn | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * The data used to create many Admins. - */ - data: AdminCreateManyInput | AdminCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Admin update - */ - export type AdminUpdateArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelect | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AdminInclude | null - /** - * The data needed to update a Admin. - */ - data: XOR - /** - * Choose, which Admin to update. - */ - where: AdminWhereUniqueInput - } - - /** - * Admin updateMany - */ - export type AdminUpdateManyArgs = { - /** - * The data used to update Admins. - */ - data: XOR - /** - * Filter which Admins to update - */ - where?: AdminWhereInput - /** - * Limit how many Admins to update. - */ - limit?: number - } - - /** - * Admin updateManyAndReturn - */ - export type AdminUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * The data used to update Admins. - */ - data: XOR - /** - * Filter which Admins to update - */ - where?: AdminWhereInput - /** - * Limit how many Admins to update. - */ - limit?: number - } - - /** - * Admin upsert - */ - export type AdminUpsertArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelect | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AdminInclude | null - /** - * The filter to search for the Admin to update in case it exists. - */ - where: AdminWhereUniqueInput - /** - * In case the Admin found by the `where` argument doesn't exist, create a new Admin with this data. - */ - create: XOR - /** - * In case the Admin was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Admin delete - */ - export type AdminDeleteArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelect | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AdminInclude | null - /** - * Filter which Admin to delete. - */ - where: AdminWhereUniqueInput - } - - /** - * Admin deleteMany - */ - export type AdminDeleteManyArgs = { - /** - * Filter which Admins to delete - */ - where?: AdminWhereInput - /** - * Limit how many Admins to delete. - */ - limit?: number - } - - /** - * Admin.schemeServices - */ - export type Admin$schemeServicesArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - where?: SchemeServiceWhereInput - orderBy?: SchemeServiceOrderByWithRelationInput | SchemeServiceOrderByWithRelationInput[] - cursor?: SchemeServiceWhereUniqueInput - take?: number - skip?: number - distinct?: SchemeServiceScalarFieldEnum | SchemeServiceScalarFieldEnum[] - } - - /** - * Admin.certificateServices - */ - export type Admin$certificateServicesArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - where?: CertificateServiceWhereInput - orderBy?: CertificateServiceOrderByWithRelationInput | CertificateServiceOrderByWithRelationInput[] - cursor?: CertificateServiceWhereUniqueInput - take?: number - skip?: number - distinct?: CertificateServiceScalarFieldEnum | CertificateServiceScalarFieldEnum[] - } - - /** - * Admin.contactServices - */ - export type Admin$contactServicesArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - where?: ContactServiceWhereInput - orderBy?: ContactServiceOrderByWithRelationInput | ContactServiceOrderByWithRelationInput[] - cursor?: ContactServiceWhereUniqueInput - take?: number - skip?: number - distinct?: ContactServiceScalarFieldEnum | ContactServiceScalarFieldEnum[] - } - - /** - * Admin without action - */ - export type AdminDefaultArgs = { - /** - * Select specific fields to fetch from the Admin - */ - select?: AdminSelect | null - /** - * Omit specific fields from the Admin - */ - omit?: AdminOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AdminInclude | null - } - - - /** - * Model SchemeService - */ - - export type AggregateSchemeService = { - _count: SchemeServiceCountAggregateOutputType | null - _avg: SchemeServiceAvgAggregateOutputType | null - _sum: SchemeServiceSumAggregateOutputType | null - _min: SchemeServiceMinAggregateOutputType | null - _max: SchemeServiceMaxAggregateOutputType | null - } - - export type SchemeServiceAvgAggregateOutputType = { - id: number | null - adminId: number | null - } - - export type SchemeServiceSumAggregateOutputType = { - id: number | null - adminId: number | null - } - - export type SchemeServiceMinAggregateOutputType = { - id: number | null - name: string | null - summary: string | null - type: string | null - applicationMode: string | null - onlineUrl: string | null - offlineAddress: string | null - status: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - adminId: number | null - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - } - - export type SchemeServiceMaxAggregateOutputType = { - id: number | null - name: string | null - summary: string | null - type: string | null - applicationMode: string | null - onlineUrl: string | null - offlineAddress: string | null - status: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - adminId: number | null - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - } - - export type SchemeServiceCountAggregateOutputType = { - id: number - name: number - summary: number - type: number - targetAudience: number - applicationMode: number - onlineUrl: number - offlineAddress: number - status: number - isActive: number - createdAt: number - updatedAt: number - adminId: number - eligibilityDetails: number - schemeDetails: number - processDetails: number - processNew: number - processUpdate: number - processLost: number - processSurrender: number - docNew: number - docUpdate: number - docLost: number - docSurrender: number - _all: number - } - - - export type SchemeServiceAvgAggregateInputType = { - id?: true - adminId?: true - } - - export type SchemeServiceSumAggregateInputType = { - id?: true - adminId?: true - } - - export type SchemeServiceMinAggregateInputType = { - id?: true - name?: true - summary?: true - type?: true - applicationMode?: true - onlineUrl?: true - offlineAddress?: true - status?: true - isActive?: true - createdAt?: true - updatedAt?: true - adminId?: true - processNew?: true - processUpdate?: true - processLost?: true - processSurrender?: true - docNew?: true - docUpdate?: true - docLost?: true - docSurrender?: true - } - - export type SchemeServiceMaxAggregateInputType = { - id?: true - name?: true - summary?: true - type?: true - applicationMode?: true - onlineUrl?: true - offlineAddress?: true - status?: true - isActive?: true - createdAt?: true - updatedAt?: true - adminId?: true - processNew?: true - processUpdate?: true - processLost?: true - processSurrender?: true - docNew?: true - docUpdate?: true - docLost?: true - docSurrender?: true - } - - export type SchemeServiceCountAggregateInputType = { - id?: true - name?: true - summary?: true - type?: true - targetAudience?: true - applicationMode?: true - onlineUrl?: true - offlineAddress?: true - status?: true - isActive?: true - createdAt?: true - updatedAt?: true - adminId?: true - eligibilityDetails?: true - schemeDetails?: true - processDetails?: true - processNew?: true - processUpdate?: true - processLost?: true - processSurrender?: true - docNew?: true - docUpdate?: true - docLost?: true - docSurrender?: true - _all?: true - } - - export type SchemeServiceAggregateArgs = { - /** - * Filter which SchemeService to aggregate. - */ - where?: SchemeServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SchemeServices to fetch. - */ - orderBy?: SchemeServiceOrderByWithRelationInput | SchemeServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: SchemeServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SchemeServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SchemeServices. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned SchemeServices - **/ - _count?: true | SchemeServiceCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: SchemeServiceAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: SchemeServiceSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: SchemeServiceMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: SchemeServiceMaxAggregateInputType - } - - export type GetSchemeServiceAggregateType = { - [P in keyof T & keyof AggregateSchemeService]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type SchemeServiceGroupByArgs = { - where?: SchemeServiceWhereInput - orderBy?: SchemeServiceOrderByWithAggregationInput | SchemeServiceOrderByWithAggregationInput[] - by: SchemeServiceScalarFieldEnum[] | SchemeServiceScalarFieldEnum - having?: SchemeServiceScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: SchemeServiceCountAggregateInputType | true - _avg?: SchemeServiceAvgAggregateInputType - _sum?: SchemeServiceSumAggregateInputType - _min?: SchemeServiceMinAggregateInputType - _max?: SchemeServiceMaxAggregateInputType - } - - export type SchemeServiceGroupByOutputType = { - id: number - name: string - summary: string - type: string | null - targetAudience: string[] - applicationMode: string - onlineUrl: string | null - offlineAddress: string | null - status: string - isActive: boolean - createdAt: Date - updatedAt: Date - adminId: number - eligibilityDetails: string[] - schemeDetails: string[] - processDetails: string[] - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - _count: SchemeServiceCountAggregateOutputType | null - _avg: SchemeServiceAvgAggregateOutputType | null - _sum: SchemeServiceSumAggregateOutputType | null - _min: SchemeServiceMinAggregateOutputType | null - _max: SchemeServiceMaxAggregateOutputType | null - } - - type GetSchemeServiceGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof SchemeServiceGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type SchemeServiceSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - schemeDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - admin?: boolean | AdminDefaultArgs - contacts?: boolean | SchemeService$contactsArgs - documents?: boolean | SchemeService$documentsArgs - _count?: boolean | SchemeServiceCountOutputTypeDefaultArgs - }, ExtArgs["result"]["schemeService"]> - - export type SchemeServiceSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - schemeDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - admin?: boolean | AdminDefaultArgs - }, ExtArgs["result"]["schemeService"]> - - export type SchemeServiceSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - schemeDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - admin?: boolean | AdminDefaultArgs - }, ExtArgs["result"]["schemeService"]> - - export type SchemeServiceSelectScalar = { - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - schemeDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - } - - export type SchemeServiceOmit = $Extensions.GetOmit<"id" | "name" | "summary" | "type" | "targetAudience" | "applicationMode" | "onlineUrl" | "offlineAddress" | "status" | "isActive" | "createdAt" | "updatedAt" | "adminId" | "eligibilityDetails" | "schemeDetails" | "processDetails" | "processNew" | "processUpdate" | "processLost" | "processSurrender" | "docNew" | "docUpdate" | "docLost" | "docSurrender", ExtArgs["result"]["schemeService"]> - export type SchemeServiceInclude = { - admin?: boolean | AdminDefaultArgs - contacts?: boolean | SchemeService$contactsArgs - documents?: boolean | SchemeService$documentsArgs - _count?: boolean | SchemeServiceCountOutputTypeDefaultArgs - } - export type SchemeServiceIncludeCreateManyAndReturn = { - admin?: boolean | AdminDefaultArgs - } - export type SchemeServiceIncludeUpdateManyAndReturn = { - admin?: boolean | AdminDefaultArgs - } - - export type $SchemeServicePayload = { - name: "SchemeService" - objects: { - admin: Prisma.$AdminPayload - contacts: Prisma.$ContactPersonPayload[] - documents: Prisma.$SupportiveDocumentPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: number - name: string - summary: string - type: string | null - targetAudience: string[] - applicationMode: string - onlineUrl: string | null - offlineAddress: string | null - status: string - isActive: boolean - createdAt: Date - updatedAt: Date - adminId: number - eligibilityDetails: string[] - schemeDetails: string[] - processDetails: string[] - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - }, ExtArgs["result"]["schemeService"]> - composites: {} - } - - type SchemeServiceGetPayload = $Result.GetResult - - type SchemeServiceCountArgs = - Omit & { - select?: SchemeServiceCountAggregateInputType | true - } - - export interface SchemeServiceDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['SchemeService'], meta: { name: 'SchemeService' } } - /** - * Find zero or one SchemeService that matches the filter. - * @param {SchemeServiceFindUniqueArgs} args - Arguments to find a SchemeService - * @example - * // Get one SchemeService - * const schemeService = await prisma.schemeService.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__SchemeServiceClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one SchemeService that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {SchemeServiceFindUniqueOrThrowArgs} args - Arguments to find a SchemeService - * @example - * // Get one SchemeService - * const schemeService = await prisma.schemeService.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__SchemeServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first SchemeService that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SchemeServiceFindFirstArgs} args - Arguments to find a SchemeService - * @example - * // Get one SchemeService - * const schemeService = await prisma.schemeService.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__SchemeServiceClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first SchemeService that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SchemeServiceFindFirstOrThrowArgs} args - Arguments to find a SchemeService - * @example - * // Get one SchemeService - * const schemeService = await prisma.schemeService.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__SchemeServiceClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more SchemeServices that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SchemeServiceFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all SchemeServices - * const schemeServices = await prisma.schemeService.findMany() - * - * // Get first 10 SchemeServices - * const schemeServices = await prisma.schemeService.findMany({ take: 10 }) - * - * // Only select the `id` - * const schemeServiceWithIdOnly = await prisma.schemeService.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a SchemeService. - * @param {SchemeServiceCreateArgs} args - Arguments to create a SchemeService. - * @example - * // Create one SchemeService - * const SchemeService = await prisma.schemeService.create({ - * data: { - * // ... data to create a SchemeService - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__SchemeServiceClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many SchemeServices. - * @param {SchemeServiceCreateManyArgs} args - Arguments to create many SchemeServices. - * @example - * // Create many SchemeServices - * const schemeService = await prisma.schemeService.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many SchemeServices and returns the data saved in the database. - * @param {SchemeServiceCreateManyAndReturnArgs} args - Arguments to create many SchemeServices. - * @example - * // Create many SchemeServices - * const schemeService = await prisma.schemeService.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many SchemeServices and only return the `id` - * const schemeServiceWithIdOnly = await prisma.schemeService.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a SchemeService. - * @param {SchemeServiceDeleteArgs} args - Arguments to delete one SchemeService. - * @example - * // Delete one SchemeService - * const SchemeService = await prisma.schemeService.delete({ - * where: { - * // ... filter to delete one SchemeService - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__SchemeServiceClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one SchemeService. - * @param {SchemeServiceUpdateArgs} args - Arguments to update one SchemeService. - * @example - * // Update one SchemeService - * const schemeService = await prisma.schemeService.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__SchemeServiceClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more SchemeServices. - * @param {SchemeServiceDeleteManyArgs} args - Arguments to filter SchemeServices to delete. - * @example - * // Delete a few SchemeServices - * const { count } = await prisma.schemeService.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more SchemeServices. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SchemeServiceUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many SchemeServices - * const schemeService = await prisma.schemeService.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more SchemeServices and returns the data updated in the database. - * @param {SchemeServiceUpdateManyAndReturnArgs} args - Arguments to update many SchemeServices. - * @example - * // Update many SchemeServices - * const schemeService = await prisma.schemeService.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more SchemeServices and only return the `id` - * const schemeServiceWithIdOnly = await prisma.schemeService.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one SchemeService. - * @param {SchemeServiceUpsertArgs} args - Arguments to update or create a SchemeService. - * @example - * // Update or create a SchemeService - * const schemeService = await prisma.schemeService.upsert({ - * create: { - * // ... data to create a SchemeService - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the SchemeService we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__SchemeServiceClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of SchemeServices. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SchemeServiceCountArgs} args - Arguments to filter SchemeServices to count. - * @example - * // Count the number of SchemeServices - * const count = await prisma.schemeService.count({ - * where: { - * // ... the filter for the SchemeServices we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a SchemeService. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SchemeServiceAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by SchemeService. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SchemeServiceGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends SchemeServiceGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: SchemeServiceGroupByArgs['orderBy'] } - : { orderBy?: SchemeServiceGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSchemeServiceGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the SchemeService model - */ - readonly fields: SchemeServiceFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for SchemeService. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__SchemeServiceClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - admin = {}>(args?: Subset>): Prisma__AdminClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - contacts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - documents = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the SchemeService model - */ - interface SchemeServiceFieldRefs { - readonly id: FieldRef<"SchemeService", 'Int'> - readonly name: FieldRef<"SchemeService", 'String'> - readonly summary: FieldRef<"SchemeService", 'String'> - readonly type: FieldRef<"SchemeService", 'String'> - readonly targetAudience: FieldRef<"SchemeService", 'String[]'> - readonly applicationMode: FieldRef<"SchemeService", 'String'> - readonly onlineUrl: FieldRef<"SchemeService", 'String'> - readonly offlineAddress: FieldRef<"SchemeService", 'String'> - readonly status: FieldRef<"SchemeService", 'String'> - readonly isActive: FieldRef<"SchemeService", 'Boolean'> - readonly createdAt: FieldRef<"SchemeService", 'DateTime'> - readonly updatedAt: FieldRef<"SchemeService", 'DateTime'> - readonly adminId: FieldRef<"SchemeService", 'Int'> - readonly eligibilityDetails: FieldRef<"SchemeService", 'String[]'> - readonly schemeDetails: FieldRef<"SchemeService", 'String[]'> - readonly processDetails: FieldRef<"SchemeService", 'String[]'> - readonly processNew: FieldRef<"SchemeService", 'String'> - readonly processUpdate: FieldRef<"SchemeService", 'String'> - readonly processLost: FieldRef<"SchemeService", 'String'> - readonly processSurrender: FieldRef<"SchemeService", 'String'> - readonly docNew: FieldRef<"SchemeService", 'String'> - readonly docUpdate: FieldRef<"SchemeService", 'String'> - readonly docLost: FieldRef<"SchemeService", 'String'> - readonly docSurrender: FieldRef<"SchemeService", 'String'> - } - - - // Custom InputTypes - /** - * SchemeService findUnique - */ - export type SchemeServiceFindUniqueArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - /** - * Filter, which SchemeService to fetch. - */ - where: SchemeServiceWhereUniqueInput - } - - /** - * SchemeService findUniqueOrThrow - */ - export type SchemeServiceFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - /** - * Filter, which SchemeService to fetch. - */ - where: SchemeServiceWhereUniqueInput - } - - /** - * SchemeService findFirst - */ - export type SchemeServiceFindFirstArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - /** - * Filter, which SchemeService to fetch. - */ - where?: SchemeServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SchemeServices to fetch. - */ - orderBy?: SchemeServiceOrderByWithRelationInput | SchemeServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SchemeServices. - */ - cursor?: SchemeServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SchemeServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SchemeServices. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SchemeServices. - */ - distinct?: SchemeServiceScalarFieldEnum | SchemeServiceScalarFieldEnum[] - } - - /** - * SchemeService findFirstOrThrow - */ - export type SchemeServiceFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - /** - * Filter, which SchemeService to fetch. - */ - where?: SchemeServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SchemeServices to fetch. - */ - orderBy?: SchemeServiceOrderByWithRelationInput | SchemeServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SchemeServices. - */ - cursor?: SchemeServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SchemeServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SchemeServices. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SchemeServices. - */ - distinct?: SchemeServiceScalarFieldEnum | SchemeServiceScalarFieldEnum[] - } - - /** - * SchemeService findMany - */ - export type SchemeServiceFindManyArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - /** - * Filter, which SchemeServices to fetch. - */ - where?: SchemeServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SchemeServices to fetch. - */ - orderBy?: SchemeServiceOrderByWithRelationInput | SchemeServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing SchemeServices. - */ - cursor?: SchemeServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SchemeServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SchemeServices. - */ - skip?: number - distinct?: SchemeServiceScalarFieldEnum | SchemeServiceScalarFieldEnum[] - } - - /** - * SchemeService create - */ - export type SchemeServiceCreateArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - /** - * The data needed to create a SchemeService. - */ - data: XOR - } - - /** - * SchemeService createMany - */ - export type SchemeServiceCreateManyArgs = { - /** - * The data used to create many SchemeServices. - */ - data: SchemeServiceCreateManyInput | SchemeServiceCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * SchemeService createManyAndReturn - */ - export type SchemeServiceCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelectCreateManyAndReturn | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * The data used to create many SchemeServices. - */ - data: SchemeServiceCreateManyInput | SchemeServiceCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceIncludeCreateManyAndReturn | null - } - - /** - * SchemeService update - */ - export type SchemeServiceUpdateArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - /** - * The data needed to update a SchemeService. - */ - data: XOR - /** - * Choose, which SchemeService to update. - */ - where: SchemeServiceWhereUniqueInput - } - - /** - * SchemeService updateMany - */ - export type SchemeServiceUpdateManyArgs = { - /** - * The data used to update SchemeServices. - */ - data: XOR - /** - * Filter which SchemeServices to update - */ - where?: SchemeServiceWhereInput - /** - * Limit how many SchemeServices to update. - */ - limit?: number - } - - /** - * SchemeService updateManyAndReturn - */ - export type SchemeServiceUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * The data used to update SchemeServices. - */ - data: XOR - /** - * Filter which SchemeServices to update - */ - where?: SchemeServiceWhereInput - /** - * Limit how many SchemeServices to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceIncludeUpdateManyAndReturn | null - } - - /** - * SchemeService upsert - */ - export type SchemeServiceUpsertArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - /** - * The filter to search for the SchemeService to update in case it exists. - */ - where: SchemeServiceWhereUniqueInput - /** - * In case the SchemeService found by the `where` argument doesn't exist, create a new SchemeService with this data. - */ - create: XOR - /** - * In case the SchemeService was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * SchemeService delete - */ - export type SchemeServiceDeleteArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - /** - * Filter which SchemeService to delete. - */ - where: SchemeServiceWhereUniqueInput - } - - /** - * SchemeService deleteMany - */ - export type SchemeServiceDeleteManyArgs = { - /** - * Filter which SchemeServices to delete - */ - where?: SchemeServiceWhereInput - /** - * Limit how many SchemeServices to delete. - */ - limit?: number - } - - /** - * SchemeService.contacts - */ - export type SchemeService$contactsArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - where?: ContactPersonWhereInput - orderBy?: ContactPersonOrderByWithRelationInput | ContactPersonOrderByWithRelationInput[] - cursor?: ContactPersonWhereUniqueInput - take?: number - skip?: number - distinct?: ContactPersonScalarFieldEnum | ContactPersonScalarFieldEnum[] - } - - /** - * SchemeService.documents - */ - export type SchemeService$documentsArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - where?: SupportiveDocumentWhereInput - orderBy?: SupportiveDocumentOrderByWithRelationInput | SupportiveDocumentOrderByWithRelationInput[] - cursor?: SupportiveDocumentWhereUniqueInput - take?: number - skip?: number - distinct?: SupportiveDocumentScalarFieldEnum | SupportiveDocumentScalarFieldEnum[] - } - - /** - * SchemeService without action - */ - export type SchemeServiceDefaultArgs = { - /** - * Select specific fields to fetch from the SchemeService - */ - select?: SchemeServiceSelect | null - /** - * Omit specific fields from the SchemeService - */ - omit?: SchemeServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SchemeServiceInclude | null - } - - - /** - * Model ContactPerson - */ - - export type AggregateContactPerson = { - _count: ContactPersonCountAggregateOutputType | null - _avg: ContactPersonAvgAggregateOutputType | null - _sum: ContactPersonSumAggregateOutputType | null - _min: ContactPersonMinAggregateOutputType | null - _max: ContactPersonMaxAggregateOutputType | null - } - - export type ContactPersonAvgAggregateOutputType = { - id: number | null - schemeServiceId: number | null - } - - export type ContactPersonSumAggregateOutputType = { - id: number | null - schemeServiceId: number | null - } - - export type ContactPersonMinAggregateOutputType = { - id: number | null - serviceName: string | null - district: string | null - subDistrict: string | null - block: string | null - name: string | null - designation: string | null - contact: string | null - email: string | null - schemeServiceId: number | null - } - - export type ContactPersonMaxAggregateOutputType = { - id: number | null - serviceName: string | null - district: string | null - subDistrict: string | null - block: string | null - name: string | null - designation: string | null - contact: string | null - email: string | null - schemeServiceId: number | null - } - - export type ContactPersonCountAggregateOutputType = { - id: number - serviceName: number - district: number - subDistrict: number - block: number - name: number - designation: number - contact: number - email: number - schemeServiceId: number - _all: number - } - - - export type ContactPersonAvgAggregateInputType = { - id?: true - schemeServiceId?: true - } - - export type ContactPersonSumAggregateInputType = { - id?: true - schemeServiceId?: true - } - - export type ContactPersonMinAggregateInputType = { - id?: true - serviceName?: true - district?: true - subDistrict?: true - block?: true - name?: true - designation?: true - contact?: true - email?: true - schemeServiceId?: true - } - - export type ContactPersonMaxAggregateInputType = { - id?: true - serviceName?: true - district?: true - subDistrict?: true - block?: true - name?: true - designation?: true - contact?: true - email?: true - schemeServiceId?: true - } - - export type ContactPersonCountAggregateInputType = { - id?: true - serviceName?: true - district?: true - subDistrict?: true - block?: true - name?: true - designation?: true - contact?: true - email?: true - schemeServiceId?: true - _all?: true - } - - export type ContactPersonAggregateArgs = { - /** - * Filter which ContactPerson to aggregate. - */ - where?: ContactPersonWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactPeople to fetch. - */ - orderBy?: ContactPersonOrderByWithRelationInput | ContactPersonOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: ContactPersonWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactPeople from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactPeople. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned ContactPeople - **/ - _count?: true | ContactPersonCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ContactPersonAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ContactPersonSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ContactPersonMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ContactPersonMaxAggregateInputType - } - - export type GetContactPersonAggregateType = { - [P in keyof T & keyof AggregateContactPerson]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type ContactPersonGroupByArgs = { - where?: ContactPersonWhereInput - orderBy?: ContactPersonOrderByWithAggregationInput | ContactPersonOrderByWithAggregationInput[] - by: ContactPersonScalarFieldEnum[] | ContactPersonScalarFieldEnum - having?: ContactPersonScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ContactPersonCountAggregateInputType | true - _avg?: ContactPersonAvgAggregateInputType - _sum?: ContactPersonSumAggregateInputType - _min?: ContactPersonMinAggregateInputType - _max?: ContactPersonMaxAggregateInputType - } - - export type ContactPersonGroupByOutputType = { - id: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - schemeServiceId: number - _count: ContactPersonCountAggregateOutputType | null - _avg: ContactPersonAvgAggregateOutputType | null - _sum: ContactPersonSumAggregateOutputType | null - _min: ContactPersonMinAggregateOutputType | null - _max: ContactPersonMaxAggregateOutputType | null - } - - type GetContactPersonGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof ContactPersonGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type ContactPersonSelect = $Extensions.GetSelect<{ - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - schemeServiceId?: boolean - schemeService?: boolean | SchemeServiceDefaultArgs - }, ExtArgs["result"]["contactPerson"]> - - export type ContactPersonSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - schemeServiceId?: boolean - schemeService?: boolean | SchemeServiceDefaultArgs - }, ExtArgs["result"]["contactPerson"]> - - export type ContactPersonSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - schemeServiceId?: boolean - schemeService?: boolean | SchemeServiceDefaultArgs - }, ExtArgs["result"]["contactPerson"]> - - export type ContactPersonSelectScalar = { - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - schemeServiceId?: boolean - } - - export type ContactPersonOmit = $Extensions.GetOmit<"id" | "serviceName" | "district" | "subDistrict" | "block" | "name" | "designation" | "contact" | "email" | "schemeServiceId", ExtArgs["result"]["contactPerson"]> - export type ContactPersonInclude = { - schemeService?: boolean | SchemeServiceDefaultArgs - } - export type ContactPersonIncludeCreateManyAndReturn = { - schemeService?: boolean | SchemeServiceDefaultArgs - } - export type ContactPersonIncludeUpdateManyAndReturn = { - schemeService?: boolean | SchemeServiceDefaultArgs - } - - export type $ContactPersonPayload = { - name: "ContactPerson" - objects: { - schemeService: Prisma.$SchemeServicePayload - } - scalars: $Extensions.GetPayloadResult<{ - id: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - schemeServiceId: number - }, ExtArgs["result"]["contactPerson"]> - composites: {} - } - - type ContactPersonGetPayload = $Result.GetResult - - type ContactPersonCountArgs = - Omit & { - select?: ContactPersonCountAggregateInputType | true - } - - export interface ContactPersonDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['ContactPerson'], meta: { name: 'ContactPerson' } } - /** - * Find zero or one ContactPerson that matches the filter. - * @param {ContactPersonFindUniqueArgs} args - Arguments to find a ContactPerson - * @example - * // Get one ContactPerson - * const contactPerson = await prisma.contactPerson.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__ContactPersonClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one ContactPerson that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ContactPersonFindUniqueOrThrowArgs} args - Arguments to find a ContactPerson - * @example - * // Get one ContactPerson - * const contactPerson = await prisma.contactPerson.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__ContactPersonClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ContactPerson that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactPersonFindFirstArgs} args - Arguments to find a ContactPerson - * @example - * // Get one ContactPerson - * const contactPerson = await prisma.contactPerson.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__ContactPersonClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ContactPerson that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactPersonFindFirstOrThrowArgs} args - Arguments to find a ContactPerson - * @example - * // Get one ContactPerson - * const contactPerson = await prisma.contactPerson.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__ContactPersonClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more ContactPeople that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactPersonFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all ContactPeople - * const contactPeople = await prisma.contactPerson.findMany() - * - * // Get first 10 ContactPeople - * const contactPeople = await prisma.contactPerson.findMany({ take: 10 }) - * - * // Only select the `id` - * const contactPersonWithIdOnly = await prisma.contactPerson.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a ContactPerson. - * @param {ContactPersonCreateArgs} args - Arguments to create a ContactPerson. - * @example - * // Create one ContactPerson - * const ContactPerson = await prisma.contactPerson.create({ - * data: { - * // ... data to create a ContactPerson - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__ContactPersonClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many ContactPeople. - * @param {ContactPersonCreateManyArgs} args - Arguments to create many ContactPeople. - * @example - * // Create many ContactPeople - * const contactPerson = await prisma.contactPerson.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many ContactPeople and returns the data saved in the database. - * @param {ContactPersonCreateManyAndReturnArgs} args - Arguments to create many ContactPeople. - * @example - * // Create many ContactPeople - * const contactPerson = await prisma.contactPerson.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many ContactPeople and only return the `id` - * const contactPersonWithIdOnly = await prisma.contactPerson.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a ContactPerson. - * @param {ContactPersonDeleteArgs} args - Arguments to delete one ContactPerson. - * @example - * // Delete one ContactPerson - * const ContactPerson = await prisma.contactPerson.delete({ - * where: { - * // ... filter to delete one ContactPerson - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__ContactPersonClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one ContactPerson. - * @param {ContactPersonUpdateArgs} args - Arguments to update one ContactPerson. - * @example - * // Update one ContactPerson - * const contactPerson = await prisma.contactPerson.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__ContactPersonClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more ContactPeople. - * @param {ContactPersonDeleteManyArgs} args - Arguments to filter ContactPeople to delete. - * @example - * // Delete a few ContactPeople - * const { count } = await prisma.contactPerson.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ContactPeople. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactPersonUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many ContactPeople - * const contactPerson = await prisma.contactPerson.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ContactPeople and returns the data updated in the database. - * @param {ContactPersonUpdateManyAndReturnArgs} args - Arguments to update many ContactPeople. - * @example - * // Update many ContactPeople - * const contactPerson = await prisma.contactPerson.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more ContactPeople and only return the `id` - * const contactPersonWithIdOnly = await prisma.contactPerson.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one ContactPerson. - * @param {ContactPersonUpsertArgs} args - Arguments to update or create a ContactPerson. - * @example - * // Update or create a ContactPerson - * const contactPerson = await prisma.contactPerson.upsert({ - * create: { - * // ... data to create a ContactPerson - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the ContactPerson we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__ContactPersonClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of ContactPeople. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactPersonCountArgs} args - Arguments to filter ContactPeople to count. - * @example - * // Count the number of ContactPeople - * const count = await prisma.contactPerson.count({ - * where: { - * // ... the filter for the ContactPeople we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a ContactPerson. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactPersonAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by ContactPerson. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactPersonGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ContactPersonGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ContactPersonGroupByArgs['orderBy'] } - : { orderBy?: ContactPersonGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetContactPersonGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the ContactPerson model - */ - readonly fields: ContactPersonFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for ContactPerson. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__ContactPersonClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - schemeService = {}>(args?: Subset>): Prisma__SchemeServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the ContactPerson model - */ - interface ContactPersonFieldRefs { - readonly id: FieldRef<"ContactPerson", 'Int'> - readonly serviceName: FieldRef<"ContactPerson", 'String'> - readonly district: FieldRef<"ContactPerson", 'String'> - readonly subDistrict: FieldRef<"ContactPerson", 'String'> - readonly block: FieldRef<"ContactPerson", 'String'> - readonly name: FieldRef<"ContactPerson", 'String'> - readonly designation: FieldRef<"ContactPerson", 'String'> - readonly contact: FieldRef<"ContactPerson", 'String'> - readonly email: FieldRef<"ContactPerson", 'String'> - readonly schemeServiceId: FieldRef<"ContactPerson", 'Int'> - } - - - // Custom InputTypes - /** - * ContactPerson findUnique - */ - export type ContactPersonFindUniqueArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - /** - * Filter, which ContactPerson to fetch. - */ - where: ContactPersonWhereUniqueInput - } - - /** - * ContactPerson findUniqueOrThrow - */ - export type ContactPersonFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - /** - * Filter, which ContactPerson to fetch. - */ - where: ContactPersonWhereUniqueInput - } - - /** - * ContactPerson findFirst - */ - export type ContactPersonFindFirstArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - /** - * Filter, which ContactPerson to fetch. - */ - where?: ContactPersonWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactPeople to fetch. - */ - orderBy?: ContactPersonOrderByWithRelationInput | ContactPersonOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ContactPeople. - */ - cursor?: ContactPersonWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactPeople from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactPeople. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ContactPeople. - */ - distinct?: ContactPersonScalarFieldEnum | ContactPersonScalarFieldEnum[] - } - - /** - * ContactPerson findFirstOrThrow - */ - export type ContactPersonFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - /** - * Filter, which ContactPerson to fetch. - */ - where?: ContactPersonWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactPeople to fetch. - */ - orderBy?: ContactPersonOrderByWithRelationInput | ContactPersonOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ContactPeople. - */ - cursor?: ContactPersonWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactPeople from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactPeople. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ContactPeople. - */ - distinct?: ContactPersonScalarFieldEnum | ContactPersonScalarFieldEnum[] - } - - /** - * ContactPerson findMany - */ - export type ContactPersonFindManyArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - /** - * Filter, which ContactPeople to fetch. - */ - where?: ContactPersonWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactPeople to fetch. - */ - orderBy?: ContactPersonOrderByWithRelationInput | ContactPersonOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing ContactPeople. - */ - cursor?: ContactPersonWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactPeople from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactPeople. - */ - skip?: number - distinct?: ContactPersonScalarFieldEnum | ContactPersonScalarFieldEnum[] - } - - /** - * ContactPerson create - */ - export type ContactPersonCreateArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - /** - * The data needed to create a ContactPerson. - */ - data: XOR - } - - /** - * ContactPerson createMany - */ - export type ContactPersonCreateManyArgs = { - /** - * The data used to create many ContactPeople. - */ - data: ContactPersonCreateManyInput | ContactPersonCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * ContactPerson createManyAndReturn - */ - export type ContactPersonCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelectCreateManyAndReturn | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * The data used to create many ContactPeople. - */ - data: ContactPersonCreateManyInput | ContactPersonCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonIncludeCreateManyAndReturn | null - } - - /** - * ContactPerson update - */ - export type ContactPersonUpdateArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - /** - * The data needed to update a ContactPerson. - */ - data: XOR - /** - * Choose, which ContactPerson to update. - */ - where: ContactPersonWhereUniqueInput - } - - /** - * ContactPerson updateMany - */ - export type ContactPersonUpdateManyArgs = { - /** - * The data used to update ContactPeople. - */ - data: XOR - /** - * Filter which ContactPeople to update - */ - where?: ContactPersonWhereInput - /** - * Limit how many ContactPeople to update. - */ - limit?: number - } - - /** - * ContactPerson updateManyAndReturn - */ - export type ContactPersonUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * The data used to update ContactPeople. - */ - data: XOR - /** - * Filter which ContactPeople to update - */ - where?: ContactPersonWhereInput - /** - * Limit how many ContactPeople to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonIncludeUpdateManyAndReturn | null - } - - /** - * ContactPerson upsert - */ - export type ContactPersonUpsertArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - /** - * The filter to search for the ContactPerson to update in case it exists. - */ - where: ContactPersonWhereUniqueInput - /** - * In case the ContactPerson found by the `where` argument doesn't exist, create a new ContactPerson with this data. - */ - create: XOR - /** - * In case the ContactPerson was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * ContactPerson delete - */ - export type ContactPersonDeleteArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - /** - * Filter which ContactPerson to delete. - */ - where: ContactPersonWhereUniqueInput - } - - /** - * ContactPerson deleteMany - */ - export type ContactPersonDeleteManyArgs = { - /** - * Filter which ContactPeople to delete - */ - where?: ContactPersonWhereInput - /** - * Limit how many ContactPeople to delete. - */ - limit?: number - } - - /** - * ContactPerson without action - */ - export type ContactPersonDefaultArgs = { - /** - * Select specific fields to fetch from the ContactPerson - */ - select?: ContactPersonSelect | null - /** - * Omit specific fields from the ContactPerson - */ - omit?: ContactPersonOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactPersonInclude | null - } - - - /** - * Model SupportiveDocument - */ - - export type AggregateSupportiveDocument = { - _count: SupportiveDocumentCountAggregateOutputType | null - _avg: SupportiveDocumentAvgAggregateOutputType | null - _sum: SupportiveDocumentSumAggregateOutputType | null - _min: SupportiveDocumentMinAggregateOutputType | null - _max: SupportiveDocumentMaxAggregateOutputType | null - } - - export type SupportiveDocumentAvgAggregateOutputType = { - id: number | null - slNo: number | null - schemeServiceId: number | null - } - - export type SupportiveDocumentSumAggregateOutputType = { - id: number | null - slNo: number | null - schemeServiceId: number | null - } - - export type SupportiveDocumentMinAggregateOutputType = { - id: number | null - slNo: number | null - documentType: string | null - validProof: string | null - isRequired: boolean | null - schemeServiceId: number | null - } - - export type SupportiveDocumentMaxAggregateOutputType = { - id: number | null - slNo: number | null - documentType: string | null - validProof: string | null - isRequired: boolean | null - schemeServiceId: number | null - } - - export type SupportiveDocumentCountAggregateOutputType = { - id: number - slNo: number - documentType: number - validProof: number - isRequired: number - schemeServiceId: number - _all: number - } - - - export type SupportiveDocumentAvgAggregateInputType = { - id?: true - slNo?: true - schemeServiceId?: true - } - - export type SupportiveDocumentSumAggregateInputType = { - id?: true - slNo?: true - schemeServiceId?: true - } - - export type SupportiveDocumentMinAggregateInputType = { - id?: true - slNo?: true - documentType?: true - validProof?: true - isRequired?: true - schemeServiceId?: true - } - - export type SupportiveDocumentMaxAggregateInputType = { - id?: true - slNo?: true - documentType?: true - validProof?: true - isRequired?: true - schemeServiceId?: true - } - - export type SupportiveDocumentCountAggregateInputType = { - id?: true - slNo?: true - documentType?: true - validProof?: true - isRequired?: true - schemeServiceId?: true - _all?: true - } - - export type SupportiveDocumentAggregateArgs = { - /** - * Filter which SupportiveDocument to aggregate. - */ - where?: SupportiveDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SupportiveDocuments to fetch. - */ - orderBy?: SupportiveDocumentOrderByWithRelationInput | SupportiveDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: SupportiveDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SupportiveDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SupportiveDocuments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned SupportiveDocuments - **/ - _count?: true | SupportiveDocumentCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: SupportiveDocumentAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: SupportiveDocumentSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: SupportiveDocumentMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: SupportiveDocumentMaxAggregateInputType - } - - export type GetSupportiveDocumentAggregateType = { - [P in keyof T & keyof AggregateSupportiveDocument]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type SupportiveDocumentGroupByArgs = { - where?: SupportiveDocumentWhereInput - orderBy?: SupportiveDocumentOrderByWithAggregationInput | SupportiveDocumentOrderByWithAggregationInput[] - by: SupportiveDocumentScalarFieldEnum[] | SupportiveDocumentScalarFieldEnum - having?: SupportiveDocumentScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: SupportiveDocumentCountAggregateInputType | true - _avg?: SupportiveDocumentAvgAggregateInputType - _sum?: SupportiveDocumentSumAggregateInputType - _min?: SupportiveDocumentMinAggregateInputType - _max?: SupportiveDocumentMaxAggregateInputType - } - - export type SupportiveDocumentGroupByOutputType = { - id: number - slNo: number - documentType: string - validProof: string - isRequired: boolean - schemeServiceId: number - _count: SupportiveDocumentCountAggregateOutputType | null - _avg: SupportiveDocumentAvgAggregateOutputType | null - _sum: SupportiveDocumentSumAggregateOutputType | null - _min: SupportiveDocumentMinAggregateOutputType | null - _max: SupportiveDocumentMaxAggregateOutputType | null - } - - type GetSupportiveDocumentGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof SupportiveDocumentGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type SupportiveDocumentSelect = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - schemeServiceId?: boolean - schemeService?: boolean | SchemeServiceDefaultArgs - }, ExtArgs["result"]["supportiveDocument"]> - - export type SupportiveDocumentSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - schemeServiceId?: boolean - schemeService?: boolean | SchemeServiceDefaultArgs - }, ExtArgs["result"]["supportiveDocument"]> - - export type SupportiveDocumentSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - schemeServiceId?: boolean - schemeService?: boolean | SchemeServiceDefaultArgs - }, ExtArgs["result"]["supportiveDocument"]> - - export type SupportiveDocumentSelectScalar = { - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - schemeServiceId?: boolean - } - - export type SupportiveDocumentOmit = $Extensions.GetOmit<"id" | "slNo" | "documentType" | "validProof" | "isRequired" | "schemeServiceId", ExtArgs["result"]["supportiveDocument"]> - export type SupportiveDocumentInclude = { - schemeService?: boolean | SchemeServiceDefaultArgs - } - export type SupportiveDocumentIncludeCreateManyAndReturn = { - schemeService?: boolean | SchemeServiceDefaultArgs - } - export type SupportiveDocumentIncludeUpdateManyAndReturn = { - schemeService?: boolean | SchemeServiceDefaultArgs - } - - export type $SupportiveDocumentPayload = { - name: "SupportiveDocument" - objects: { - schemeService: Prisma.$SchemeServicePayload - } - scalars: $Extensions.GetPayloadResult<{ - id: number - slNo: number - documentType: string - validProof: string - isRequired: boolean - schemeServiceId: number - }, ExtArgs["result"]["supportiveDocument"]> - composites: {} - } - - type SupportiveDocumentGetPayload = $Result.GetResult - - type SupportiveDocumentCountArgs = - Omit & { - select?: SupportiveDocumentCountAggregateInputType | true - } - - export interface SupportiveDocumentDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['SupportiveDocument'], meta: { name: 'SupportiveDocument' } } - /** - * Find zero or one SupportiveDocument that matches the filter. - * @param {SupportiveDocumentFindUniqueArgs} args - Arguments to find a SupportiveDocument - * @example - * // Get one SupportiveDocument - * const supportiveDocument = await prisma.supportiveDocument.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__SupportiveDocumentClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one SupportiveDocument that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {SupportiveDocumentFindUniqueOrThrowArgs} args - Arguments to find a SupportiveDocument - * @example - * // Get one SupportiveDocument - * const supportiveDocument = await prisma.supportiveDocument.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__SupportiveDocumentClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first SupportiveDocument that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupportiveDocumentFindFirstArgs} args - Arguments to find a SupportiveDocument - * @example - * // Get one SupportiveDocument - * const supportiveDocument = await prisma.supportiveDocument.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__SupportiveDocumentClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first SupportiveDocument that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupportiveDocumentFindFirstOrThrowArgs} args - Arguments to find a SupportiveDocument - * @example - * // Get one SupportiveDocument - * const supportiveDocument = await prisma.supportiveDocument.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__SupportiveDocumentClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more SupportiveDocuments that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupportiveDocumentFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all SupportiveDocuments - * const supportiveDocuments = await prisma.supportiveDocument.findMany() - * - * // Get first 10 SupportiveDocuments - * const supportiveDocuments = await prisma.supportiveDocument.findMany({ take: 10 }) - * - * // Only select the `id` - * const supportiveDocumentWithIdOnly = await prisma.supportiveDocument.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a SupportiveDocument. - * @param {SupportiveDocumentCreateArgs} args - Arguments to create a SupportiveDocument. - * @example - * // Create one SupportiveDocument - * const SupportiveDocument = await prisma.supportiveDocument.create({ - * data: { - * // ... data to create a SupportiveDocument - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__SupportiveDocumentClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many SupportiveDocuments. - * @param {SupportiveDocumentCreateManyArgs} args - Arguments to create many SupportiveDocuments. - * @example - * // Create many SupportiveDocuments - * const supportiveDocument = await prisma.supportiveDocument.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many SupportiveDocuments and returns the data saved in the database. - * @param {SupportiveDocumentCreateManyAndReturnArgs} args - Arguments to create many SupportiveDocuments. - * @example - * // Create many SupportiveDocuments - * const supportiveDocument = await prisma.supportiveDocument.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many SupportiveDocuments and only return the `id` - * const supportiveDocumentWithIdOnly = await prisma.supportiveDocument.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a SupportiveDocument. - * @param {SupportiveDocumentDeleteArgs} args - Arguments to delete one SupportiveDocument. - * @example - * // Delete one SupportiveDocument - * const SupportiveDocument = await prisma.supportiveDocument.delete({ - * where: { - * // ... filter to delete one SupportiveDocument - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__SupportiveDocumentClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one SupportiveDocument. - * @param {SupportiveDocumentUpdateArgs} args - Arguments to update one SupportiveDocument. - * @example - * // Update one SupportiveDocument - * const supportiveDocument = await prisma.supportiveDocument.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__SupportiveDocumentClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more SupportiveDocuments. - * @param {SupportiveDocumentDeleteManyArgs} args - Arguments to filter SupportiveDocuments to delete. - * @example - * // Delete a few SupportiveDocuments - * const { count } = await prisma.supportiveDocument.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more SupportiveDocuments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupportiveDocumentUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many SupportiveDocuments - * const supportiveDocument = await prisma.supportiveDocument.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more SupportiveDocuments and returns the data updated in the database. - * @param {SupportiveDocumentUpdateManyAndReturnArgs} args - Arguments to update many SupportiveDocuments. - * @example - * // Update many SupportiveDocuments - * const supportiveDocument = await prisma.supportiveDocument.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more SupportiveDocuments and only return the `id` - * const supportiveDocumentWithIdOnly = await prisma.supportiveDocument.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one SupportiveDocument. - * @param {SupportiveDocumentUpsertArgs} args - Arguments to update or create a SupportiveDocument. - * @example - * // Update or create a SupportiveDocument - * const supportiveDocument = await prisma.supportiveDocument.upsert({ - * create: { - * // ... data to create a SupportiveDocument - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the SupportiveDocument we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__SupportiveDocumentClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of SupportiveDocuments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupportiveDocumentCountArgs} args - Arguments to filter SupportiveDocuments to count. - * @example - * // Count the number of SupportiveDocuments - * const count = await prisma.supportiveDocument.count({ - * where: { - * // ... the filter for the SupportiveDocuments we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a SupportiveDocument. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupportiveDocumentAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by SupportiveDocument. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupportiveDocumentGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends SupportiveDocumentGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: SupportiveDocumentGroupByArgs['orderBy'] } - : { orderBy?: SupportiveDocumentGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSupportiveDocumentGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the SupportiveDocument model - */ - readonly fields: SupportiveDocumentFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for SupportiveDocument. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__SupportiveDocumentClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - schemeService = {}>(args?: Subset>): Prisma__SchemeServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the SupportiveDocument model - */ - interface SupportiveDocumentFieldRefs { - readonly id: FieldRef<"SupportiveDocument", 'Int'> - readonly slNo: FieldRef<"SupportiveDocument", 'Int'> - readonly documentType: FieldRef<"SupportiveDocument", 'String'> - readonly validProof: FieldRef<"SupportiveDocument", 'String'> - readonly isRequired: FieldRef<"SupportiveDocument", 'Boolean'> - readonly schemeServiceId: FieldRef<"SupportiveDocument", 'Int'> - } - - - // Custom InputTypes - /** - * SupportiveDocument findUnique - */ - export type SupportiveDocumentFindUniqueArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - /** - * Filter, which SupportiveDocument to fetch. - */ - where: SupportiveDocumentWhereUniqueInput - } - - /** - * SupportiveDocument findUniqueOrThrow - */ - export type SupportiveDocumentFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - /** - * Filter, which SupportiveDocument to fetch. - */ - where: SupportiveDocumentWhereUniqueInput - } - - /** - * SupportiveDocument findFirst - */ - export type SupportiveDocumentFindFirstArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - /** - * Filter, which SupportiveDocument to fetch. - */ - where?: SupportiveDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SupportiveDocuments to fetch. - */ - orderBy?: SupportiveDocumentOrderByWithRelationInput | SupportiveDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SupportiveDocuments. - */ - cursor?: SupportiveDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SupportiveDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SupportiveDocuments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SupportiveDocuments. - */ - distinct?: SupportiveDocumentScalarFieldEnum | SupportiveDocumentScalarFieldEnum[] - } - - /** - * SupportiveDocument findFirstOrThrow - */ - export type SupportiveDocumentFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - /** - * Filter, which SupportiveDocument to fetch. - */ - where?: SupportiveDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SupportiveDocuments to fetch. - */ - orderBy?: SupportiveDocumentOrderByWithRelationInput | SupportiveDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SupportiveDocuments. - */ - cursor?: SupportiveDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SupportiveDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SupportiveDocuments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SupportiveDocuments. - */ - distinct?: SupportiveDocumentScalarFieldEnum | SupportiveDocumentScalarFieldEnum[] - } - - /** - * SupportiveDocument findMany - */ - export type SupportiveDocumentFindManyArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - /** - * Filter, which SupportiveDocuments to fetch. - */ - where?: SupportiveDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SupportiveDocuments to fetch. - */ - orderBy?: SupportiveDocumentOrderByWithRelationInput | SupportiveDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing SupportiveDocuments. - */ - cursor?: SupportiveDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SupportiveDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SupportiveDocuments. - */ - skip?: number - distinct?: SupportiveDocumentScalarFieldEnum | SupportiveDocumentScalarFieldEnum[] - } - - /** - * SupportiveDocument create - */ - export type SupportiveDocumentCreateArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - /** - * The data needed to create a SupportiveDocument. - */ - data: XOR - } - - /** - * SupportiveDocument createMany - */ - export type SupportiveDocumentCreateManyArgs = { - /** - * The data used to create many SupportiveDocuments. - */ - data: SupportiveDocumentCreateManyInput | SupportiveDocumentCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * SupportiveDocument createManyAndReturn - */ - export type SupportiveDocumentCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelectCreateManyAndReturn | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * The data used to create many SupportiveDocuments. - */ - data: SupportiveDocumentCreateManyInput | SupportiveDocumentCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentIncludeCreateManyAndReturn | null - } - - /** - * SupportiveDocument update - */ - export type SupportiveDocumentUpdateArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - /** - * The data needed to update a SupportiveDocument. - */ - data: XOR - /** - * Choose, which SupportiveDocument to update. - */ - where: SupportiveDocumentWhereUniqueInput - } - - /** - * SupportiveDocument updateMany - */ - export type SupportiveDocumentUpdateManyArgs = { - /** - * The data used to update SupportiveDocuments. - */ - data: XOR - /** - * Filter which SupportiveDocuments to update - */ - where?: SupportiveDocumentWhereInput - /** - * Limit how many SupportiveDocuments to update. - */ - limit?: number - } - - /** - * SupportiveDocument updateManyAndReturn - */ - export type SupportiveDocumentUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * The data used to update SupportiveDocuments. - */ - data: XOR - /** - * Filter which SupportiveDocuments to update - */ - where?: SupportiveDocumentWhereInput - /** - * Limit how many SupportiveDocuments to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentIncludeUpdateManyAndReturn | null - } - - /** - * SupportiveDocument upsert - */ - export type SupportiveDocumentUpsertArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - /** - * The filter to search for the SupportiveDocument to update in case it exists. - */ - where: SupportiveDocumentWhereUniqueInput - /** - * In case the SupportiveDocument found by the `where` argument doesn't exist, create a new SupportiveDocument with this data. - */ - create: XOR - /** - * In case the SupportiveDocument was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * SupportiveDocument delete - */ - export type SupportiveDocumentDeleteArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - /** - * Filter which SupportiveDocument to delete. - */ - where: SupportiveDocumentWhereUniqueInput - } - - /** - * SupportiveDocument deleteMany - */ - export type SupportiveDocumentDeleteManyArgs = { - /** - * Filter which SupportiveDocuments to delete - */ - where?: SupportiveDocumentWhereInput - /** - * Limit how many SupportiveDocuments to delete. - */ - limit?: number - } - - /** - * SupportiveDocument without action - */ - export type SupportiveDocumentDefaultArgs = { - /** - * Select specific fields to fetch from the SupportiveDocument - */ - select?: SupportiveDocumentSelect | null - /** - * Omit specific fields from the SupportiveDocument - */ - omit?: SupportiveDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SupportiveDocumentInclude | null - } - - - /** - * Model CertificateService - */ - - export type AggregateCertificateService = { - _count: CertificateServiceCountAggregateOutputType | null - _avg: CertificateServiceAvgAggregateOutputType | null - _sum: CertificateServiceSumAggregateOutputType | null - _min: CertificateServiceMinAggregateOutputType | null - _max: CertificateServiceMaxAggregateOutputType | null - } - - export type CertificateServiceAvgAggregateOutputType = { - id: number | null - adminId: number | null - } - - export type CertificateServiceSumAggregateOutputType = { - id: number | null - adminId: number | null - } - - export type CertificateServiceMinAggregateOutputType = { - id: number | null - name: string | null - summary: string | null - type: string | null - applicationMode: string | null - onlineUrl: string | null - offlineAddress: string | null - status: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - adminId: number | null - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - } - - export type CertificateServiceMaxAggregateOutputType = { - id: number | null - name: string | null - summary: string | null - type: string | null - applicationMode: string | null - onlineUrl: string | null - offlineAddress: string | null - status: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - adminId: number | null - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - } - - export type CertificateServiceCountAggregateOutputType = { - id: number - name: number - summary: number - type: number - targetAudience: number - applicationMode: number - onlineUrl: number - offlineAddress: number - status: number - isActive: number - createdAt: number - updatedAt: number - adminId: number - eligibilityDetails: number - certificateDetails: number - processDetails: number - processNew: number - processUpdate: number - processLost: number - processSurrender: number - docNew: number - docUpdate: number - docLost: number - docSurrender: number - _all: number - } - - - export type CertificateServiceAvgAggregateInputType = { - id?: true - adminId?: true - } - - export type CertificateServiceSumAggregateInputType = { - id?: true - adminId?: true - } - - export type CertificateServiceMinAggregateInputType = { - id?: true - name?: true - summary?: true - type?: true - applicationMode?: true - onlineUrl?: true - offlineAddress?: true - status?: true - isActive?: true - createdAt?: true - updatedAt?: true - adminId?: true - processNew?: true - processUpdate?: true - processLost?: true - processSurrender?: true - docNew?: true - docUpdate?: true - docLost?: true - docSurrender?: true - } - - export type CertificateServiceMaxAggregateInputType = { - id?: true - name?: true - summary?: true - type?: true - applicationMode?: true - onlineUrl?: true - offlineAddress?: true - status?: true - isActive?: true - createdAt?: true - updatedAt?: true - adminId?: true - processNew?: true - processUpdate?: true - processLost?: true - processSurrender?: true - docNew?: true - docUpdate?: true - docLost?: true - docSurrender?: true - } - - export type CertificateServiceCountAggregateInputType = { - id?: true - name?: true - summary?: true - type?: true - targetAudience?: true - applicationMode?: true - onlineUrl?: true - offlineAddress?: true - status?: true - isActive?: true - createdAt?: true - updatedAt?: true - adminId?: true - eligibilityDetails?: true - certificateDetails?: true - processDetails?: true - processNew?: true - processUpdate?: true - processLost?: true - processSurrender?: true - docNew?: true - docUpdate?: true - docLost?: true - docSurrender?: true - _all?: true - } - - export type CertificateServiceAggregateArgs = { - /** - * Filter which CertificateService to aggregate. - */ - where?: CertificateServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateServices to fetch. - */ - orderBy?: CertificateServiceOrderByWithRelationInput | CertificateServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: CertificateServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateServices. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned CertificateServices - **/ - _count?: true | CertificateServiceCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: CertificateServiceAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: CertificateServiceSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: CertificateServiceMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: CertificateServiceMaxAggregateInputType - } - - export type GetCertificateServiceAggregateType = { - [P in keyof T & keyof AggregateCertificateService]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type CertificateServiceGroupByArgs = { - where?: CertificateServiceWhereInput - orderBy?: CertificateServiceOrderByWithAggregationInput | CertificateServiceOrderByWithAggregationInput[] - by: CertificateServiceScalarFieldEnum[] | CertificateServiceScalarFieldEnum - having?: CertificateServiceScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: CertificateServiceCountAggregateInputType | true - _avg?: CertificateServiceAvgAggregateInputType - _sum?: CertificateServiceSumAggregateInputType - _min?: CertificateServiceMinAggregateInputType - _max?: CertificateServiceMaxAggregateInputType - } - - export type CertificateServiceGroupByOutputType = { - id: number - name: string - summary: string - type: string | null - targetAudience: string[] - applicationMode: string - onlineUrl: string | null - offlineAddress: string | null - status: string - isActive: boolean - createdAt: Date - updatedAt: Date - adminId: number - eligibilityDetails: string[] - certificateDetails: string[] - processDetails: string[] - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - _count: CertificateServiceCountAggregateOutputType | null - _avg: CertificateServiceAvgAggregateOutputType | null - _sum: CertificateServiceSumAggregateOutputType | null - _min: CertificateServiceMinAggregateOutputType | null - _max: CertificateServiceMaxAggregateOutputType | null - } - - type GetCertificateServiceGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof CertificateServiceGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type CertificateServiceSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - certificateDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - admin?: boolean | AdminDefaultArgs - contacts?: boolean | CertificateService$contactsArgs - documents?: boolean | CertificateService$documentsArgs - processSteps?: boolean | CertificateService$processStepsArgs - eligibilityItems?: boolean | CertificateService$eligibilityItemsArgs - _count?: boolean | CertificateServiceCountOutputTypeDefaultArgs - }, ExtArgs["result"]["certificateService"]> - - export type CertificateServiceSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - certificateDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - admin?: boolean | AdminDefaultArgs - }, ExtArgs["result"]["certificateService"]> - - export type CertificateServiceSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - certificateDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - admin?: boolean | AdminDefaultArgs - }, ExtArgs["result"]["certificateService"]> - - export type CertificateServiceSelectScalar = { - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - certificateDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - } - - export type CertificateServiceOmit = $Extensions.GetOmit<"id" | "name" | "summary" | "type" | "targetAudience" | "applicationMode" | "onlineUrl" | "offlineAddress" | "status" | "isActive" | "createdAt" | "updatedAt" | "adminId" | "eligibilityDetails" | "certificateDetails" | "processDetails" | "processNew" | "processUpdate" | "processLost" | "processSurrender" | "docNew" | "docUpdate" | "docLost" | "docSurrender", ExtArgs["result"]["certificateService"]> - export type CertificateServiceInclude = { - admin?: boolean | AdminDefaultArgs - contacts?: boolean | CertificateService$contactsArgs - documents?: boolean | CertificateService$documentsArgs - processSteps?: boolean | CertificateService$processStepsArgs - eligibilityItems?: boolean | CertificateService$eligibilityItemsArgs - _count?: boolean | CertificateServiceCountOutputTypeDefaultArgs - } - export type CertificateServiceIncludeCreateManyAndReturn = { - admin?: boolean | AdminDefaultArgs - } - export type CertificateServiceIncludeUpdateManyAndReturn = { - admin?: boolean | AdminDefaultArgs - } - - export type $CertificateServicePayload = { - name: "CertificateService" - objects: { - admin: Prisma.$AdminPayload - contacts: Prisma.$CertificateContactPayload[] - documents: Prisma.$CertificateDocumentPayload[] - processSteps: Prisma.$CertificateProcessStepPayload[] - eligibilityItems: Prisma.$CertificateEligibilityPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: number - name: string - summary: string - type: string | null - targetAudience: string[] - applicationMode: string - onlineUrl: string | null - offlineAddress: string | null - status: string - isActive: boolean - createdAt: Date - updatedAt: Date - adminId: number - eligibilityDetails: string[] - certificateDetails: string[] - processDetails: string[] - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - }, ExtArgs["result"]["certificateService"]> - composites: {} - } - - type CertificateServiceGetPayload = $Result.GetResult - - type CertificateServiceCountArgs = - Omit & { - select?: CertificateServiceCountAggregateInputType | true - } - - export interface CertificateServiceDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['CertificateService'], meta: { name: 'CertificateService' } } - /** - * Find zero or one CertificateService that matches the filter. - * @param {CertificateServiceFindUniqueArgs} args - Arguments to find a CertificateService - * @example - * // Get one CertificateService - * const certificateService = await prisma.certificateService.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one CertificateService that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {CertificateServiceFindUniqueOrThrowArgs} args - Arguments to find a CertificateService - * @example - * // Get one CertificateService - * const certificateService = await prisma.certificateService.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first CertificateService that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateServiceFindFirstArgs} args - Arguments to find a CertificateService - * @example - * // Get one CertificateService - * const certificateService = await prisma.certificateService.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first CertificateService that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateServiceFindFirstOrThrowArgs} args - Arguments to find a CertificateService - * @example - * // Get one CertificateService - * const certificateService = await prisma.certificateService.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more CertificateServices that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateServiceFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all CertificateServices - * const certificateServices = await prisma.certificateService.findMany() - * - * // Get first 10 CertificateServices - * const certificateServices = await prisma.certificateService.findMany({ take: 10 }) - * - * // Only select the `id` - * const certificateServiceWithIdOnly = await prisma.certificateService.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a CertificateService. - * @param {CertificateServiceCreateArgs} args - Arguments to create a CertificateService. - * @example - * // Create one CertificateService - * const CertificateService = await prisma.certificateService.create({ - * data: { - * // ... data to create a CertificateService - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many CertificateServices. - * @param {CertificateServiceCreateManyArgs} args - Arguments to create many CertificateServices. - * @example - * // Create many CertificateServices - * const certificateService = await prisma.certificateService.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many CertificateServices and returns the data saved in the database. - * @param {CertificateServiceCreateManyAndReturnArgs} args - Arguments to create many CertificateServices. - * @example - * // Create many CertificateServices - * const certificateService = await prisma.certificateService.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many CertificateServices and only return the `id` - * const certificateServiceWithIdOnly = await prisma.certificateService.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a CertificateService. - * @param {CertificateServiceDeleteArgs} args - Arguments to delete one CertificateService. - * @example - * // Delete one CertificateService - * const CertificateService = await prisma.certificateService.delete({ - * where: { - * // ... filter to delete one CertificateService - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one CertificateService. - * @param {CertificateServiceUpdateArgs} args - Arguments to update one CertificateService. - * @example - * // Update one CertificateService - * const certificateService = await prisma.certificateService.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more CertificateServices. - * @param {CertificateServiceDeleteManyArgs} args - Arguments to filter CertificateServices to delete. - * @example - * // Delete a few CertificateServices - * const { count } = await prisma.certificateService.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more CertificateServices. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateServiceUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many CertificateServices - * const certificateService = await prisma.certificateService.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more CertificateServices and returns the data updated in the database. - * @param {CertificateServiceUpdateManyAndReturnArgs} args - Arguments to update many CertificateServices. - * @example - * // Update many CertificateServices - * const certificateService = await prisma.certificateService.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more CertificateServices and only return the `id` - * const certificateServiceWithIdOnly = await prisma.certificateService.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one CertificateService. - * @param {CertificateServiceUpsertArgs} args - Arguments to update or create a CertificateService. - * @example - * // Update or create a CertificateService - * const certificateService = await prisma.certificateService.upsert({ - * create: { - * // ... data to create a CertificateService - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the CertificateService we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of CertificateServices. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateServiceCountArgs} args - Arguments to filter CertificateServices to count. - * @example - * // Count the number of CertificateServices - * const count = await prisma.certificateService.count({ - * where: { - * // ... the filter for the CertificateServices we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a CertificateService. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateServiceAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by CertificateService. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateServiceGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends CertificateServiceGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: CertificateServiceGroupByArgs['orderBy'] } - : { orderBy?: CertificateServiceGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCertificateServiceGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the CertificateService model - */ - readonly fields: CertificateServiceFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for CertificateService. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__CertificateServiceClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - admin = {}>(args?: Subset>): Prisma__AdminClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - contacts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - documents = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - processSteps = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - eligibilityItems = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the CertificateService model - */ - interface CertificateServiceFieldRefs { - readonly id: FieldRef<"CertificateService", 'Int'> - readonly name: FieldRef<"CertificateService", 'String'> - readonly summary: FieldRef<"CertificateService", 'String'> - readonly type: FieldRef<"CertificateService", 'String'> - readonly targetAudience: FieldRef<"CertificateService", 'String[]'> - readonly applicationMode: FieldRef<"CertificateService", 'String'> - readonly onlineUrl: FieldRef<"CertificateService", 'String'> - readonly offlineAddress: FieldRef<"CertificateService", 'String'> - readonly status: FieldRef<"CertificateService", 'String'> - readonly isActive: FieldRef<"CertificateService", 'Boolean'> - readonly createdAt: FieldRef<"CertificateService", 'DateTime'> - readonly updatedAt: FieldRef<"CertificateService", 'DateTime'> - readonly adminId: FieldRef<"CertificateService", 'Int'> - readonly eligibilityDetails: FieldRef<"CertificateService", 'String[]'> - readonly certificateDetails: FieldRef<"CertificateService", 'String[]'> - readonly processDetails: FieldRef<"CertificateService", 'String[]'> - readonly processNew: FieldRef<"CertificateService", 'String'> - readonly processUpdate: FieldRef<"CertificateService", 'String'> - readonly processLost: FieldRef<"CertificateService", 'String'> - readonly processSurrender: FieldRef<"CertificateService", 'String'> - readonly docNew: FieldRef<"CertificateService", 'String'> - readonly docUpdate: FieldRef<"CertificateService", 'String'> - readonly docLost: FieldRef<"CertificateService", 'String'> - readonly docSurrender: FieldRef<"CertificateService", 'String'> - } - - - // Custom InputTypes - /** - * CertificateService findUnique - */ - export type CertificateServiceFindUniqueArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - /** - * Filter, which CertificateService to fetch. - */ - where: CertificateServiceWhereUniqueInput - } - - /** - * CertificateService findUniqueOrThrow - */ - export type CertificateServiceFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - /** - * Filter, which CertificateService to fetch. - */ - where: CertificateServiceWhereUniqueInput - } - - /** - * CertificateService findFirst - */ - export type CertificateServiceFindFirstArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - /** - * Filter, which CertificateService to fetch. - */ - where?: CertificateServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateServices to fetch. - */ - orderBy?: CertificateServiceOrderByWithRelationInput | CertificateServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CertificateServices. - */ - cursor?: CertificateServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateServices. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CertificateServices. - */ - distinct?: CertificateServiceScalarFieldEnum | CertificateServiceScalarFieldEnum[] - } - - /** - * CertificateService findFirstOrThrow - */ - export type CertificateServiceFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - /** - * Filter, which CertificateService to fetch. - */ - where?: CertificateServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateServices to fetch. - */ - orderBy?: CertificateServiceOrderByWithRelationInput | CertificateServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CertificateServices. - */ - cursor?: CertificateServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateServices. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CertificateServices. - */ - distinct?: CertificateServiceScalarFieldEnum | CertificateServiceScalarFieldEnum[] - } - - /** - * CertificateService findMany - */ - export type CertificateServiceFindManyArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - /** - * Filter, which CertificateServices to fetch. - */ - where?: CertificateServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateServices to fetch. - */ - orderBy?: CertificateServiceOrderByWithRelationInput | CertificateServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing CertificateServices. - */ - cursor?: CertificateServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateServices. - */ - skip?: number - distinct?: CertificateServiceScalarFieldEnum | CertificateServiceScalarFieldEnum[] - } - - /** - * CertificateService create - */ - export type CertificateServiceCreateArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - /** - * The data needed to create a CertificateService. - */ - data: XOR - } - - /** - * CertificateService createMany - */ - export type CertificateServiceCreateManyArgs = { - /** - * The data used to create many CertificateServices. - */ - data: CertificateServiceCreateManyInput | CertificateServiceCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * CertificateService createManyAndReturn - */ - export type CertificateServiceCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelectCreateManyAndReturn | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * The data used to create many CertificateServices. - */ - data: CertificateServiceCreateManyInput | CertificateServiceCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceIncludeCreateManyAndReturn | null - } - - /** - * CertificateService update - */ - export type CertificateServiceUpdateArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - /** - * The data needed to update a CertificateService. - */ - data: XOR - /** - * Choose, which CertificateService to update. - */ - where: CertificateServiceWhereUniqueInput - } - - /** - * CertificateService updateMany - */ - export type CertificateServiceUpdateManyArgs = { - /** - * The data used to update CertificateServices. - */ - data: XOR - /** - * Filter which CertificateServices to update - */ - where?: CertificateServiceWhereInput - /** - * Limit how many CertificateServices to update. - */ - limit?: number - } - - /** - * CertificateService updateManyAndReturn - */ - export type CertificateServiceUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * The data used to update CertificateServices. - */ - data: XOR - /** - * Filter which CertificateServices to update - */ - where?: CertificateServiceWhereInput - /** - * Limit how many CertificateServices to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceIncludeUpdateManyAndReturn | null - } - - /** - * CertificateService upsert - */ - export type CertificateServiceUpsertArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - /** - * The filter to search for the CertificateService to update in case it exists. - */ - where: CertificateServiceWhereUniqueInput - /** - * In case the CertificateService found by the `where` argument doesn't exist, create a new CertificateService with this data. - */ - create: XOR - /** - * In case the CertificateService was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * CertificateService delete - */ - export type CertificateServiceDeleteArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - /** - * Filter which CertificateService to delete. - */ - where: CertificateServiceWhereUniqueInput - } - - /** - * CertificateService deleteMany - */ - export type CertificateServiceDeleteManyArgs = { - /** - * Filter which CertificateServices to delete - */ - where?: CertificateServiceWhereInput - /** - * Limit how many CertificateServices to delete. - */ - limit?: number - } - - /** - * CertificateService.contacts - */ - export type CertificateService$contactsArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - where?: CertificateContactWhereInput - orderBy?: CertificateContactOrderByWithRelationInput | CertificateContactOrderByWithRelationInput[] - cursor?: CertificateContactWhereUniqueInput - take?: number - skip?: number - distinct?: CertificateContactScalarFieldEnum | CertificateContactScalarFieldEnum[] - } - - /** - * CertificateService.documents - */ - export type CertificateService$documentsArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - where?: CertificateDocumentWhereInput - orderBy?: CertificateDocumentOrderByWithRelationInput | CertificateDocumentOrderByWithRelationInput[] - cursor?: CertificateDocumentWhereUniqueInput - take?: number - skip?: number - distinct?: CertificateDocumentScalarFieldEnum | CertificateDocumentScalarFieldEnum[] - } - - /** - * CertificateService.processSteps - */ - export type CertificateService$processStepsArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - where?: CertificateProcessStepWhereInput - orderBy?: CertificateProcessStepOrderByWithRelationInput | CertificateProcessStepOrderByWithRelationInput[] - cursor?: CertificateProcessStepWhereUniqueInput - take?: number - skip?: number - distinct?: CertificateProcessStepScalarFieldEnum | CertificateProcessStepScalarFieldEnum[] - } - - /** - * CertificateService.eligibilityItems - */ - export type CertificateService$eligibilityItemsArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - where?: CertificateEligibilityWhereInput - orderBy?: CertificateEligibilityOrderByWithRelationInput | CertificateEligibilityOrderByWithRelationInput[] - cursor?: CertificateEligibilityWhereUniqueInput - take?: number - skip?: number - distinct?: CertificateEligibilityScalarFieldEnum | CertificateEligibilityScalarFieldEnum[] - } - - /** - * CertificateService without action - */ - export type CertificateServiceDefaultArgs = { - /** - * Select specific fields to fetch from the CertificateService - */ - select?: CertificateServiceSelect | null - /** - * Omit specific fields from the CertificateService - */ - omit?: CertificateServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateServiceInclude | null - } - - - /** - * Model CertificateContact - */ - - export type AggregateCertificateContact = { - _count: CertificateContactCountAggregateOutputType | null - _avg: CertificateContactAvgAggregateOutputType | null - _sum: CertificateContactSumAggregateOutputType | null - _min: CertificateContactMinAggregateOutputType | null - _max: CertificateContactMaxAggregateOutputType | null - } - - export type CertificateContactAvgAggregateOutputType = { - id: number | null - certificateServiceId: number | null - } - - export type CertificateContactSumAggregateOutputType = { - id: number | null - certificateServiceId: number | null - } - - export type CertificateContactMinAggregateOutputType = { - id: number | null - serviceName: string | null - district: string | null - subDistrict: string | null - block: string | null - name: string | null - designation: string | null - contact: string | null - email: string | null - applicationType: string | null - certificateServiceId: number | null - } - - export type CertificateContactMaxAggregateOutputType = { - id: number | null - serviceName: string | null - district: string | null - subDistrict: string | null - block: string | null - name: string | null - designation: string | null - contact: string | null - email: string | null - applicationType: string | null - certificateServiceId: number | null - } - - export type CertificateContactCountAggregateOutputType = { - id: number - serviceName: number - district: number - subDistrict: number - block: number - name: number - designation: number - contact: number - email: number - applicationType: number - certificateServiceId: number - _all: number - } - - - export type CertificateContactAvgAggregateInputType = { - id?: true - certificateServiceId?: true - } - - export type CertificateContactSumAggregateInputType = { - id?: true - certificateServiceId?: true - } - - export type CertificateContactMinAggregateInputType = { - id?: true - serviceName?: true - district?: true - subDistrict?: true - block?: true - name?: true - designation?: true - contact?: true - email?: true - applicationType?: true - certificateServiceId?: true - } - - export type CertificateContactMaxAggregateInputType = { - id?: true - serviceName?: true - district?: true - subDistrict?: true - block?: true - name?: true - designation?: true - contact?: true - email?: true - applicationType?: true - certificateServiceId?: true - } - - export type CertificateContactCountAggregateInputType = { - id?: true - serviceName?: true - district?: true - subDistrict?: true - block?: true - name?: true - designation?: true - contact?: true - email?: true - applicationType?: true - certificateServiceId?: true - _all?: true - } - - export type CertificateContactAggregateArgs = { - /** - * Filter which CertificateContact to aggregate. - */ - where?: CertificateContactWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateContacts to fetch. - */ - orderBy?: CertificateContactOrderByWithRelationInput | CertificateContactOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: CertificateContactWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateContacts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateContacts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned CertificateContacts - **/ - _count?: true | CertificateContactCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: CertificateContactAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: CertificateContactSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: CertificateContactMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: CertificateContactMaxAggregateInputType - } - - export type GetCertificateContactAggregateType = { - [P in keyof T & keyof AggregateCertificateContact]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type CertificateContactGroupByArgs = { - where?: CertificateContactWhereInput - orderBy?: CertificateContactOrderByWithAggregationInput | CertificateContactOrderByWithAggregationInput[] - by: CertificateContactScalarFieldEnum[] | CertificateContactScalarFieldEnum - having?: CertificateContactScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: CertificateContactCountAggregateInputType | true - _avg?: CertificateContactAvgAggregateInputType - _sum?: CertificateContactSumAggregateInputType - _min?: CertificateContactMinAggregateInputType - _max?: CertificateContactMaxAggregateInputType - } - - export type CertificateContactGroupByOutputType = { - id: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - applicationType: string - certificateServiceId: number - _count: CertificateContactCountAggregateOutputType | null - _avg: CertificateContactAvgAggregateOutputType | null - _sum: CertificateContactSumAggregateOutputType | null - _min: CertificateContactMinAggregateOutputType | null - _max: CertificateContactMaxAggregateOutputType | null - } - - type GetCertificateContactGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof CertificateContactGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type CertificateContactSelect = $Extensions.GetSelect<{ - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateContact"]> - - export type CertificateContactSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateContact"]> - - export type CertificateContactSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateContact"]> - - export type CertificateContactSelectScalar = { - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - applicationType?: boolean - certificateServiceId?: boolean - } - - export type CertificateContactOmit = $Extensions.GetOmit<"id" | "serviceName" | "district" | "subDistrict" | "block" | "name" | "designation" | "contact" | "email" | "applicationType" | "certificateServiceId", ExtArgs["result"]["certificateContact"]> - export type CertificateContactInclude = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - export type CertificateContactIncludeCreateManyAndReturn = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - export type CertificateContactIncludeUpdateManyAndReturn = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - - export type $CertificateContactPayload = { - name: "CertificateContact" - objects: { - certificateService: Prisma.$CertificateServicePayload - } - scalars: $Extensions.GetPayloadResult<{ - id: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - applicationType: string - certificateServiceId: number - }, ExtArgs["result"]["certificateContact"]> - composites: {} - } - - type CertificateContactGetPayload = $Result.GetResult - - type CertificateContactCountArgs = - Omit & { - select?: CertificateContactCountAggregateInputType | true - } - - export interface CertificateContactDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['CertificateContact'], meta: { name: 'CertificateContact' } } - /** - * Find zero or one CertificateContact that matches the filter. - * @param {CertificateContactFindUniqueArgs} args - Arguments to find a CertificateContact - * @example - * // Get one CertificateContact - * const certificateContact = await prisma.certificateContact.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__CertificateContactClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one CertificateContact that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {CertificateContactFindUniqueOrThrowArgs} args - Arguments to find a CertificateContact - * @example - * // Get one CertificateContact - * const certificateContact = await prisma.certificateContact.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__CertificateContactClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first CertificateContact that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateContactFindFirstArgs} args - Arguments to find a CertificateContact - * @example - * // Get one CertificateContact - * const certificateContact = await prisma.certificateContact.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__CertificateContactClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first CertificateContact that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateContactFindFirstOrThrowArgs} args - Arguments to find a CertificateContact - * @example - * // Get one CertificateContact - * const certificateContact = await prisma.certificateContact.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__CertificateContactClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more CertificateContacts that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateContactFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all CertificateContacts - * const certificateContacts = await prisma.certificateContact.findMany() - * - * // Get first 10 CertificateContacts - * const certificateContacts = await prisma.certificateContact.findMany({ take: 10 }) - * - * // Only select the `id` - * const certificateContactWithIdOnly = await prisma.certificateContact.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a CertificateContact. - * @param {CertificateContactCreateArgs} args - Arguments to create a CertificateContact. - * @example - * // Create one CertificateContact - * const CertificateContact = await prisma.certificateContact.create({ - * data: { - * // ... data to create a CertificateContact - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__CertificateContactClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many CertificateContacts. - * @param {CertificateContactCreateManyArgs} args - Arguments to create many CertificateContacts. - * @example - * // Create many CertificateContacts - * const certificateContact = await prisma.certificateContact.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many CertificateContacts and returns the data saved in the database. - * @param {CertificateContactCreateManyAndReturnArgs} args - Arguments to create many CertificateContacts. - * @example - * // Create many CertificateContacts - * const certificateContact = await prisma.certificateContact.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many CertificateContacts and only return the `id` - * const certificateContactWithIdOnly = await prisma.certificateContact.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a CertificateContact. - * @param {CertificateContactDeleteArgs} args - Arguments to delete one CertificateContact. - * @example - * // Delete one CertificateContact - * const CertificateContact = await prisma.certificateContact.delete({ - * where: { - * // ... filter to delete one CertificateContact - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__CertificateContactClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one CertificateContact. - * @param {CertificateContactUpdateArgs} args - Arguments to update one CertificateContact. - * @example - * // Update one CertificateContact - * const certificateContact = await prisma.certificateContact.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__CertificateContactClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more CertificateContacts. - * @param {CertificateContactDeleteManyArgs} args - Arguments to filter CertificateContacts to delete. - * @example - * // Delete a few CertificateContacts - * const { count } = await prisma.certificateContact.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more CertificateContacts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateContactUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many CertificateContacts - * const certificateContact = await prisma.certificateContact.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more CertificateContacts and returns the data updated in the database. - * @param {CertificateContactUpdateManyAndReturnArgs} args - Arguments to update many CertificateContacts. - * @example - * // Update many CertificateContacts - * const certificateContact = await prisma.certificateContact.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more CertificateContacts and only return the `id` - * const certificateContactWithIdOnly = await prisma.certificateContact.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one CertificateContact. - * @param {CertificateContactUpsertArgs} args - Arguments to update or create a CertificateContact. - * @example - * // Update or create a CertificateContact - * const certificateContact = await prisma.certificateContact.upsert({ - * create: { - * // ... data to create a CertificateContact - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the CertificateContact we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__CertificateContactClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of CertificateContacts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateContactCountArgs} args - Arguments to filter CertificateContacts to count. - * @example - * // Count the number of CertificateContacts - * const count = await prisma.certificateContact.count({ - * where: { - * // ... the filter for the CertificateContacts we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a CertificateContact. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateContactAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by CertificateContact. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateContactGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends CertificateContactGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: CertificateContactGroupByArgs['orderBy'] } - : { orderBy?: CertificateContactGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCertificateContactGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the CertificateContact model - */ - readonly fields: CertificateContactFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for CertificateContact. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__CertificateContactClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - certificateService = {}>(args?: Subset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the CertificateContact model - */ - interface CertificateContactFieldRefs { - readonly id: FieldRef<"CertificateContact", 'Int'> - readonly serviceName: FieldRef<"CertificateContact", 'String'> - readonly district: FieldRef<"CertificateContact", 'String'> - readonly subDistrict: FieldRef<"CertificateContact", 'String'> - readonly block: FieldRef<"CertificateContact", 'String'> - readonly name: FieldRef<"CertificateContact", 'String'> - readonly designation: FieldRef<"CertificateContact", 'String'> - readonly contact: FieldRef<"CertificateContact", 'String'> - readonly email: FieldRef<"CertificateContact", 'String'> - readonly applicationType: FieldRef<"CertificateContact", 'String'> - readonly certificateServiceId: FieldRef<"CertificateContact", 'Int'> - } - - - // Custom InputTypes - /** - * CertificateContact findUnique - */ - export type CertificateContactFindUniqueArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - /** - * Filter, which CertificateContact to fetch. - */ - where: CertificateContactWhereUniqueInput - } - - /** - * CertificateContact findUniqueOrThrow - */ - export type CertificateContactFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - /** - * Filter, which CertificateContact to fetch. - */ - where: CertificateContactWhereUniqueInput - } - - /** - * CertificateContact findFirst - */ - export type CertificateContactFindFirstArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - /** - * Filter, which CertificateContact to fetch. - */ - where?: CertificateContactWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateContacts to fetch. - */ - orderBy?: CertificateContactOrderByWithRelationInput | CertificateContactOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CertificateContacts. - */ - cursor?: CertificateContactWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateContacts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateContacts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CertificateContacts. - */ - distinct?: CertificateContactScalarFieldEnum | CertificateContactScalarFieldEnum[] - } - - /** - * CertificateContact findFirstOrThrow - */ - export type CertificateContactFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - /** - * Filter, which CertificateContact to fetch. - */ - where?: CertificateContactWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateContacts to fetch. - */ - orderBy?: CertificateContactOrderByWithRelationInput | CertificateContactOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CertificateContacts. - */ - cursor?: CertificateContactWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateContacts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateContacts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CertificateContacts. - */ - distinct?: CertificateContactScalarFieldEnum | CertificateContactScalarFieldEnum[] - } - - /** - * CertificateContact findMany - */ - export type CertificateContactFindManyArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - /** - * Filter, which CertificateContacts to fetch. - */ - where?: CertificateContactWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateContacts to fetch. - */ - orderBy?: CertificateContactOrderByWithRelationInput | CertificateContactOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing CertificateContacts. - */ - cursor?: CertificateContactWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateContacts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateContacts. - */ - skip?: number - distinct?: CertificateContactScalarFieldEnum | CertificateContactScalarFieldEnum[] - } - - /** - * CertificateContact create - */ - export type CertificateContactCreateArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - /** - * The data needed to create a CertificateContact. - */ - data: XOR - } - - /** - * CertificateContact createMany - */ - export type CertificateContactCreateManyArgs = { - /** - * The data used to create many CertificateContacts. - */ - data: CertificateContactCreateManyInput | CertificateContactCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * CertificateContact createManyAndReturn - */ - export type CertificateContactCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelectCreateManyAndReturn | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * The data used to create many CertificateContacts. - */ - data: CertificateContactCreateManyInput | CertificateContactCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactIncludeCreateManyAndReturn | null - } - - /** - * CertificateContact update - */ - export type CertificateContactUpdateArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - /** - * The data needed to update a CertificateContact. - */ - data: XOR - /** - * Choose, which CertificateContact to update. - */ - where: CertificateContactWhereUniqueInput - } - - /** - * CertificateContact updateMany - */ - export type CertificateContactUpdateManyArgs = { - /** - * The data used to update CertificateContacts. - */ - data: XOR - /** - * Filter which CertificateContacts to update - */ - where?: CertificateContactWhereInput - /** - * Limit how many CertificateContacts to update. - */ - limit?: number - } - - /** - * CertificateContact updateManyAndReturn - */ - export type CertificateContactUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * The data used to update CertificateContacts. - */ - data: XOR - /** - * Filter which CertificateContacts to update - */ - where?: CertificateContactWhereInput - /** - * Limit how many CertificateContacts to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactIncludeUpdateManyAndReturn | null - } - - /** - * CertificateContact upsert - */ - export type CertificateContactUpsertArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - /** - * The filter to search for the CertificateContact to update in case it exists. - */ - where: CertificateContactWhereUniqueInput - /** - * In case the CertificateContact found by the `where` argument doesn't exist, create a new CertificateContact with this data. - */ - create: XOR - /** - * In case the CertificateContact was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * CertificateContact delete - */ - export type CertificateContactDeleteArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - /** - * Filter which CertificateContact to delete. - */ - where: CertificateContactWhereUniqueInput - } - - /** - * CertificateContact deleteMany - */ - export type CertificateContactDeleteManyArgs = { - /** - * Filter which CertificateContacts to delete - */ - where?: CertificateContactWhereInput - /** - * Limit how many CertificateContacts to delete. - */ - limit?: number - } - - /** - * CertificateContact without action - */ - export type CertificateContactDefaultArgs = { - /** - * Select specific fields to fetch from the CertificateContact - */ - select?: CertificateContactSelect | null - /** - * Omit specific fields from the CertificateContact - */ - omit?: CertificateContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateContactInclude | null - } - - - /** - * Model CertificateDocument - */ - - export type AggregateCertificateDocument = { - _count: CertificateDocumentCountAggregateOutputType | null - _avg: CertificateDocumentAvgAggregateOutputType | null - _sum: CertificateDocumentSumAggregateOutputType | null - _min: CertificateDocumentMinAggregateOutputType | null - _max: CertificateDocumentMaxAggregateOutputType | null - } - - export type CertificateDocumentAvgAggregateOutputType = { - id: number | null - slNo: number | null - certificateServiceId: number | null - } - - export type CertificateDocumentSumAggregateOutputType = { - id: number | null - slNo: number | null - certificateServiceId: number | null - } - - export type CertificateDocumentMinAggregateOutputType = { - id: number | null - slNo: number | null - documentType: string | null - validProof: string | null - isRequired: boolean | null - applicationType: string | null - certificateServiceId: number | null - } - - export type CertificateDocumentMaxAggregateOutputType = { - id: number | null - slNo: number | null - documentType: string | null - validProof: string | null - isRequired: boolean | null - applicationType: string | null - certificateServiceId: number | null - } - - export type CertificateDocumentCountAggregateOutputType = { - id: number - slNo: number - documentType: number - validProof: number - isRequired: number - applicationType: number - certificateServiceId: number - _all: number - } - - - export type CertificateDocumentAvgAggregateInputType = { - id?: true - slNo?: true - certificateServiceId?: true - } - - export type CertificateDocumentSumAggregateInputType = { - id?: true - slNo?: true - certificateServiceId?: true - } - - export type CertificateDocumentMinAggregateInputType = { - id?: true - slNo?: true - documentType?: true - validProof?: true - isRequired?: true - applicationType?: true - certificateServiceId?: true - } - - export type CertificateDocumentMaxAggregateInputType = { - id?: true - slNo?: true - documentType?: true - validProof?: true - isRequired?: true - applicationType?: true - certificateServiceId?: true - } - - export type CertificateDocumentCountAggregateInputType = { - id?: true - slNo?: true - documentType?: true - validProof?: true - isRequired?: true - applicationType?: true - certificateServiceId?: true - _all?: true - } - - export type CertificateDocumentAggregateArgs = { - /** - * Filter which CertificateDocument to aggregate. - */ - where?: CertificateDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateDocuments to fetch. - */ - orderBy?: CertificateDocumentOrderByWithRelationInput | CertificateDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: CertificateDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateDocuments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned CertificateDocuments - **/ - _count?: true | CertificateDocumentCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: CertificateDocumentAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: CertificateDocumentSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: CertificateDocumentMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: CertificateDocumentMaxAggregateInputType - } - - export type GetCertificateDocumentAggregateType = { - [P in keyof T & keyof AggregateCertificateDocument]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type CertificateDocumentGroupByArgs = { - where?: CertificateDocumentWhereInput - orderBy?: CertificateDocumentOrderByWithAggregationInput | CertificateDocumentOrderByWithAggregationInput[] - by: CertificateDocumentScalarFieldEnum[] | CertificateDocumentScalarFieldEnum - having?: CertificateDocumentScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: CertificateDocumentCountAggregateInputType | true - _avg?: CertificateDocumentAvgAggregateInputType - _sum?: CertificateDocumentSumAggregateInputType - _min?: CertificateDocumentMinAggregateInputType - _max?: CertificateDocumentMaxAggregateInputType - } - - export type CertificateDocumentGroupByOutputType = { - id: number - slNo: number - documentType: string - validProof: string - isRequired: boolean - applicationType: string - certificateServiceId: number - _count: CertificateDocumentCountAggregateOutputType | null - _avg: CertificateDocumentAvgAggregateOutputType | null - _sum: CertificateDocumentSumAggregateOutputType | null - _min: CertificateDocumentMinAggregateOutputType | null - _max: CertificateDocumentMaxAggregateOutputType | null - } - - type GetCertificateDocumentGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof CertificateDocumentGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type CertificateDocumentSelect = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateDocument"]> - - export type CertificateDocumentSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateDocument"]> - - export type CertificateDocumentSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateDocument"]> - - export type CertificateDocumentSelectScalar = { - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - applicationType?: boolean - certificateServiceId?: boolean - } - - export type CertificateDocumentOmit = $Extensions.GetOmit<"id" | "slNo" | "documentType" | "validProof" | "isRequired" | "applicationType" | "certificateServiceId", ExtArgs["result"]["certificateDocument"]> - export type CertificateDocumentInclude = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - export type CertificateDocumentIncludeCreateManyAndReturn = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - export type CertificateDocumentIncludeUpdateManyAndReturn = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - - export type $CertificateDocumentPayload = { - name: "CertificateDocument" - objects: { - certificateService: Prisma.$CertificateServicePayload - } - scalars: $Extensions.GetPayloadResult<{ - id: number - slNo: number - documentType: string - validProof: string - isRequired: boolean - applicationType: string - certificateServiceId: number - }, ExtArgs["result"]["certificateDocument"]> - composites: {} - } - - type CertificateDocumentGetPayload = $Result.GetResult - - type CertificateDocumentCountArgs = - Omit & { - select?: CertificateDocumentCountAggregateInputType | true - } - - export interface CertificateDocumentDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['CertificateDocument'], meta: { name: 'CertificateDocument' } } - /** - * Find zero or one CertificateDocument that matches the filter. - * @param {CertificateDocumentFindUniqueArgs} args - Arguments to find a CertificateDocument - * @example - * // Get one CertificateDocument - * const certificateDocument = await prisma.certificateDocument.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__CertificateDocumentClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one CertificateDocument that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {CertificateDocumentFindUniqueOrThrowArgs} args - Arguments to find a CertificateDocument - * @example - * // Get one CertificateDocument - * const certificateDocument = await prisma.certificateDocument.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__CertificateDocumentClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first CertificateDocument that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateDocumentFindFirstArgs} args - Arguments to find a CertificateDocument - * @example - * // Get one CertificateDocument - * const certificateDocument = await prisma.certificateDocument.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__CertificateDocumentClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first CertificateDocument that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateDocumentFindFirstOrThrowArgs} args - Arguments to find a CertificateDocument - * @example - * // Get one CertificateDocument - * const certificateDocument = await prisma.certificateDocument.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__CertificateDocumentClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more CertificateDocuments that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateDocumentFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all CertificateDocuments - * const certificateDocuments = await prisma.certificateDocument.findMany() - * - * // Get first 10 CertificateDocuments - * const certificateDocuments = await prisma.certificateDocument.findMany({ take: 10 }) - * - * // Only select the `id` - * const certificateDocumentWithIdOnly = await prisma.certificateDocument.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a CertificateDocument. - * @param {CertificateDocumentCreateArgs} args - Arguments to create a CertificateDocument. - * @example - * // Create one CertificateDocument - * const CertificateDocument = await prisma.certificateDocument.create({ - * data: { - * // ... data to create a CertificateDocument - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__CertificateDocumentClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many CertificateDocuments. - * @param {CertificateDocumentCreateManyArgs} args - Arguments to create many CertificateDocuments. - * @example - * // Create many CertificateDocuments - * const certificateDocument = await prisma.certificateDocument.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many CertificateDocuments and returns the data saved in the database. - * @param {CertificateDocumentCreateManyAndReturnArgs} args - Arguments to create many CertificateDocuments. - * @example - * // Create many CertificateDocuments - * const certificateDocument = await prisma.certificateDocument.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many CertificateDocuments and only return the `id` - * const certificateDocumentWithIdOnly = await prisma.certificateDocument.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a CertificateDocument. - * @param {CertificateDocumentDeleteArgs} args - Arguments to delete one CertificateDocument. - * @example - * // Delete one CertificateDocument - * const CertificateDocument = await prisma.certificateDocument.delete({ - * where: { - * // ... filter to delete one CertificateDocument - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__CertificateDocumentClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one CertificateDocument. - * @param {CertificateDocumentUpdateArgs} args - Arguments to update one CertificateDocument. - * @example - * // Update one CertificateDocument - * const certificateDocument = await prisma.certificateDocument.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__CertificateDocumentClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more CertificateDocuments. - * @param {CertificateDocumentDeleteManyArgs} args - Arguments to filter CertificateDocuments to delete. - * @example - * // Delete a few CertificateDocuments - * const { count } = await prisma.certificateDocument.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more CertificateDocuments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateDocumentUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many CertificateDocuments - * const certificateDocument = await prisma.certificateDocument.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more CertificateDocuments and returns the data updated in the database. - * @param {CertificateDocumentUpdateManyAndReturnArgs} args - Arguments to update many CertificateDocuments. - * @example - * // Update many CertificateDocuments - * const certificateDocument = await prisma.certificateDocument.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more CertificateDocuments and only return the `id` - * const certificateDocumentWithIdOnly = await prisma.certificateDocument.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one CertificateDocument. - * @param {CertificateDocumentUpsertArgs} args - Arguments to update or create a CertificateDocument. - * @example - * // Update or create a CertificateDocument - * const certificateDocument = await prisma.certificateDocument.upsert({ - * create: { - * // ... data to create a CertificateDocument - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the CertificateDocument we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__CertificateDocumentClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of CertificateDocuments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateDocumentCountArgs} args - Arguments to filter CertificateDocuments to count. - * @example - * // Count the number of CertificateDocuments - * const count = await prisma.certificateDocument.count({ - * where: { - * // ... the filter for the CertificateDocuments we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a CertificateDocument. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateDocumentAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by CertificateDocument. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateDocumentGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends CertificateDocumentGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: CertificateDocumentGroupByArgs['orderBy'] } - : { orderBy?: CertificateDocumentGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCertificateDocumentGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the CertificateDocument model - */ - readonly fields: CertificateDocumentFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for CertificateDocument. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__CertificateDocumentClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - certificateService = {}>(args?: Subset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the CertificateDocument model - */ - interface CertificateDocumentFieldRefs { - readonly id: FieldRef<"CertificateDocument", 'Int'> - readonly slNo: FieldRef<"CertificateDocument", 'Int'> - readonly documentType: FieldRef<"CertificateDocument", 'String'> - readonly validProof: FieldRef<"CertificateDocument", 'String'> - readonly isRequired: FieldRef<"CertificateDocument", 'Boolean'> - readonly applicationType: FieldRef<"CertificateDocument", 'String'> - readonly certificateServiceId: FieldRef<"CertificateDocument", 'Int'> - } - - - // Custom InputTypes - /** - * CertificateDocument findUnique - */ - export type CertificateDocumentFindUniqueArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - /** - * Filter, which CertificateDocument to fetch. - */ - where: CertificateDocumentWhereUniqueInput - } - - /** - * CertificateDocument findUniqueOrThrow - */ - export type CertificateDocumentFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - /** - * Filter, which CertificateDocument to fetch. - */ - where: CertificateDocumentWhereUniqueInput - } - - /** - * CertificateDocument findFirst - */ - export type CertificateDocumentFindFirstArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - /** - * Filter, which CertificateDocument to fetch. - */ - where?: CertificateDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateDocuments to fetch. - */ - orderBy?: CertificateDocumentOrderByWithRelationInput | CertificateDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CertificateDocuments. - */ - cursor?: CertificateDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateDocuments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CertificateDocuments. - */ - distinct?: CertificateDocumentScalarFieldEnum | CertificateDocumentScalarFieldEnum[] - } - - /** - * CertificateDocument findFirstOrThrow - */ - export type CertificateDocumentFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - /** - * Filter, which CertificateDocument to fetch. - */ - where?: CertificateDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateDocuments to fetch. - */ - orderBy?: CertificateDocumentOrderByWithRelationInput | CertificateDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CertificateDocuments. - */ - cursor?: CertificateDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateDocuments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CertificateDocuments. - */ - distinct?: CertificateDocumentScalarFieldEnum | CertificateDocumentScalarFieldEnum[] - } - - /** - * CertificateDocument findMany - */ - export type CertificateDocumentFindManyArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - /** - * Filter, which CertificateDocuments to fetch. - */ - where?: CertificateDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateDocuments to fetch. - */ - orderBy?: CertificateDocumentOrderByWithRelationInput | CertificateDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing CertificateDocuments. - */ - cursor?: CertificateDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateDocuments. - */ - skip?: number - distinct?: CertificateDocumentScalarFieldEnum | CertificateDocumentScalarFieldEnum[] - } - - /** - * CertificateDocument create - */ - export type CertificateDocumentCreateArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - /** - * The data needed to create a CertificateDocument. - */ - data: XOR - } - - /** - * CertificateDocument createMany - */ - export type CertificateDocumentCreateManyArgs = { - /** - * The data used to create many CertificateDocuments. - */ - data: CertificateDocumentCreateManyInput | CertificateDocumentCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * CertificateDocument createManyAndReturn - */ - export type CertificateDocumentCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelectCreateManyAndReturn | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * The data used to create many CertificateDocuments. - */ - data: CertificateDocumentCreateManyInput | CertificateDocumentCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentIncludeCreateManyAndReturn | null - } - - /** - * CertificateDocument update - */ - export type CertificateDocumentUpdateArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - /** - * The data needed to update a CertificateDocument. - */ - data: XOR - /** - * Choose, which CertificateDocument to update. - */ - where: CertificateDocumentWhereUniqueInput - } - - /** - * CertificateDocument updateMany - */ - export type CertificateDocumentUpdateManyArgs = { - /** - * The data used to update CertificateDocuments. - */ - data: XOR - /** - * Filter which CertificateDocuments to update - */ - where?: CertificateDocumentWhereInput - /** - * Limit how many CertificateDocuments to update. - */ - limit?: number - } - - /** - * CertificateDocument updateManyAndReturn - */ - export type CertificateDocumentUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * The data used to update CertificateDocuments. - */ - data: XOR - /** - * Filter which CertificateDocuments to update - */ - where?: CertificateDocumentWhereInput - /** - * Limit how many CertificateDocuments to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentIncludeUpdateManyAndReturn | null - } - - /** - * CertificateDocument upsert - */ - export type CertificateDocumentUpsertArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - /** - * The filter to search for the CertificateDocument to update in case it exists. - */ - where: CertificateDocumentWhereUniqueInput - /** - * In case the CertificateDocument found by the `where` argument doesn't exist, create a new CertificateDocument with this data. - */ - create: XOR - /** - * In case the CertificateDocument was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * CertificateDocument delete - */ - export type CertificateDocumentDeleteArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - /** - * Filter which CertificateDocument to delete. - */ - where: CertificateDocumentWhereUniqueInput - } - - /** - * CertificateDocument deleteMany - */ - export type CertificateDocumentDeleteManyArgs = { - /** - * Filter which CertificateDocuments to delete - */ - where?: CertificateDocumentWhereInput - /** - * Limit how many CertificateDocuments to delete. - */ - limit?: number - } - - /** - * CertificateDocument without action - */ - export type CertificateDocumentDefaultArgs = { - /** - * Select specific fields to fetch from the CertificateDocument - */ - select?: CertificateDocumentSelect | null - /** - * Omit specific fields from the CertificateDocument - */ - omit?: CertificateDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateDocumentInclude | null - } - - - /** - * Model CertificateProcessStep - */ - - export type AggregateCertificateProcessStep = { - _count: CertificateProcessStepCountAggregateOutputType | null - _avg: CertificateProcessStepAvgAggregateOutputType | null - _sum: CertificateProcessStepSumAggregateOutputType | null - _min: CertificateProcessStepMinAggregateOutputType | null - _max: CertificateProcessStepMaxAggregateOutputType | null - } - - export type CertificateProcessStepAvgAggregateOutputType = { - id: number | null - slNo: number | null - certificateServiceId: number | null - } - - export type CertificateProcessStepSumAggregateOutputType = { - id: number | null - slNo: number | null - certificateServiceId: number | null - } - - export type CertificateProcessStepMinAggregateOutputType = { - id: number | null - slNo: number | null - stepDetails: string | null - applicationType: string | null - certificateServiceId: number | null - } - - export type CertificateProcessStepMaxAggregateOutputType = { - id: number | null - slNo: number | null - stepDetails: string | null - applicationType: string | null - certificateServiceId: number | null - } - - export type CertificateProcessStepCountAggregateOutputType = { - id: number - slNo: number - stepDetails: number - applicationType: number - certificateServiceId: number - _all: number - } - - - export type CertificateProcessStepAvgAggregateInputType = { - id?: true - slNo?: true - certificateServiceId?: true - } - - export type CertificateProcessStepSumAggregateInputType = { - id?: true - slNo?: true - certificateServiceId?: true - } - - export type CertificateProcessStepMinAggregateInputType = { - id?: true - slNo?: true - stepDetails?: true - applicationType?: true - certificateServiceId?: true - } - - export type CertificateProcessStepMaxAggregateInputType = { - id?: true - slNo?: true - stepDetails?: true - applicationType?: true - certificateServiceId?: true - } - - export type CertificateProcessStepCountAggregateInputType = { - id?: true - slNo?: true - stepDetails?: true - applicationType?: true - certificateServiceId?: true - _all?: true - } - - export type CertificateProcessStepAggregateArgs = { - /** - * Filter which CertificateProcessStep to aggregate. - */ - where?: CertificateProcessStepWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateProcessSteps to fetch. - */ - orderBy?: CertificateProcessStepOrderByWithRelationInput | CertificateProcessStepOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: CertificateProcessStepWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateProcessSteps from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateProcessSteps. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned CertificateProcessSteps - **/ - _count?: true | CertificateProcessStepCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: CertificateProcessStepAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: CertificateProcessStepSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: CertificateProcessStepMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: CertificateProcessStepMaxAggregateInputType - } - - export type GetCertificateProcessStepAggregateType = { - [P in keyof T & keyof AggregateCertificateProcessStep]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type CertificateProcessStepGroupByArgs = { - where?: CertificateProcessStepWhereInput - orderBy?: CertificateProcessStepOrderByWithAggregationInput | CertificateProcessStepOrderByWithAggregationInput[] - by: CertificateProcessStepScalarFieldEnum[] | CertificateProcessStepScalarFieldEnum - having?: CertificateProcessStepScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: CertificateProcessStepCountAggregateInputType | true - _avg?: CertificateProcessStepAvgAggregateInputType - _sum?: CertificateProcessStepSumAggregateInputType - _min?: CertificateProcessStepMinAggregateInputType - _max?: CertificateProcessStepMaxAggregateInputType - } - - export type CertificateProcessStepGroupByOutputType = { - id: number - slNo: number - stepDetails: string - applicationType: string - certificateServiceId: number - _count: CertificateProcessStepCountAggregateOutputType | null - _avg: CertificateProcessStepAvgAggregateOutputType | null - _sum: CertificateProcessStepSumAggregateOutputType | null - _min: CertificateProcessStepMinAggregateOutputType | null - _max: CertificateProcessStepMaxAggregateOutputType | null - } - - type GetCertificateProcessStepGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof CertificateProcessStepGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type CertificateProcessStepSelect = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - stepDetails?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateProcessStep"]> - - export type CertificateProcessStepSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - stepDetails?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateProcessStep"]> - - export type CertificateProcessStepSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - stepDetails?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateProcessStep"]> - - export type CertificateProcessStepSelectScalar = { - id?: boolean - slNo?: boolean - stepDetails?: boolean - applicationType?: boolean - certificateServiceId?: boolean - } - - export type CertificateProcessStepOmit = $Extensions.GetOmit<"id" | "slNo" | "stepDetails" | "applicationType" | "certificateServiceId", ExtArgs["result"]["certificateProcessStep"]> - export type CertificateProcessStepInclude = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - export type CertificateProcessStepIncludeCreateManyAndReturn = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - export type CertificateProcessStepIncludeUpdateManyAndReturn = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - - export type $CertificateProcessStepPayload = { - name: "CertificateProcessStep" - objects: { - certificateService: Prisma.$CertificateServicePayload - } - scalars: $Extensions.GetPayloadResult<{ - id: number - slNo: number - stepDetails: string - applicationType: string - certificateServiceId: number - }, ExtArgs["result"]["certificateProcessStep"]> - composites: {} - } - - type CertificateProcessStepGetPayload = $Result.GetResult - - type CertificateProcessStepCountArgs = - Omit & { - select?: CertificateProcessStepCountAggregateInputType | true - } - - export interface CertificateProcessStepDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['CertificateProcessStep'], meta: { name: 'CertificateProcessStep' } } - /** - * Find zero or one CertificateProcessStep that matches the filter. - * @param {CertificateProcessStepFindUniqueArgs} args - Arguments to find a CertificateProcessStep - * @example - * // Get one CertificateProcessStep - * const certificateProcessStep = await prisma.certificateProcessStep.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__CertificateProcessStepClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one CertificateProcessStep that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {CertificateProcessStepFindUniqueOrThrowArgs} args - Arguments to find a CertificateProcessStep - * @example - * // Get one CertificateProcessStep - * const certificateProcessStep = await prisma.certificateProcessStep.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__CertificateProcessStepClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first CertificateProcessStep that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateProcessStepFindFirstArgs} args - Arguments to find a CertificateProcessStep - * @example - * // Get one CertificateProcessStep - * const certificateProcessStep = await prisma.certificateProcessStep.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__CertificateProcessStepClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first CertificateProcessStep that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateProcessStepFindFirstOrThrowArgs} args - Arguments to find a CertificateProcessStep - * @example - * // Get one CertificateProcessStep - * const certificateProcessStep = await prisma.certificateProcessStep.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__CertificateProcessStepClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more CertificateProcessSteps that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateProcessStepFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all CertificateProcessSteps - * const certificateProcessSteps = await prisma.certificateProcessStep.findMany() - * - * // Get first 10 CertificateProcessSteps - * const certificateProcessSteps = await prisma.certificateProcessStep.findMany({ take: 10 }) - * - * // Only select the `id` - * const certificateProcessStepWithIdOnly = await prisma.certificateProcessStep.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a CertificateProcessStep. - * @param {CertificateProcessStepCreateArgs} args - Arguments to create a CertificateProcessStep. - * @example - * // Create one CertificateProcessStep - * const CertificateProcessStep = await prisma.certificateProcessStep.create({ - * data: { - * // ... data to create a CertificateProcessStep - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__CertificateProcessStepClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many CertificateProcessSteps. - * @param {CertificateProcessStepCreateManyArgs} args - Arguments to create many CertificateProcessSteps. - * @example - * // Create many CertificateProcessSteps - * const certificateProcessStep = await prisma.certificateProcessStep.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many CertificateProcessSteps and returns the data saved in the database. - * @param {CertificateProcessStepCreateManyAndReturnArgs} args - Arguments to create many CertificateProcessSteps. - * @example - * // Create many CertificateProcessSteps - * const certificateProcessStep = await prisma.certificateProcessStep.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many CertificateProcessSteps and only return the `id` - * const certificateProcessStepWithIdOnly = await prisma.certificateProcessStep.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a CertificateProcessStep. - * @param {CertificateProcessStepDeleteArgs} args - Arguments to delete one CertificateProcessStep. - * @example - * // Delete one CertificateProcessStep - * const CertificateProcessStep = await prisma.certificateProcessStep.delete({ - * where: { - * // ... filter to delete one CertificateProcessStep - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__CertificateProcessStepClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one CertificateProcessStep. - * @param {CertificateProcessStepUpdateArgs} args - Arguments to update one CertificateProcessStep. - * @example - * // Update one CertificateProcessStep - * const certificateProcessStep = await prisma.certificateProcessStep.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__CertificateProcessStepClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more CertificateProcessSteps. - * @param {CertificateProcessStepDeleteManyArgs} args - Arguments to filter CertificateProcessSteps to delete. - * @example - * // Delete a few CertificateProcessSteps - * const { count } = await prisma.certificateProcessStep.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more CertificateProcessSteps. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateProcessStepUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many CertificateProcessSteps - * const certificateProcessStep = await prisma.certificateProcessStep.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more CertificateProcessSteps and returns the data updated in the database. - * @param {CertificateProcessStepUpdateManyAndReturnArgs} args - Arguments to update many CertificateProcessSteps. - * @example - * // Update many CertificateProcessSteps - * const certificateProcessStep = await prisma.certificateProcessStep.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more CertificateProcessSteps and only return the `id` - * const certificateProcessStepWithIdOnly = await prisma.certificateProcessStep.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one CertificateProcessStep. - * @param {CertificateProcessStepUpsertArgs} args - Arguments to update or create a CertificateProcessStep. - * @example - * // Update or create a CertificateProcessStep - * const certificateProcessStep = await prisma.certificateProcessStep.upsert({ - * create: { - * // ... data to create a CertificateProcessStep - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the CertificateProcessStep we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__CertificateProcessStepClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of CertificateProcessSteps. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateProcessStepCountArgs} args - Arguments to filter CertificateProcessSteps to count. - * @example - * // Count the number of CertificateProcessSteps - * const count = await prisma.certificateProcessStep.count({ - * where: { - * // ... the filter for the CertificateProcessSteps we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a CertificateProcessStep. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateProcessStepAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by CertificateProcessStep. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateProcessStepGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends CertificateProcessStepGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: CertificateProcessStepGroupByArgs['orderBy'] } - : { orderBy?: CertificateProcessStepGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCertificateProcessStepGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the CertificateProcessStep model - */ - readonly fields: CertificateProcessStepFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for CertificateProcessStep. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__CertificateProcessStepClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - certificateService = {}>(args?: Subset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the CertificateProcessStep model - */ - interface CertificateProcessStepFieldRefs { - readonly id: FieldRef<"CertificateProcessStep", 'Int'> - readonly slNo: FieldRef<"CertificateProcessStep", 'Int'> - readonly stepDetails: FieldRef<"CertificateProcessStep", 'String'> - readonly applicationType: FieldRef<"CertificateProcessStep", 'String'> - readonly certificateServiceId: FieldRef<"CertificateProcessStep", 'Int'> - } - - - // Custom InputTypes - /** - * CertificateProcessStep findUnique - */ - export type CertificateProcessStepFindUniqueArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - /** - * Filter, which CertificateProcessStep to fetch. - */ - where: CertificateProcessStepWhereUniqueInput - } - - /** - * CertificateProcessStep findUniqueOrThrow - */ - export type CertificateProcessStepFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - /** - * Filter, which CertificateProcessStep to fetch. - */ - where: CertificateProcessStepWhereUniqueInput - } - - /** - * CertificateProcessStep findFirst - */ - export type CertificateProcessStepFindFirstArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - /** - * Filter, which CertificateProcessStep to fetch. - */ - where?: CertificateProcessStepWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateProcessSteps to fetch. - */ - orderBy?: CertificateProcessStepOrderByWithRelationInput | CertificateProcessStepOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CertificateProcessSteps. - */ - cursor?: CertificateProcessStepWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateProcessSteps from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateProcessSteps. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CertificateProcessSteps. - */ - distinct?: CertificateProcessStepScalarFieldEnum | CertificateProcessStepScalarFieldEnum[] - } - - /** - * CertificateProcessStep findFirstOrThrow - */ - export type CertificateProcessStepFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - /** - * Filter, which CertificateProcessStep to fetch. - */ - where?: CertificateProcessStepWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateProcessSteps to fetch. - */ - orderBy?: CertificateProcessStepOrderByWithRelationInput | CertificateProcessStepOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CertificateProcessSteps. - */ - cursor?: CertificateProcessStepWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateProcessSteps from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateProcessSteps. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CertificateProcessSteps. - */ - distinct?: CertificateProcessStepScalarFieldEnum | CertificateProcessStepScalarFieldEnum[] - } - - /** - * CertificateProcessStep findMany - */ - export type CertificateProcessStepFindManyArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - /** - * Filter, which CertificateProcessSteps to fetch. - */ - where?: CertificateProcessStepWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateProcessSteps to fetch. - */ - orderBy?: CertificateProcessStepOrderByWithRelationInput | CertificateProcessStepOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing CertificateProcessSteps. - */ - cursor?: CertificateProcessStepWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateProcessSteps from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateProcessSteps. - */ - skip?: number - distinct?: CertificateProcessStepScalarFieldEnum | CertificateProcessStepScalarFieldEnum[] - } - - /** - * CertificateProcessStep create - */ - export type CertificateProcessStepCreateArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - /** - * The data needed to create a CertificateProcessStep. - */ - data: XOR - } - - /** - * CertificateProcessStep createMany - */ - export type CertificateProcessStepCreateManyArgs = { - /** - * The data used to create many CertificateProcessSteps. - */ - data: CertificateProcessStepCreateManyInput | CertificateProcessStepCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * CertificateProcessStep createManyAndReturn - */ - export type CertificateProcessStepCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelectCreateManyAndReturn | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * The data used to create many CertificateProcessSteps. - */ - data: CertificateProcessStepCreateManyInput | CertificateProcessStepCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepIncludeCreateManyAndReturn | null - } - - /** - * CertificateProcessStep update - */ - export type CertificateProcessStepUpdateArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - /** - * The data needed to update a CertificateProcessStep. - */ - data: XOR - /** - * Choose, which CertificateProcessStep to update. - */ - where: CertificateProcessStepWhereUniqueInput - } - - /** - * CertificateProcessStep updateMany - */ - export type CertificateProcessStepUpdateManyArgs = { - /** - * The data used to update CertificateProcessSteps. - */ - data: XOR - /** - * Filter which CertificateProcessSteps to update - */ - where?: CertificateProcessStepWhereInput - /** - * Limit how many CertificateProcessSteps to update. - */ - limit?: number - } - - /** - * CertificateProcessStep updateManyAndReturn - */ - export type CertificateProcessStepUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * The data used to update CertificateProcessSteps. - */ - data: XOR - /** - * Filter which CertificateProcessSteps to update - */ - where?: CertificateProcessStepWhereInput - /** - * Limit how many CertificateProcessSteps to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepIncludeUpdateManyAndReturn | null - } - - /** - * CertificateProcessStep upsert - */ - export type CertificateProcessStepUpsertArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - /** - * The filter to search for the CertificateProcessStep to update in case it exists. - */ - where: CertificateProcessStepWhereUniqueInput - /** - * In case the CertificateProcessStep found by the `where` argument doesn't exist, create a new CertificateProcessStep with this data. - */ - create: XOR - /** - * In case the CertificateProcessStep was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * CertificateProcessStep delete - */ - export type CertificateProcessStepDeleteArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - /** - * Filter which CertificateProcessStep to delete. - */ - where: CertificateProcessStepWhereUniqueInput - } - - /** - * CertificateProcessStep deleteMany - */ - export type CertificateProcessStepDeleteManyArgs = { - /** - * Filter which CertificateProcessSteps to delete - */ - where?: CertificateProcessStepWhereInput - /** - * Limit how many CertificateProcessSteps to delete. - */ - limit?: number - } - - /** - * CertificateProcessStep without action - */ - export type CertificateProcessStepDefaultArgs = { - /** - * Select specific fields to fetch from the CertificateProcessStep - */ - select?: CertificateProcessStepSelect | null - /** - * Omit specific fields from the CertificateProcessStep - */ - omit?: CertificateProcessStepOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateProcessStepInclude | null - } - - - /** - * Model CertificateEligibility - */ - - export type AggregateCertificateEligibility = { - _count: CertificateEligibilityCountAggregateOutputType | null - _avg: CertificateEligibilityAvgAggregateOutputType | null - _sum: CertificateEligibilitySumAggregateOutputType | null - _min: CertificateEligibilityMinAggregateOutputType | null - _max: CertificateEligibilityMaxAggregateOutputType | null - } - - export type CertificateEligibilityAvgAggregateOutputType = { - id: number | null - certificateServiceId: number | null - } - - export type CertificateEligibilitySumAggregateOutputType = { - id: number | null - certificateServiceId: number | null - } - - export type CertificateEligibilityMinAggregateOutputType = { - id: number | null - eligibilityDetail: string | null - applicationType: string | null - certificateServiceId: number | null - } - - export type CertificateEligibilityMaxAggregateOutputType = { - id: number | null - eligibilityDetail: string | null - applicationType: string | null - certificateServiceId: number | null - } - - export type CertificateEligibilityCountAggregateOutputType = { - id: number - eligibilityDetail: number - applicationType: number - certificateServiceId: number - _all: number - } - - - export type CertificateEligibilityAvgAggregateInputType = { - id?: true - certificateServiceId?: true - } - - export type CertificateEligibilitySumAggregateInputType = { - id?: true - certificateServiceId?: true - } - - export type CertificateEligibilityMinAggregateInputType = { - id?: true - eligibilityDetail?: true - applicationType?: true - certificateServiceId?: true - } - - export type CertificateEligibilityMaxAggregateInputType = { - id?: true - eligibilityDetail?: true - applicationType?: true - certificateServiceId?: true - } - - export type CertificateEligibilityCountAggregateInputType = { - id?: true - eligibilityDetail?: true - applicationType?: true - certificateServiceId?: true - _all?: true - } - - export type CertificateEligibilityAggregateArgs = { - /** - * Filter which CertificateEligibility to aggregate. - */ - where?: CertificateEligibilityWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateEligibilities to fetch. - */ - orderBy?: CertificateEligibilityOrderByWithRelationInput | CertificateEligibilityOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: CertificateEligibilityWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateEligibilities from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateEligibilities. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned CertificateEligibilities - **/ - _count?: true | CertificateEligibilityCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: CertificateEligibilityAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: CertificateEligibilitySumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: CertificateEligibilityMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: CertificateEligibilityMaxAggregateInputType - } - - export type GetCertificateEligibilityAggregateType = { - [P in keyof T & keyof AggregateCertificateEligibility]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type CertificateEligibilityGroupByArgs = { - where?: CertificateEligibilityWhereInput - orderBy?: CertificateEligibilityOrderByWithAggregationInput | CertificateEligibilityOrderByWithAggregationInput[] - by: CertificateEligibilityScalarFieldEnum[] | CertificateEligibilityScalarFieldEnum - having?: CertificateEligibilityScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: CertificateEligibilityCountAggregateInputType | true - _avg?: CertificateEligibilityAvgAggregateInputType - _sum?: CertificateEligibilitySumAggregateInputType - _min?: CertificateEligibilityMinAggregateInputType - _max?: CertificateEligibilityMaxAggregateInputType - } - - export type CertificateEligibilityGroupByOutputType = { - id: number - eligibilityDetail: string - applicationType: string - certificateServiceId: number - _count: CertificateEligibilityCountAggregateOutputType | null - _avg: CertificateEligibilityAvgAggregateOutputType | null - _sum: CertificateEligibilitySumAggregateOutputType | null - _min: CertificateEligibilityMinAggregateOutputType | null - _max: CertificateEligibilityMaxAggregateOutputType | null - } - - type GetCertificateEligibilityGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof CertificateEligibilityGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type CertificateEligibilitySelect = $Extensions.GetSelect<{ - id?: boolean - eligibilityDetail?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateEligibility"]> - - export type CertificateEligibilitySelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - eligibilityDetail?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateEligibility"]> - - export type CertificateEligibilitySelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - eligibilityDetail?: boolean - applicationType?: boolean - certificateServiceId?: boolean - certificateService?: boolean | CertificateServiceDefaultArgs - }, ExtArgs["result"]["certificateEligibility"]> - - export type CertificateEligibilitySelectScalar = { - id?: boolean - eligibilityDetail?: boolean - applicationType?: boolean - certificateServiceId?: boolean - } - - export type CertificateEligibilityOmit = $Extensions.GetOmit<"id" | "eligibilityDetail" | "applicationType" | "certificateServiceId", ExtArgs["result"]["certificateEligibility"]> - export type CertificateEligibilityInclude = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - export type CertificateEligibilityIncludeCreateManyAndReturn = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - export type CertificateEligibilityIncludeUpdateManyAndReturn = { - certificateService?: boolean | CertificateServiceDefaultArgs - } - - export type $CertificateEligibilityPayload = { - name: "CertificateEligibility" - objects: { - certificateService: Prisma.$CertificateServicePayload - } - scalars: $Extensions.GetPayloadResult<{ - id: number - eligibilityDetail: string - applicationType: string - certificateServiceId: number - }, ExtArgs["result"]["certificateEligibility"]> - composites: {} - } - - type CertificateEligibilityGetPayload = $Result.GetResult - - type CertificateEligibilityCountArgs = - Omit & { - select?: CertificateEligibilityCountAggregateInputType | true - } - - export interface CertificateEligibilityDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['CertificateEligibility'], meta: { name: 'CertificateEligibility' } } - /** - * Find zero or one CertificateEligibility that matches the filter. - * @param {CertificateEligibilityFindUniqueArgs} args - Arguments to find a CertificateEligibility - * @example - * // Get one CertificateEligibility - * const certificateEligibility = await prisma.certificateEligibility.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__CertificateEligibilityClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one CertificateEligibility that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {CertificateEligibilityFindUniqueOrThrowArgs} args - Arguments to find a CertificateEligibility - * @example - * // Get one CertificateEligibility - * const certificateEligibility = await prisma.certificateEligibility.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__CertificateEligibilityClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first CertificateEligibility that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateEligibilityFindFirstArgs} args - Arguments to find a CertificateEligibility - * @example - * // Get one CertificateEligibility - * const certificateEligibility = await prisma.certificateEligibility.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__CertificateEligibilityClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first CertificateEligibility that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateEligibilityFindFirstOrThrowArgs} args - Arguments to find a CertificateEligibility - * @example - * // Get one CertificateEligibility - * const certificateEligibility = await prisma.certificateEligibility.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__CertificateEligibilityClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more CertificateEligibilities that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateEligibilityFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all CertificateEligibilities - * const certificateEligibilities = await prisma.certificateEligibility.findMany() - * - * // Get first 10 CertificateEligibilities - * const certificateEligibilities = await prisma.certificateEligibility.findMany({ take: 10 }) - * - * // Only select the `id` - * const certificateEligibilityWithIdOnly = await prisma.certificateEligibility.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a CertificateEligibility. - * @param {CertificateEligibilityCreateArgs} args - Arguments to create a CertificateEligibility. - * @example - * // Create one CertificateEligibility - * const CertificateEligibility = await prisma.certificateEligibility.create({ - * data: { - * // ... data to create a CertificateEligibility - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__CertificateEligibilityClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many CertificateEligibilities. - * @param {CertificateEligibilityCreateManyArgs} args - Arguments to create many CertificateEligibilities. - * @example - * // Create many CertificateEligibilities - * const certificateEligibility = await prisma.certificateEligibility.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many CertificateEligibilities and returns the data saved in the database. - * @param {CertificateEligibilityCreateManyAndReturnArgs} args - Arguments to create many CertificateEligibilities. - * @example - * // Create many CertificateEligibilities - * const certificateEligibility = await prisma.certificateEligibility.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many CertificateEligibilities and only return the `id` - * const certificateEligibilityWithIdOnly = await prisma.certificateEligibility.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a CertificateEligibility. - * @param {CertificateEligibilityDeleteArgs} args - Arguments to delete one CertificateEligibility. - * @example - * // Delete one CertificateEligibility - * const CertificateEligibility = await prisma.certificateEligibility.delete({ - * where: { - * // ... filter to delete one CertificateEligibility - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__CertificateEligibilityClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one CertificateEligibility. - * @param {CertificateEligibilityUpdateArgs} args - Arguments to update one CertificateEligibility. - * @example - * // Update one CertificateEligibility - * const certificateEligibility = await prisma.certificateEligibility.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__CertificateEligibilityClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more CertificateEligibilities. - * @param {CertificateEligibilityDeleteManyArgs} args - Arguments to filter CertificateEligibilities to delete. - * @example - * // Delete a few CertificateEligibilities - * const { count } = await prisma.certificateEligibility.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more CertificateEligibilities. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateEligibilityUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many CertificateEligibilities - * const certificateEligibility = await prisma.certificateEligibility.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more CertificateEligibilities and returns the data updated in the database. - * @param {CertificateEligibilityUpdateManyAndReturnArgs} args - Arguments to update many CertificateEligibilities. - * @example - * // Update many CertificateEligibilities - * const certificateEligibility = await prisma.certificateEligibility.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more CertificateEligibilities and only return the `id` - * const certificateEligibilityWithIdOnly = await prisma.certificateEligibility.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one CertificateEligibility. - * @param {CertificateEligibilityUpsertArgs} args - Arguments to update or create a CertificateEligibility. - * @example - * // Update or create a CertificateEligibility - * const certificateEligibility = await prisma.certificateEligibility.upsert({ - * create: { - * // ... data to create a CertificateEligibility - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the CertificateEligibility we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__CertificateEligibilityClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of CertificateEligibilities. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateEligibilityCountArgs} args - Arguments to filter CertificateEligibilities to count. - * @example - * // Count the number of CertificateEligibilities - * const count = await prisma.certificateEligibility.count({ - * where: { - * // ... the filter for the CertificateEligibilities we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a CertificateEligibility. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateEligibilityAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by CertificateEligibility. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CertificateEligibilityGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends CertificateEligibilityGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: CertificateEligibilityGroupByArgs['orderBy'] } - : { orderBy?: CertificateEligibilityGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCertificateEligibilityGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the CertificateEligibility model - */ - readonly fields: CertificateEligibilityFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for CertificateEligibility. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__CertificateEligibilityClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - certificateService = {}>(args?: Subset>): Prisma__CertificateServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the CertificateEligibility model - */ - interface CertificateEligibilityFieldRefs { - readonly id: FieldRef<"CertificateEligibility", 'Int'> - readonly eligibilityDetail: FieldRef<"CertificateEligibility", 'String'> - readonly applicationType: FieldRef<"CertificateEligibility", 'String'> - readonly certificateServiceId: FieldRef<"CertificateEligibility", 'Int'> - } - - - // Custom InputTypes - /** - * CertificateEligibility findUnique - */ - export type CertificateEligibilityFindUniqueArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - /** - * Filter, which CertificateEligibility to fetch. - */ - where: CertificateEligibilityWhereUniqueInput - } - - /** - * CertificateEligibility findUniqueOrThrow - */ - export type CertificateEligibilityFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - /** - * Filter, which CertificateEligibility to fetch. - */ - where: CertificateEligibilityWhereUniqueInput - } - - /** - * CertificateEligibility findFirst - */ - export type CertificateEligibilityFindFirstArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - /** - * Filter, which CertificateEligibility to fetch. - */ - where?: CertificateEligibilityWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateEligibilities to fetch. - */ - orderBy?: CertificateEligibilityOrderByWithRelationInput | CertificateEligibilityOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CertificateEligibilities. - */ - cursor?: CertificateEligibilityWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateEligibilities from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateEligibilities. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CertificateEligibilities. - */ - distinct?: CertificateEligibilityScalarFieldEnum | CertificateEligibilityScalarFieldEnum[] - } - - /** - * CertificateEligibility findFirstOrThrow - */ - export type CertificateEligibilityFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - /** - * Filter, which CertificateEligibility to fetch. - */ - where?: CertificateEligibilityWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateEligibilities to fetch. - */ - orderBy?: CertificateEligibilityOrderByWithRelationInput | CertificateEligibilityOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CertificateEligibilities. - */ - cursor?: CertificateEligibilityWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateEligibilities from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateEligibilities. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CertificateEligibilities. - */ - distinct?: CertificateEligibilityScalarFieldEnum | CertificateEligibilityScalarFieldEnum[] - } - - /** - * CertificateEligibility findMany - */ - export type CertificateEligibilityFindManyArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - /** - * Filter, which CertificateEligibilities to fetch. - */ - where?: CertificateEligibilityWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CertificateEligibilities to fetch. - */ - orderBy?: CertificateEligibilityOrderByWithRelationInput | CertificateEligibilityOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing CertificateEligibilities. - */ - cursor?: CertificateEligibilityWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CertificateEligibilities from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CertificateEligibilities. - */ - skip?: number - distinct?: CertificateEligibilityScalarFieldEnum | CertificateEligibilityScalarFieldEnum[] - } - - /** - * CertificateEligibility create - */ - export type CertificateEligibilityCreateArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - /** - * The data needed to create a CertificateEligibility. - */ - data: XOR - } - - /** - * CertificateEligibility createMany - */ - export type CertificateEligibilityCreateManyArgs = { - /** - * The data used to create many CertificateEligibilities. - */ - data: CertificateEligibilityCreateManyInput | CertificateEligibilityCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * CertificateEligibility createManyAndReturn - */ - export type CertificateEligibilityCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelectCreateManyAndReturn | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * The data used to create many CertificateEligibilities. - */ - data: CertificateEligibilityCreateManyInput | CertificateEligibilityCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityIncludeCreateManyAndReturn | null - } - - /** - * CertificateEligibility update - */ - export type CertificateEligibilityUpdateArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - /** - * The data needed to update a CertificateEligibility. - */ - data: XOR - /** - * Choose, which CertificateEligibility to update. - */ - where: CertificateEligibilityWhereUniqueInput - } - - /** - * CertificateEligibility updateMany - */ - export type CertificateEligibilityUpdateManyArgs = { - /** - * The data used to update CertificateEligibilities. - */ - data: XOR - /** - * Filter which CertificateEligibilities to update - */ - where?: CertificateEligibilityWhereInput - /** - * Limit how many CertificateEligibilities to update. - */ - limit?: number - } - - /** - * CertificateEligibility updateManyAndReturn - */ - export type CertificateEligibilityUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelectUpdateManyAndReturn | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * The data used to update CertificateEligibilities. - */ - data: XOR - /** - * Filter which CertificateEligibilities to update - */ - where?: CertificateEligibilityWhereInput - /** - * Limit how many CertificateEligibilities to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityIncludeUpdateManyAndReturn | null - } - - /** - * CertificateEligibility upsert - */ - export type CertificateEligibilityUpsertArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - /** - * The filter to search for the CertificateEligibility to update in case it exists. - */ - where: CertificateEligibilityWhereUniqueInput - /** - * In case the CertificateEligibility found by the `where` argument doesn't exist, create a new CertificateEligibility with this data. - */ - create: XOR - /** - * In case the CertificateEligibility was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * CertificateEligibility delete - */ - export type CertificateEligibilityDeleteArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - /** - * Filter which CertificateEligibility to delete. - */ - where: CertificateEligibilityWhereUniqueInput - } - - /** - * CertificateEligibility deleteMany - */ - export type CertificateEligibilityDeleteManyArgs = { - /** - * Filter which CertificateEligibilities to delete - */ - where?: CertificateEligibilityWhereInput - /** - * Limit how many CertificateEligibilities to delete. - */ - limit?: number - } - - /** - * CertificateEligibility without action - */ - export type CertificateEligibilityDefaultArgs = { - /** - * Select specific fields to fetch from the CertificateEligibility - */ - select?: CertificateEligibilitySelect | null - /** - * Omit specific fields from the CertificateEligibility - */ - omit?: CertificateEligibilityOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: CertificateEligibilityInclude | null - } - - - /** - * Model ContactService - */ - - export type AggregateContactService = { - _count: ContactServiceCountAggregateOutputType | null - _avg: ContactServiceAvgAggregateOutputType | null - _sum: ContactServiceSumAggregateOutputType | null - _min: ContactServiceMinAggregateOutputType | null - _max: ContactServiceMaxAggregateOutputType | null - } - - export type ContactServiceAvgAggregateOutputType = { - id: number | null - adminId: number | null - } - - export type ContactServiceSumAggregateOutputType = { - id: number | null - adminId: number | null - } - - export type ContactServiceMinAggregateOutputType = { - id: number | null - name: string | null - summary: string | null - type: string | null - applicationMode: string | null - onlineUrl: string | null - offlineAddress: string | null - status: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - adminId: number | null - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - } - - export type ContactServiceMaxAggregateOutputType = { - id: number | null - name: string | null - summary: string | null - type: string | null - applicationMode: string | null - onlineUrl: string | null - offlineAddress: string | null - status: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - adminId: number | null - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - } - - export type ContactServiceCountAggregateOutputType = { - id: number - name: number - summary: number - type: number - targetAudience: number - applicationMode: number - onlineUrl: number - offlineAddress: number - status: number - isActive: number - createdAt: number - updatedAt: number - adminId: number - eligibilityDetails: number - contactDetails: number - processDetails: number - processNew: number - processUpdate: number - processLost: number - processSurrender: number - docNew: number - docUpdate: number - docLost: number - docSurrender: number - _all: number - } - - - export type ContactServiceAvgAggregateInputType = { - id?: true - adminId?: true - } - - export type ContactServiceSumAggregateInputType = { - id?: true - adminId?: true - } - - export type ContactServiceMinAggregateInputType = { - id?: true - name?: true - summary?: true - type?: true - applicationMode?: true - onlineUrl?: true - offlineAddress?: true - status?: true - isActive?: true - createdAt?: true - updatedAt?: true - adminId?: true - processNew?: true - processUpdate?: true - processLost?: true - processSurrender?: true - docNew?: true - docUpdate?: true - docLost?: true - docSurrender?: true - } - - export type ContactServiceMaxAggregateInputType = { - id?: true - name?: true - summary?: true - type?: true - applicationMode?: true - onlineUrl?: true - offlineAddress?: true - status?: true - isActive?: true - createdAt?: true - updatedAt?: true - adminId?: true - processNew?: true - processUpdate?: true - processLost?: true - processSurrender?: true - docNew?: true - docUpdate?: true - docLost?: true - docSurrender?: true - } - - export type ContactServiceCountAggregateInputType = { - id?: true - name?: true - summary?: true - type?: true - targetAudience?: true - applicationMode?: true - onlineUrl?: true - offlineAddress?: true - status?: true - isActive?: true - createdAt?: true - updatedAt?: true - adminId?: true - eligibilityDetails?: true - contactDetails?: true - processDetails?: true - processNew?: true - processUpdate?: true - processLost?: true - processSurrender?: true - docNew?: true - docUpdate?: true - docLost?: true - docSurrender?: true - _all?: true - } - - export type ContactServiceAggregateArgs = { - /** - * Filter which ContactService to aggregate. - */ - where?: ContactServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServices to fetch. - */ - orderBy?: ContactServiceOrderByWithRelationInput | ContactServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: ContactServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServices. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned ContactServices - **/ - _count?: true | ContactServiceCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ContactServiceAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ContactServiceSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ContactServiceMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ContactServiceMaxAggregateInputType - } - - export type GetContactServiceAggregateType = { - [P in keyof T & keyof AggregateContactService]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type ContactServiceGroupByArgs = { - where?: ContactServiceWhereInput - orderBy?: ContactServiceOrderByWithAggregationInput | ContactServiceOrderByWithAggregationInput[] - by: ContactServiceScalarFieldEnum[] | ContactServiceScalarFieldEnum - having?: ContactServiceScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ContactServiceCountAggregateInputType | true - _avg?: ContactServiceAvgAggregateInputType - _sum?: ContactServiceSumAggregateInputType - _min?: ContactServiceMinAggregateInputType - _max?: ContactServiceMaxAggregateInputType - } - - export type ContactServiceGroupByOutputType = { - id: number - name: string - summary: string - type: string | null - targetAudience: string[] - applicationMode: string - onlineUrl: string | null - offlineAddress: string | null - status: string - isActive: boolean - createdAt: Date - updatedAt: Date - adminId: number - eligibilityDetails: string[] - contactDetails: string[] - processDetails: string[] - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - _count: ContactServiceCountAggregateOutputType | null - _avg: ContactServiceAvgAggregateOutputType | null - _sum: ContactServiceSumAggregateOutputType | null - _min: ContactServiceMinAggregateOutputType | null - _max: ContactServiceMaxAggregateOutputType | null - } - - type GetContactServiceGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof ContactServiceGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type ContactServiceSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - contactDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - admin?: boolean | AdminDefaultArgs - contacts?: boolean | ContactService$contactsArgs - documents?: boolean | ContactService$documentsArgs - _count?: boolean | ContactServiceCountOutputTypeDefaultArgs - }, ExtArgs["result"]["contactService"]> - - export type ContactServiceSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - contactDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - admin?: boolean | AdminDefaultArgs - }, ExtArgs["result"]["contactService"]> - - export type ContactServiceSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - contactDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - admin?: boolean | AdminDefaultArgs - }, ExtArgs["result"]["contactService"]> - - export type ContactServiceSelectScalar = { - id?: boolean - name?: boolean - summary?: boolean - type?: boolean - targetAudience?: boolean - applicationMode?: boolean - onlineUrl?: boolean - offlineAddress?: boolean - status?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - adminId?: boolean - eligibilityDetails?: boolean - contactDetails?: boolean - processDetails?: boolean - processNew?: boolean - processUpdate?: boolean - processLost?: boolean - processSurrender?: boolean - docNew?: boolean - docUpdate?: boolean - docLost?: boolean - docSurrender?: boolean - } - - export type ContactServiceOmit = $Extensions.GetOmit<"id" | "name" | "summary" | "type" | "targetAudience" | "applicationMode" | "onlineUrl" | "offlineAddress" | "status" | "isActive" | "createdAt" | "updatedAt" | "adminId" | "eligibilityDetails" | "contactDetails" | "processDetails" | "processNew" | "processUpdate" | "processLost" | "processSurrender" | "docNew" | "docUpdate" | "docLost" | "docSurrender", ExtArgs["result"]["contactService"]> - export type ContactServiceInclude = { - admin?: boolean | AdminDefaultArgs - contacts?: boolean | ContactService$contactsArgs - documents?: boolean | ContactService$documentsArgs - _count?: boolean | ContactServiceCountOutputTypeDefaultArgs - } - export type ContactServiceIncludeCreateManyAndReturn = { - admin?: boolean | AdminDefaultArgs - } - export type ContactServiceIncludeUpdateManyAndReturn = { - admin?: boolean | AdminDefaultArgs - } - - export type $ContactServicePayload = { - name: "ContactService" - objects: { - admin: Prisma.$AdminPayload - contacts: Prisma.$ContactServiceContactPayload[] - documents: Prisma.$ContactServiceDocumentPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: number - name: string - summary: string - type: string | null - targetAudience: string[] - applicationMode: string - onlineUrl: string | null - offlineAddress: string | null - status: string - isActive: boolean - createdAt: Date - updatedAt: Date - adminId: number - eligibilityDetails: string[] - contactDetails: string[] - processDetails: string[] - processNew: string | null - processUpdate: string | null - processLost: string | null - processSurrender: string | null - docNew: string | null - docUpdate: string | null - docLost: string | null - docSurrender: string | null - }, ExtArgs["result"]["contactService"]> - composites: {} - } - - type ContactServiceGetPayload = $Result.GetResult - - type ContactServiceCountArgs = - Omit & { - select?: ContactServiceCountAggregateInputType | true - } - - export interface ContactServiceDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['ContactService'], meta: { name: 'ContactService' } } - /** - * Find zero or one ContactService that matches the filter. - * @param {ContactServiceFindUniqueArgs} args - Arguments to find a ContactService - * @example - * // Get one ContactService - * const contactService = await prisma.contactService.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__ContactServiceClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one ContactService that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ContactServiceFindUniqueOrThrowArgs} args - Arguments to find a ContactService - * @example - * // Get one ContactService - * const contactService = await prisma.contactService.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__ContactServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ContactService that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceFindFirstArgs} args - Arguments to find a ContactService - * @example - * // Get one ContactService - * const contactService = await prisma.contactService.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__ContactServiceClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ContactService that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceFindFirstOrThrowArgs} args - Arguments to find a ContactService - * @example - * // Get one ContactService - * const contactService = await prisma.contactService.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__ContactServiceClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more ContactServices that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all ContactServices - * const contactServices = await prisma.contactService.findMany() - * - * // Get first 10 ContactServices - * const contactServices = await prisma.contactService.findMany({ take: 10 }) - * - * // Only select the `id` - * const contactServiceWithIdOnly = await prisma.contactService.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a ContactService. - * @param {ContactServiceCreateArgs} args - Arguments to create a ContactService. - * @example - * // Create one ContactService - * const ContactService = await prisma.contactService.create({ - * data: { - * // ... data to create a ContactService - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__ContactServiceClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many ContactServices. - * @param {ContactServiceCreateManyArgs} args - Arguments to create many ContactServices. - * @example - * // Create many ContactServices - * const contactService = await prisma.contactService.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many ContactServices and returns the data saved in the database. - * @param {ContactServiceCreateManyAndReturnArgs} args - Arguments to create many ContactServices. - * @example - * // Create many ContactServices - * const contactService = await prisma.contactService.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many ContactServices and only return the `id` - * const contactServiceWithIdOnly = await prisma.contactService.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a ContactService. - * @param {ContactServiceDeleteArgs} args - Arguments to delete one ContactService. - * @example - * // Delete one ContactService - * const ContactService = await prisma.contactService.delete({ - * where: { - * // ... filter to delete one ContactService - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__ContactServiceClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one ContactService. - * @param {ContactServiceUpdateArgs} args - Arguments to update one ContactService. - * @example - * // Update one ContactService - * const contactService = await prisma.contactService.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__ContactServiceClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more ContactServices. - * @param {ContactServiceDeleteManyArgs} args - Arguments to filter ContactServices to delete. - * @example - * // Delete a few ContactServices - * const { count } = await prisma.contactService.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ContactServices. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many ContactServices - * const contactService = await prisma.contactService.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ContactServices and returns the data updated in the database. - * @param {ContactServiceUpdateManyAndReturnArgs} args - Arguments to update many ContactServices. - * @example - * // Update many ContactServices - * const contactService = await prisma.contactService.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more ContactServices and only return the `id` - * const contactServiceWithIdOnly = await prisma.contactService.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one ContactService. - * @param {ContactServiceUpsertArgs} args - Arguments to update or create a ContactService. - * @example - * // Update or create a ContactService - * const contactService = await prisma.contactService.upsert({ - * create: { - * // ... data to create a ContactService - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the ContactService we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__ContactServiceClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of ContactServices. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceCountArgs} args - Arguments to filter ContactServices to count. - * @example - * // Count the number of ContactServices - * const count = await prisma.contactService.count({ - * where: { - * // ... the filter for the ContactServices we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a ContactService. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by ContactService. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ContactServiceGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ContactServiceGroupByArgs['orderBy'] } - : { orderBy?: ContactServiceGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetContactServiceGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the ContactService model - */ - readonly fields: ContactServiceFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for ContactService. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__ContactServiceClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - admin = {}>(args?: Subset>): Prisma__AdminClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - contacts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - documents = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the ContactService model - */ - interface ContactServiceFieldRefs { - readonly id: FieldRef<"ContactService", 'Int'> - readonly name: FieldRef<"ContactService", 'String'> - readonly summary: FieldRef<"ContactService", 'String'> - readonly type: FieldRef<"ContactService", 'String'> - readonly targetAudience: FieldRef<"ContactService", 'String[]'> - readonly applicationMode: FieldRef<"ContactService", 'String'> - readonly onlineUrl: FieldRef<"ContactService", 'String'> - readonly offlineAddress: FieldRef<"ContactService", 'String'> - readonly status: FieldRef<"ContactService", 'String'> - readonly isActive: FieldRef<"ContactService", 'Boolean'> - readonly createdAt: FieldRef<"ContactService", 'DateTime'> - readonly updatedAt: FieldRef<"ContactService", 'DateTime'> - readonly adminId: FieldRef<"ContactService", 'Int'> - readonly eligibilityDetails: FieldRef<"ContactService", 'String[]'> - readonly contactDetails: FieldRef<"ContactService", 'String[]'> - readonly processDetails: FieldRef<"ContactService", 'String[]'> - readonly processNew: FieldRef<"ContactService", 'String'> - readonly processUpdate: FieldRef<"ContactService", 'String'> - readonly processLost: FieldRef<"ContactService", 'String'> - readonly processSurrender: FieldRef<"ContactService", 'String'> - readonly docNew: FieldRef<"ContactService", 'String'> - readonly docUpdate: FieldRef<"ContactService", 'String'> - readonly docLost: FieldRef<"ContactService", 'String'> - readonly docSurrender: FieldRef<"ContactService", 'String'> - } - - - // Custom InputTypes - /** - * ContactService findUnique - */ - export type ContactServiceFindUniqueArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - /** - * Filter, which ContactService to fetch. - */ - where: ContactServiceWhereUniqueInput - } - - /** - * ContactService findUniqueOrThrow - */ - export type ContactServiceFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - /** - * Filter, which ContactService to fetch. - */ - where: ContactServiceWhereUniqueInput - } - - /** - * ContactService findFirst - */ - export type ContactServiceFindFirstArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - /** - * Filter, which ContactService to fetch. - */ - where?: ContactServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServices to fetch. - */ - orderBy?: ContactServiceOrderByWithRelationInput | ContactServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ContactServices. - */ - cursor?: ContactServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServices. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ContactServices. - */ - distinct?: ContactServiceScalarFieldEnum | ContactServiceScalarFieldEnum[] - } - - /** - * ContactService findFirstOrThrow - */ - export type ContactServiceFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - /** - * Filter, which ContactService to fetch. - */ - where?: ContactServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServices to fetch. - */ - orderBy?: ContactServiceOrderByWithRelationInput | ContactServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ContactServices. - */ - cursor?: ContactServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServices. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ContactServices. - */ - distinct?: ContactServiceScalarFieldEnum | ContactServiceScalarFieldEnum[] - } - - /** - * ContactService findMany - */ - export type ContactServiceFindManyArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - /** - * Filter, which ContactServices to fetch. - */ - where?: ContactServiceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServices to fetch. - */ - orderBy?: ContactServiceOrderByWithRelationInput | ContactServiceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing ContactServices. - */ - cursor?: ContactServiceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServices from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServices. - */ - skip?: number - distinct?: ContactServiceScalarFieldEnum | ContactServiceScalarFieldEnum[] - } - - /** - * ContactService create - */ - export type ContactServiceCreateArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - /** - * The data needed to create a ContactService. - */ - data: XOR - } - - /** - * ContactService createMany - */ - export type ContactServiceCreateManyArgs = { - /** - * The data used to create many ContactServices. - */ - data: ContactServiceCreateManyInput | ContactServiceCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * ContactService createManyAndReturn - */ - export type ContactServiceCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelectCreateManyAndReturn | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * The data used to create many ContactServices. - */ - data: ContactServiceCreateManyInput | ContactServiceCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceIncludeCreateManyAndReturn | null - } - - /** - * ContactService update - */ - export type ContactServiceUpdateArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - /** - * The data needed to update a ContactService. - */ - data: XOR - /** - * Choose, which ContactService to update. - */ - where: ContactServiceWhereUniqueInput - } - - /** - * ContactService updateMany - */ - export type ContactServiceUpdateManyArgs = { - /** - * The data used to update ContactServices. - */ - data: XOR - /** - * Filter which ContactServices to update - */ - where?: ContactServiceWhereInput - /** - * Limit how many ContactServices to update. - */ - limit?: number - } - - /** - * ContactService updateManyAndReturn - */ - export type ContactServiceUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * The data used to update ContactServices. - */ - data: XOR - /** - * Filter which ContactServices to update - */ - where?: ContactServiceWhereInput - /** - * Limit how many ContactServices to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceIncludeUpdateManyAndReturn | null - } - - /** - * ContactService upsert - */ - export type ContactServiceUpsertArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - /** - * The filter to search for the ContactService to update in case it exists. - */ - where: ContactServiceWhereUniqueInput - /** - * In case the ContactService found by the `where` argument doesn't exist, create a new ContactService with this data. - */ - create: XOR - /** - * In case the ContactService was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * ContactService delete - */ - export type ContactServiceDeleteArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - /** - * Filter which ContactService to delete. - */ - where: ContactServiceWhereUniqueInput - } - - /** - * ContactService deleteMany - */ - export type ContactServiceDeleteManyArgs = { - /** - * Filter which ContactServices to delete - */ - where?: ContactServiceWhereInput - /** - * Limit how many ContactServices to delete. - */ - limit?: number - } - - /** - * ContactService.contacts - */ - export type ContactService$contactsArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - where?: ContactServiceContactWhereInput - orderBy?: ContactServiceContactOrderByWithRelationInput | ContactServiceContactOrderByWithRelationInput[] - cursor?: ContactServiceContactWhereUniqueInput - take?: number - skip?: number - distinct?: ContactServiceContactScalarFieldEnum | ContactServiceContactScalarFieldEnum[] - } - - /** - * ContactService.documents - */ - export type ContactService$documentsArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - where?: ContactServiceDocumentWhereInput - orderBy?: ContactServiceDocumentOrderByWithRelationInput | ContactServiceDocumentOrderByWithRelationInput[] - cursor?: ContactServiceDocumentWhereUniqueInput - take?: number - skip?: number - distinct?: ContactServiceDocumentScalarFieldEnum | ContactServiceDocumentScalarFieldEnum[] - } - - /** - * ContactService without action - */ - export type ContactServiceDefaultArgs = { - /** - * Select specific fields to fetch from the ContactService - */ - select?: ContactServiceSelect | null - /** - * Omit specific fields from the ContactService - */ - omit?: ContactServiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceInclude | null - } - - - /** - * Model ContactServiceContact - */ - - export type AggregateContactServiceContact = { - _count: ContactServiceContactCountAggregateOutputType | null - _avg: ContactServiceContactAvgAggregateOutputType | null - _sum: ContactServiceContactSumAggregateOutputType | null - _min: ContactServiceContactMinAggregateOutputType | null - _max: ContactServiceContactMaxAggregateOutputType | null - } - - export type ContactServiceContactAvgAggregateOutputType = { - id: number | null - contactServiceId: number | null - } - - export type ContactServiceContactSumAggregateOutputType = { - id: number | null - contactServiceId: number | null - } - - export type ContactServiceContactMinAggregateOutputType = { - id: number | null - serviceName: string | null - district: string | null - subDistrict: string | null - block: string | null - name: string | null - designation: string | null - contact: string | null - email: string | null - contactServiceId: number | null - } - - export type ContactServiceContactMaxAggregateOutputType = { - id: number | null - serviceName: string | null - district: string | null - subDistrict: string | null - block: string | null - name: string | null - designation: string | null - contact: string | null - email: string | null - contactServiceId: number | null - } - - export type ContactServiceContactCountAggregateOutputType = { - id: number - serviceName: number - district: number - subDistrict: number - block: number - name: number - designation: number - contact: number - email: number - contactServiceId: number - _all: number - } - - - export type ContactServiceContactAvgAggregateInputType = { - id?: true - contactServiceId?: true - } - - export type ContactServiceContactSumAggregateInputType = { - id?: true - contactServiceId?: true - } - - export type ContactServiceContactMinAggregateInputType = { - id?: true - serviceName?: true - district?: true - subDistrict?: true - block?: true - name?: true - designation?: true - contact?: true - email?: true - contactServiceId?: true - } - - export type ContactServiceContactMaxAggregateInputType = { - id?: true - serviceName?: true - district?: true - subDistrict?: true - block?: true - name?: true - designation?: true - contact?: true - email?: true - contactServiceId?: true - } - - export type ContactServiceContactCountAggregateInputType = { - id?: true - serviceName?: true - district?: true - subDistrict?: true - block?: true - name?: true - designation?: true - contact?: true - email?: true - contactServiceId?: true - _all?: true - } - - export type ContactServiceContactAggregateArgs = { - /** - * Filter which ContactServiceContact to aggregate. - */ - where?: ContactServiceContactWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServiceContacts to fetch. - */ - orderBy?: ContactServiceContactOrderByWithRelationInput | ContactServiceContactOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: ContactServiceContactWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServiceContacts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServiceContacts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned ContactServiceContacts - **/ - _count?: true | ContactServiceContactCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ContactServiceContactAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ContactServiceContactSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ContactServiceContactMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ContactServiceContactMaxAggregateInputType - } - - export type GetContactServiceContactAggregateType = { - [P in keyof T & keyof AggregateContactServiceContact]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type ContactServiceContactGroupByArgs = { - where?: ContactServiceContactWhereInput - orderBy?: ContactServiceContactOrderByWithAggregationInput | ContactServiceContactOrderByWithAggregationInput[] - by: ContactServiceContactScalarFieldEnum[] | ContactServiceContactScalarFieldEnum - having?: ContactServiceContactScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ContactServiceContactCountAggregateInputType | true - _avg?: ContactServiceContactAvgAggregateInputType - _sum?: ContactServiceContactSumAggregateInputType - _min?: ContactServiceContactMinAggregateInputType - _max?: ContactServiceContactMaxAggregateInputType - } - - export type ContactServiceContactGroupByOutputType = { - id: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - contactServiceId: number - _count: ContactServiceContactCountAggregateOutputType | null - _avg: ContactServiceContactAvgAggregateOutputType | null - _sum: ContactServiceContactSumAggregateOutputType | null - _min: ContactServiceContactMinAggregateOutputType | null - _max: ContactServiceContactMaxAggregateOutputType | null - } - - type GetContactServiceContactGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof ContactServiceContactGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type ContactServiceContactSelect = $Extensions.GetSelect<{ - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - contactServiceId?: boolean - contactService?: boolean | ContactServiceDefaultArgs - posts?: boolean | ContactServiceContact$postsArgs - _count?: boolean | ContactServiceContactCountOutputTypeDefaultArgs - }, ExtArgs["result"]["contactServiceContact"]> - - export type ContactServiceContactSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - contactServiceId?: boolean - contactService?: boolean | ContactServiceDefaultArgs - }, ExtArgs["result"]["contactServiceContact"]> - - export type ContactServiceContactSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - contactServiceId?: boolean - contactService?: boolean | ContactServiceDefaultArgs - }, ExtArgs["result"]["contactServiceContact"]> - - export type ContactServiceContactSelectScalar = { - id?: boolean - serviceName?: boolean - district?: boolean - subDistrict?: boolean - block?: boolean - name?: boolean - designation?: boolean - contact?: boolean - email?: boolean - contactServiceId?: boolean - } - - export type ContactServiceContactOmit = $Extensions.GetOmit<"id" | "serviceName" | "district" | "subDistrict" | "block" | "name" | "designation" | "contact" | "email" | "contactServiceId", ExtArgs["result"]["contactServiceContact"]> - export type ContactServiceContactInclude = { - contactService?: boolean | ContactServiceDefaultArgs - posts?: boolean | ContactServiceContact$postsArgs - _count?: boolean | ContactServiceContactCountOutputTypeDefaultArgs - } - export type ContactServiceContactIncludeCreateManyAndReturn = { - contactService?: boolean | ContactServiceDefaultArgs - } - export type ContactServiceContactIncludeUpdateManyAndReturn = { - contactService?: boolean | ContactServiceDefaultArgs - } - - export type $ContactServiceContactPayload = { - name: "ContactServiceContact" - objects: { - contactService: Prisma.$ContactServicePayload - posts: Prisma.$PostPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - contactServiceId: number - }, ExtArgs["result"]["contactServiceContact"]> - composites: {} - } - - type ContactServiceContactGetPayload = $Result.GetResult - - type ContactServiceContactCountArgs = - Omit & { - select?: ContactServiceContactCountAggregateInputType | true - } - - export interface ContactServiceContactDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['ContactServiceContact'], meta: { name: 'ContactServiceContact' } } - /** - * Find zero or one ContactServiceContact that matches the filter. - * @param {ContactServiceContactFindUniqueArgs} args - Arguments to find a ContactServiceContact - * @example - * // Get one ContactServiceContact - * const contactServiceContact = await prisma.contactServiceContact.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__ContactServiceContactClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one ContactServiceContact that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ContactServiceContactFindUniqueOrThrowArgs} args - Arguments to find a ContactServiceContact - * @example - * // Get one ContactServiceContact - * const contactServiceContact = await prisma.contactServiceContact.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__ContactServiceContactClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ContactServiceContact that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceContactFindFirstArgs} args - Arguments to find a ContactServiceContact - * @example - * // Get one ContactServiceContact - * const contactServiceContact = await prisma.contactServiceContact.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__ContactServiceContactClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ContactServiceContact that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceContactFindFirstOrThrowArgs} args - Arguments to find a ContactServiceContact - * @example - * // Get one ContactServiceContact - * const contactServiceContact = await prisma.contactServiceContact.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__ContactServiceContactClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more ContactServiceContacts that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceContactFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all ContactServiceContacts - * const contactServiceContacts = await prisma.contactServiceContact.findMany() - * - * // Get first 10 ContactServiceContacts - * const contactServiceContacts = await prisma.contactServiceContact.findMany({ take: 10 }) - * - * // Only select the `id` - * const contactServiceContactWithIdOnly = await prisma.contactServiceContact.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a ContactServiceContact. - * @param {ContactServiceContactCreateArgs} args - Arguments to create a ContactServiceContact. - * @example - * // Create one ContactServiceContact - * const ContactServiceContact = await prisma.contactServiceContact.create({ - * data: { - * // ... data to create a ContactServiceContact - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__ContactServiceContactClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many ContactServiceContacts. - * @param {ContactServiceContactCreateManyArgs} args - Arguments to create many ContactServiceContacts. - * @example - * // Create many ContactServiceContacts - * const contactServiceContact = await prisma.contactServiceContact.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many ContactServiceContacts and returns the data saved in the database. - * @param {ContactServiceContactCreateManyAndReturnArgs} args - Arguments to create many ContactServiceContacts. - * @example - * // Create many ContactServiceContacts - * const contactServiceContact = await prisma.contactServiceContact.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many ContactServiceContacts and only return the `id` - * const contactServiceContactWithIdOnly = await prisma.contactServiceContact.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a ContactServiceContact. - * @param {ContactServiceContactDeleteArgs} args - Arguments to delete one ContactServiceContact. - * @example - * // Delete one ContactServiceContact - * const ContactServiceContact = await prisma.contactServiceContact.delete({ - * where: { - * // ... filter to delete one ContactServiceContact - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__ContactServiceContactClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one ContactServiceContact. - * @param {ContactServiceContactUpdateArgs} args - Arguments to update one ContactServiceContact. - * @example - * // Update one ContactServiceContact - * const contactServiceContact = await prisma.contactServiceContact.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__ContactServiceContactClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more ContactServiceContacts. - * @param {ContactServiceContactDeleteManyArgs} args - Arguments to filter ContactServiceContacts to delete. - * @example - * // Delete a few ContactServiceContacts - * const { count } = await prisma.contactServiceContact.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ContactServiceContacts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceContactUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many ContactServiceContacts - * const contactServiceContact = await prisma.contactServiceContact.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ContactServiceContacts and returns the data updated in the database. - * @param {ContactServiceContactUpdateManyAndReturnArgs} args - Arguments to update many ContactServiceContacts. - * @example - * // Update many ContactServiceContacts - * const contactServiceContact = await prisma.contactServiceContact.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more ContactServiceContacts and only return the `id` - * const contactServiceContactWithIdOnly = await prisma.contactServiceContact.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one ContactServiceContact. - * @param {ContactServiceContactUpsertArgs} args - Arguments to update or create a ContactServiceContact. - * @example - * // Update or create a ContactServiceContact - * const contactServiceContact = await prisma.contactServiceContact.upsert({ - * create: { - * // ... data to create a ContactServiceContact - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the ContactServiceContact we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__ContactServiceContactClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of ContactServiceContacts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceContactCountArgs} args - Arguments to filter ContactServiceContacts to count. - * @example - * // Count the number of ContactServiceContacts - * const count = await prisma.contactServiceContact.count({ - * where: { - * // ... the filter for the ContactServiceContacts we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a ContactServiceContact. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceContactAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by ContactServiceContact. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceContactGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ContactServiceContactGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ContactServiceContactGroupByArgs['orderBy'] } - : { orderBy?: ContactServiceContactGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetContactServiceContactGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the ContactServiceContact model - */ - readonly fields: ContactServiceContactFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for ContactServiceContact. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__ContactServiceContactClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - contactService = {}>(args?: Subset>): Prisma__ContactServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - posts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the ContactServiceContact model - */ - interface ContactServiceContactFieldRefs { - readonly id: FieldRef<"ContactServiceContact", 'Int'> - readonly serviceName: FieldRef<"ContactServiceContact", 'String'> - readonly district: FieldRef<"ContactServiceContact", 'String'> - readonly subDistrict: FieldRef<"ContactServiceContact", 'String'> - readonly block: FieldRef<"ContactServiceContact", 'String'> - readonly name: FieldRef<"ContactServiceContact", 'String'> - readonly designation: FieldRef<"ContactServiceContact", 'String'> - readonly contact: FieldRef<"ContactServiceContact", 'String'> - readonly email: FieldRef<"ContactServiceContact", 'String'> - readonly contactServiceId: FieldRef<"ContactServiceContact", 'Int'> - } - - - // Custom InputTypes - /** - * ContactServiceContact findUnique - */ - export type ContactServiceContactFindUniqueArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - /** - * Filter, which ContactServiceContact to fetch. - */ - where: ContactServiceContactWhereUniqueInput - } - - /** - * ContactServiceContact findUniqueOrThrow - */ - export type ContactServiceContactFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - /** - * Filter, which ContactServiceContact to fetch. - */ - where: ContactServiceContactWhereUniqueInput - } - - /** - * ContactServiceContact findFirst - */ - export type ContactServiceContactFindFirstArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - /** - * Filter, which ContactServiceContact to fetch. - */ - where?: ContactServiceContactWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServiceContacts to fetch. - */ - orderBy?: ContactServiceContactOrderByWithRelationInput | ContactServiceContactOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ContactServiceContacts. - */ - cursor?: ContactServiceContactWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServiceContacts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServiceContacts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ContactServiceContacts. - */ - distinct?: ContactServiceContactScalarFieldEnum | ContactServiceContactScalarFieldEnum[] - } - - /** - * ContactServiceContact findFirstOrThrow - */ - export type ContactServiceContactFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - /** - * Filter, which ContactServiceContact to fetch. - */ - where?: ContactServiceContactWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServiceContacts to fetch. - */ - orderBy?: ContactServiceContactOrderByWithRelationInput | ContactServiceContactOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ContactServiceContacts. - */ - cursor?: ContactServiceContactWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServiceContacts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServiceContacts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ContactServiceContacts. - */ - distinct?: ContactServiceContactScalarFieldEnum | ContactServiceContactScalarFieldEnum[] - } - - /** - * ContactServiceContact findMany - */ - export type ContactServiceContactFindManyArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - /** - * Filter, which ContactServiceContacts to fetch. - */ - where?: ContactServiceContactWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServiceContacts to fetch. - */ - orderBy?: ContactServiceContactOrderByWithRelationInput | ContactServiceContactOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing ContactServiceContacts. - */ - cursor?: ContactServiceContactWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServiceContacts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServiceContacts. - */ - skip?: number - distinct?: ContactServiceContactScalarFieldEnum | ContactServiceContactScalarFieldEnum[] - } - - /** - * ContactServiceContact create - */ - export type ContactServiceContactCreateArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - /** - * The data needed to create a ContactServiceContact. - */ - data: XOR - } - - /** - * ContactServiceContact createMany - */ - export type ContactServiceContactCreateManyArgs = { - /** - * The data used to create many ContactServiceContacts. - */ - data: ContactServiceContactCreateManyInput | ContactServiceContactCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * ContactServiceContact createManyAndReturn - */ - export type ContactServiceContactCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelectCreateManyAndReturn | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * The data used to create many ContactServiceContacts. - */ - data: ContactServiceContactCreateManyInput | ContactServiceContactCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactIncludeCreateManyAndReturn | null - } - - /** - * ContactServiceContact update - */ - export type ContactServiceContactUpdateArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - /** - * The data needed to update a ContactServiceContact. - */ - data: XOR - /** - * Choose, which ContactServiceContact to update. - */ - where: ContactServiceContactWhereUniqueInput - } - - /** - * ContactServiceContact updateMany - */ - export type ContactServiceContactUpdateManyArgs = { - /** - * The data used to update ContactServiceContacts. - */ - data: XOR - /** - * Filter which ContactServiceContacts to update - */ - where?: ContactServiceContactWhereInput - /** - * Limit how many ContactServiceContacts to update. - */ - limit?: number - } - - /** - * ContactServiceContact updateManyAndReturn - */ - export type ContactServiceContactUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * The data used to update ContactServiceContacts. - */ - data: XOR - /** - * Filter which ContactServiceContacts to update - */ - where?: ContactServiceContactWhereInput - /** - * Limit how many ContactServiceContacts to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactIncludeUpdateManyAndReturn | null - } - - /** - * ContactServiceContact upsert - */ - export type ContactServiceContactUpsertArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - /** - * The filter to search for the ContactServiceContact to update in case it exists. - */ - where: ContactServiceContactWhereUniqueInput - /** - * In case the ContactServiceContact found by the `where` argument doesn't exist, create a new ContactServiceContact with this data. - */ - create: XOR - /** - * In case the ContactServiceContact was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * ContactServiceContact delete - */ - export type ContactServiceContactDeleteArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - /** - * Filter which ContactServiceContact to delete. - */ - where: ContactServiceContactWhereUniqueInput - } - - /** - * ContactServiceContact deleteMany - */ - export type ContactServiceContactDeleteManyArgs = { - /** - * Filter which ContactServiceContacts to delete - */ - where?: ContactServiceContactWhereInput - /** - * Limit how many ContactServiceContacts to delete. - */ - limit?: number - } - - /** - * ContactServiceContact.posts - */ - export type ContactServiceContact$postsArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - where?: PostWhereInput - orderBy?: PostOrderByWithRelationInput | PostOrderByWithRelationInput[] - cursor?: PostWhereUniqueInput - take?: number - skip?: number - distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] - } - - /** - * ContactServiceContact without action - */ - export type ContactServiceContactDefaultArgs = { - /** - * Select specific fields to fetch from the ContactServiceContact - */ - select?: ContactServiceContactSelect | null - /** - * Omit specific fields from the ContactServiceContact - */ - omit?: ContactServiceContactOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceContactInclude | null - } - - - /** - * Model ContactServiceDocument - */ - - export type AggregateContactServiceDocument = { - _count: ContactServiceDocumentCountAggregateOutputType | null - _avg: ContactServiceDocumentAvgAggregateOutputType | null - _sum: ContactServiceDocumentSumAggregateOutputType | null - _min: ContactServiceDocumentMinAggregateOutputType | null - _max: ContactServiceDocumentMaxAggregateOutputType | null - } - - export type ContactServiceDocumentAvgAggregateOutputType = { - id: number | null - slNo: number | null - contactServiceId: number | null - } - - export type ContactServiceDocumentSumAggregateOutputType = { - id: number | null - slNo: number | null - contactServiceId: number | null - } - - export type ContactServiceDocumentMinAggregateOutputType = { - id: number | null - slNo: number | null - documentType: string | null - validProof: string | null - isRequired: boolean | null - contactServiceId: number | null - } - - export type ContactServiceDocumentMaxAggregateOutputType = { - id: number | null - slNo: number | null - documentType: string | null - validProof: string | null - isRequired: boolean | null - contactServiceId: number | null - } - - export type ContactServiceDocumentCountAggregateOutputType = { - id: number - slNo: number - documentType: number - validProof: number - isRequired: number - contactServiceId: number - _all: number - } - - - export type ContactServiceDocumentAvgAggregateInputType = { - id?: true - slNo?: true - contactServiceId?: true - } - - export type ContactServiceDocumentSumAggregateInputType = { - id?: true - slNo?: true - contactServiceId?: true - } - - export type ContactServiceDocumentMinAggregateInputType = { - id?: true - slNo?: true - documentType?: true - validProof?: true - isRequired?: true - contactServiceId?: true - } - - export type ContactServiceDocumentMaxAggregateInputType = { - id?: true - slNo?: true - documentType?: true - validProof?: true - isRequired?: true - contactServiceId?: true - } - - export type ContactServiceDocumentCountAggregateInputType = { - id?: true - slNo?: true - documentType?: true - validProof?: true - isRequired?: true - contactServiceId?: true - _all?: true - } - - export type ContactServiceDocumentAggregateArgs = { - /** - * Filter which ContactServiceDocument to aggregate. - */ - where?: ContactServiceDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServiceDocuments to fetch. - */ - orderBy?: ContactServiceDocumentOrderByWithRelationInput | ContactServiceDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: ContactServiceDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServiceDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServiceDocuments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned ContactServiceDocuments - **/ - _count?: true | ContactServiceDocumentCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ContactServiceDocumentAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ContactServiceDocumentSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ContactServiceDocumentMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ContactServiceDocumentMaxAggregateInputType - } - - export type GetContactServiceDocumentAggregateType = { - [P in keyof T & keyof AggregateContactServiceDocument]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type ContactServiceDocumentGroupByArgs = { - where?: ContactServiceDocumentWhereInput - orderBy?: ContactServiceDocumentOrderByWithAggregationInput | ContactServiceDocumentOrderByWithAggregationInput[] - by: ContactServiceDocumentScalarFieldEnum[] | ContactServiceDocumentScalarFieldEnum - having?: ContactServiceDocumentScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ContactServiceDocumentCountAggregateInputType | true - _avg?: ContactServiceDocumentAvgAggregateInputType - _sum?: ContactServiceDocumentSumAggregateInputType - _min?: ContactServiceDocumentMinAggregateInputType - _max?: ContactServiceDocumentMaxAggregateInputType - } - - export type ContactServiceDocumentGroupByOutputType = { - id: number - slNo: number - documentType: string - validProof: string - isRequired: boolean - contactServiceId: number - _count: ContactServiceDocumentCountAggregateOutputType | null - _avg: ContactServiceDocumentAvgAggregateOutputType | null - _sum: ContactServiceDocumentSumAggregateOutputType | null - _min: ContactServiceDocumentMinAggregateOutputType | null - _max: ContactServiceDocumentMaxAggregateOutputType | null - } - - type GetContactServiceDocumentGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof ContactServiceDocumentGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type ContactServiceDocumentSelect = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - contactServiceId?: boolean - contactService?: boolean | ContactServiceDefaultArgs - }, ExtArgs["result"]["contactServiceDocument"]> - - export type ContactServiceDocumentSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - contactServiceId?: boolean - contactService?: boolean | ContactServiceDefaultArgs - }, ExtArgs["result"]["contactServiceDocument"]> - - export type ContactServiceDocumentSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - contactServiceId?: boolean - contactService?: boolean | ContactServiceDefaultArgs - }, ExtArgs["result"]["contactServiceDocument"]> - - export type ContactServiceDocumentSelectScalar = { - id?: boolean - slNo?: boolean - documentType?: boolean - validProof?: boolean - isRequired?: boolean - contactServiceId?: boolean - } - - export type ContactServiceDocumentOmit = $Extensions.GetOmit<"id" | "slNo" | "documentType" | "validProof" | "isRequired" | "contactServiceId", ExtArgs["result"]["contactServiceDocument"]> - export type ContactServiceDocumentInclude = { - contactService?: boolean | ContactServiceDefaultArgs - } - export type ContactServiceDocumentIncludeCreateManyAndReturn = { - contactService?: boolean | ContactServiceDefaultArgs - } - export type ContactServiceDocumentIncludeUpdateManyAndReturn = { - contactService?: boolean | ContactServiceDefaultArgs - } - - export type $ContactServiceDocumentPayload = { - name: "ContactServiceDocument" - objects: { - contactService: Prisma.$ContactServicePayload - } - scalars: $Extensions.GetPayloadResult<{ - id: number - slNo: number - documentType: string - validProof: string - isRequired: boolean - contactServiceId: number - }, ExtArgs["result"]["contactServiceDocument"]> - composites: {} - } - - type ContactServiceDocumentGetPayload = $Result.GetResult - - type ContactServiceDocumentCountArgs = - Omit & { - select?: ContactServiceDocumentCountAggregateInputType | true - } - - export interface ContactServiceDocumentDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['ContactServiceDocument'], meta: { name: 'ContactServiceDocument' } } - /** - * Find zero or one ContactServiceDocument that matches the filter. - * @param {ContactServiceDocumentFindUniqueArgs} args - Arguments to find a ContactServiceDocument - * @example - * // Get one ContactServiceDocument - * const contactServiceDocument = await prisma.contactServiceDocument.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__ContactServiceDocumentClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one ContactServiceDocument that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ContactServiceDocumentFindUniqueOrThrowArgs} args - Arguments to find a ContactServiceDocument - * @example - * // Get one ContactServiceDocument - * const contactServiceDocument = await prisma.contactServiceDocument.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__ContactServiceDocumentClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ContactServiceDocument that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceDocumentFindFirstArgs} args - Arguments to find a ContactServiceDocument - * @example - * // Get one ContactServiceDocument - * const contactServiceDocument = await prisma.contactServiceDocument.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__ContactServiceDocumentClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ContactServiceDocument that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceDocumentFindFirstOrThrowArgs} args - Arguments to find a ContactServiceDocument - * @example - * // Get one ContactServiceDocument - * const contactServiceDocument = await prisma.contactServiceDocument.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__ContactServiceDocumentClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more ContactServiceDocuments that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceDocumentFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all ContactServiceDocuments - * const contactServiceDocuments = await prisma.contactServiceDocument.findMany() - * - * // Get first 10 ContactServiceDocuments - * const contactServiceDocuments = await prisma.contactServiceDocument.findMany({ take: 10 }) - * - * // Only select the `id` - * const contactServiceDocumentWithIdOnly = await prisma.contactServiceDocument.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a ContactServiceDocument. - * @param {ContactServiceDocumentCreateArgs} args - Arguments to create a ContactServiceDocument. - * @example - * // Create one ContactServiceDocument - * const ContactServiceDocument = await prisma.contactServiceDocument.create({ - * data: { - * // ... data to create a ContactServiceDocument - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__ContactServiceDocumentClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many ContactServiceDocuments. - * @param {ContactServiceDocumentCreateManyArgs} args - Arguments to create many ContactServiceDocuments. - * @example - * // Create many ContactServiceDocuments - * const contactServiceDocument = await prisma.contactServiceDocument.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many ContactServiceDocuments and returns the data saved in the database. - * @param {ContactServiceDocumentCreateManyAndReturnArgs} args - Arguments to create many ContactServiceDocuments. - * @example - * // Create many ContactServiceDocuments - * const contactServiceDocument = await prisma.contactServiceDocument.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many ContactServiceDocuments and only return the `id` - * const contactServiceDocumentWithIdOnly = await prisma.contactServiceDocument.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a ContactServiceDocument. - * @param {ContactServiceDocumentDeleteArgs} args - Arguments to delete one ContactServiceDocument. - * @example - * // Delete one ContactServiceDocument - * const ContactServiceDocument = await prisma.contactServiceDocument.delete({ - * where: { - * // ... filter to delete one ContactServiceDocument - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__ContactServiceDocumentClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one ContactServiceDocument. - * @param {ContactServiceDocumentUpdateArgs} args - Arguments to update one ContactServiceDocument. - * @example - * // Update one ContactServiceDocument - * const contactServiceDocument = await prisma.contactServiceDocument.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__ContactServiceDocumentClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more ContactServiceDocuments. - * @param {ContactServiceDocumentDeleteManyArgs} args - Arguments to filter ContactServiceDocuments to delete. - * @example - * // Delete a few ContactServiceDocuments - * const { count } = await prisma.contactServiceDocument.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ContactServiceDocuments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceDocumentUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many ContactServiceDocuments - * const contactServiceDocument = await prisma.contactServiceDocument.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ContactServiceDocuments and returns the data updated in the database. - * @param {ContactServiceDocumentUpdateManyAndReturnArgs} args - Arguments to update many ContactServiceDocuments. - * @example - * // Update many ContactServiceDocuments - * const contactServiceDocument = await prisma.contactServiceDocument.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more ContactServiceDocuments and only return the `id` - * const contactServiceDocumentWithIdOnly = await prisma.contactServiceDocument.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one ContactServiceDocument. - * @param {ContactServiceDocumentUpsertArgs} args - Arguments to update or create a ContactServiceDocument. - * @example - * // Update or create a ContactServiceDocument - * const contactServiceDocument = await prisma.contactServiceDocument.upsert({ - * create: { - * // ... data to create a ContactServiceDocument - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the ContactServiceDocument we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__ContactServiceDocumentClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of ContactServiceDocuments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceDocumentCountArgs} args - Arguments to filter ContactServiceDocuments to count. - * @example - * // Count the number of ContactServiceDocuments - * const count = await prisma.contactServiceDocument.count({ - * where: { - * // ... the filter for the ContactServiceDocuments we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a ContactServiceDocument. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceDocumentAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by ContactServiceDocument. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ContactServiceDocumentGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ContactServiceDocumentGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ContactServiceDocumentGroupByArgs['orderBy'] } - : { orderBy?: ContactServiceDocumentGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetContactServiceDocumentGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the ContactServiceDocument model - */ - readonly fields: ContactServiceDocumentFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for ContactServiceDocument. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__ContactServiceDocumentClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - contactService = {}>(args?: Subset>): Prisma__ContactServiceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the ContactServiceDocument model - */ - interface ContactServiceDocumentFieldRefs { - readonly id: FieldRef<"ContactServiceDocument", 'Int'> - readonly slNo: FieldRef<"ContactServiceDocument", 'Int'> - readonly documentType: FieldRef<"ContactServiceDocument", 'String'> - readonly validProof: FieldRef<"ContactServiceDocument", 'String'> - readonly isRequired: FieldRef<"ContactServiceDocument", 'Boolean'> - readonly contactServiceId: FieldRef<"ContactServiceDocument", 'Int'> - } - - - // Custom InputTypes - /** - * ContactServiceDocument findUnique - */ - export type ContactServiceDocumentFindUniqueArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - /** - * Filter, which ContactServiceDocument to fetch. - */ - where: ContactServiceDocumentWhereUniqueInput - } - - /** - * ContactServiceDocument findUniqueOrThrow - */ - export type ContactServiceDocumentFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - /** - * Filter, which ContactServiceDocument to fetch. - */ - where: ContactServiceDocumentWhereUniqueInput - } - - /** - * ContactServiceDocument findFirst - */ - export type ContactServiceDocumentFindFirstArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - /** - * Filter, which ContactServiceDocument to fetch. - */ - where?: ContactServiceDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServiceDocuments to fetch. - */ - orderBy?: ContactServiceDocumentOrderByWithRelationInput | ContactServiceDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ContactServiceDocuments. - */ - cursor?: ContactServiceDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServiceDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServiceDocuments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ContactServiceDocuments. - */ - distinct?: ContactServiceDocumentScalarFieldEnum | ContactServiceDocumentScalarFieldEnum[] - } - - /** - * ContactServiceDocument findFirstOrThrow - */ - export type ContactServiceDocumentFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - /** - * Filter, which ContactServiceDocument to fetch. - */ - where?: ContactServiceDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServiceDocuments to fetch. - */ - orderBy?: ContactServiceDocumentOrderByWithRelationInput | ContactServiceDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ContactServiceDocuments. - */ - cursor?: ContactServiceDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServiceDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServiceDocuments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ContactServiceDocuments. - */ - distinct?: ContactServiceDocumentScalarFieldEnum | ContactServiceDocumentScalarFieldEnum[] - } - - /** - * ContactServiceDocument findMany - */ - export type ContactServiceDocumentFindManyArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - /** - * Filter, which ContactServiceDocuments to fetch. - */ - where?: ContactServiceDocumentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ContactServiceDocuments to fetch. - */ - orderBy?: ContactServiceDocumentOrderByWithRelationInput | ContactServiceDocumentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing ContactServiceDocuments. - */ - cursor?: ContactServiceDocumentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ContactServiceDocuments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ContactServiceDocuments. - */ - skip?: number - distinct?: ContactServiceDocumentScalarFieldEnum | ContactServiceDocumentScalarFieldEnum[] - } - - /** - * ContactServiceDocument create - */ - export type ContactServiceDocumentCreateArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - /** - * The data needed to create a ContactServiceDocument. - */ - data: XOR - } - - /** - * ContactServiceDocument createMany - */ - export type ContactServiceDocumentCreateManyArgs = { - /** - * The data used to create many ContactServiceDocuments. - */ - data: ContactServiceDocumentCreateManyInput | ContactServiceDocumentCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * ContactServiceDocument createManyAndReturn - */ - export type ContactServiceDocumentCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelectCreateManyAndReturn | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * The data used to create many ContactServiceDocuments. - */ - data: ContactServiceDocumentCreateManyInput | ContactServiceDocumentCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentIncludeCreateManyAndReturn | null - } - - /** - * ContactServiceDocument update - */ - export type ContactServiceDocumentUpdateArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - /** - * The data needed to update a ContactServiceDocument. - */ - data: XOR - /** - * Choose, which ContactServiceDocument to update. - */ - where: ContactServiceDocumentWhereUniqueInput - } - - /** - * ContactServiceDocument updateMany - */ - export type ContactServiceDocumentUpdateManyArgs = { - /** - * The data used to update ContactServiceDocuments. - */ - data: XOR - /** - * Filter which ContactServiceDocuments to update - */ - where?: ContactServiceDocumentWhereInput - /** - * Limit how many ContactServiceDocuments to update. - */ - limit?: number - } - - /** - * ContactServiceDocument updateManyAndReturn - */ - export type ContactServiceDocumentUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * The data used to update ContactServiceDocuments. - */ - data: XOR - /** - * Filter which ContactServiceDocuments to update - */ - where?: ContactServiceDocumentWhereInput - /** - * Limit how many ContactServiceDocuments to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentIncludeUpdateManyAndReturn | null - } - - /** - * ContactServiceDocument upsert - */ - export type ContactServiceDocumentUpsertArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - /** - * The filter to search for the ContactServiceDocument to update in case it exists. - */ - where: ContactServiceDocumentWhereUniqueInput - /** - * In case the ContactServiceDocument found by the `where` argument doesn't exist, create a new ContactServiceDocument with this data. - */ - create: XOR - /** - * In case the ContactServiceDocument was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * ContactServiceDocument delete - */ - export type ContactServiceDocumentDeleteArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - /** - * Filter which ContactServiceDocument to delete. - */ - where: ContactServiceDocumentWhereUniqueInput - } - - /** - * ContactServiceDocument deleteMany - */ - export type ContactServiceDocumentDeleteManyArgs = { - /** - * Filter which ContactServiceDocuments to delete - */ - where?: ContactServiceDocumentWhereInput - /** - * Limit how many ContactServiceDocuments to delete. - */ - limit?: number - } - - /** - * ContactServiceDocument without action - */ - export type ContactServiceDocumentDefaultArgs = { - /** - * Select specific fields to fetch from the ContactServiceDocument - */ - select?: ContactServiceDocumentSelect | null - /** - * Omit specific fields from the ContactServiceDocument - */ - omit?: ContactServiceDocumentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: ContactServiceDocumentInclude | null - } - - - /** - * Model Post - */ - - export type AggregatePost = { - _count: PostCountAggregateOutputType | null - _avg: PostAvgAggregateOutputType | null - _sum: PostSumAggregateOutputType | null - _min: PostMinAggregateOutputType | null - _max: PostMaxAggregateOutputType | null - } - - export type PostAvgAggregateOutputType = { - id: number | null - officeId: number | null - } - - export type PostSumAggregateOutputType = { - id: number | null - officeId: number | null - } - - export type PostMinAggregateOutputType = { - id: number | null - postName: string | null - rank: string | null - description: string | null - department: string | null - status: string | null - createdAt: Date | null - updatedAt: Date | null - officeId: number | null - } - - export type PostMaxAggregateOutputType = { - id: number | null - postName: string | null - rank: string | null - description: string | null - department: string | null - status: string | null - createdAt: Date | null - updatedAt: Date | null - officeId: number | null - } - - export type PostCountAggregateOutputType = { - id: number - postName: number - rank: number - description: number - department: number - status: number - createdAt: number - updatedAt: number - officeId: number - _all: number - } - - - export type PostAvgAggregateInputType = { - id?: true - officeId?: true - } - - export type PostSumAggregateInputType = { - id?: true - officeId?: true - } - - export type PostMinAggregateInputType = { - id?: true - postName?: true - rank?: true - description?: true - department?: true - status?: true - createdAt?: true - updatedAt?: true - officeId?: true - } - - export type PostMaxAggregateInputType = { - id?: true - postName?: true - rank?: true - description?: true - department?: true - status?: true - createdAt?: true - updatedAt?: true - officeId?: true - } - - export type PostCountAggregateInputType = { - id?: true - postName?: true - rank?: true - description?: true - department?: true - status?: true - createdAt?: true - updatedAt?: true - officeId?: true - _all?: true - } - - export type PostAggregateArgs = { - /** - * Filter which Post to aggregate. - */ - where?: PostWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Posts to fetch. - */ - orderBy?: PostOrderByWithRelationInput | PostOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: PostWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Posts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Posts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Posts - **/ - _count?: true | PostCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: PostAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: PostSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: PostMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: PostMaxAggregateInputType - } - - export type GetPostAggregateType = { - [P in keyof T & keyof AggregatePost]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type PostGroupByArgs = { - where?: PostWhereInput - orderBy?: PostOrderByWithAggregationInput | PostOrderByWithAggregationInput[] - by: PostScalarFieldEnum[] | PostScalarFieldEnum - having?: PostScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: PostCountAggregateInputType | true - _avg?: PostAvgAggregateInputType - _sum?: PostSumAggregateInputType - _min?: PostMinAggregateInputType - _max?: PostMaxAggregateInputType - } - - export type PostGroupByOutputType = { - id: number - postName: string - rank: string - description: string | null - department: string | null - status: string - createdAt: Date - updatedAt: Date - officeId: number - _count: PostCountAggregateOutputType | null - _avg: PostAvgAggregateOutputType | null - _sum: PostSumAggregateOutputType | null - _min: PostMinAggregateOutputType | null - _max: PostMaxAggregateOutputType | null - } - - type GetPostGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof PostGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type PostSelect = $Extensions.GetSelect<{ - id?: boolean - postName?: boolean - rank?: boolean - description?: boolean - department?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - officeId?: boolean - office?: boolean | ContactServiceContactDefaultArgs - employees?: boolean | Post$employeesArgs - _count?: boolean | PostCountOutputTypeDefaultArgs - }, ExtArgs["result"]["post"]> - - export type PostSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - postName?: boolean - rank?: boolean - description?: boolean - department?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - officeId?: boolean - office?: boolean | ContactServiceContactDefaultArgs - }, ExtArgs["result"]["post"]> - - export type PostSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - postName?: boolean - rank?: boolean - description?: boolean - department?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - officeId?: boolean - office?: boolean | ContactServiceContactDefaultArgs - }, ExtArgs["result"]["post"]> - - export type PostSelectScalar = { - id?: boolean - postName?: boolean - rank?: boolean - description?: boolean - department?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - officeId?: boolean - } - - export type PostOmit = $Extensions.GetOmit<"id" | "postName" | "rank" | "description" | "department" | "status" | "createdAt" | "updatedAt" | "officeId", ExtArgs["result"]["post"]> - export type PostInclude = { - office?: boolean | ContactServiceContactDefaultArgs - employees?: boolean | Post$employeesArgs - _count?: boolean | PostCountOutputTypeDefaultArgs - } - export type PostIncludeCreateManyAndReturn = { - office?: boolean | ContactServiceContactDefaultArgs - } - export type PostIncludeUpdateManyAndReturn = { - office?: boolean | ContactServiceContactDefaultArgs - } - - export type $PostPayload = { - name: "Post" - objects: { - office: Prisma.$ContactServiceContactPayload - employees: Prisma.$EmployeePayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: number - postName: string - rank: string - description: string | null - department: string | null - status: string - createdAt: Date - updatedAt: Date - officeId: number - }, ExtArgs["result"]["post"]> - composites: {} - } - - type PostGetPayload = $Result.GetResult - - type PostCountArgs = - Omit & { - select?: PostCountAggregateInputType | true - } - - export interface PostDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Post'], meta: { name: 'Post' } } - /** - * Find zero or one Post that matches the filter. - * @param {PostFindUniqueArgs} args - Arguments to find a Post - * @example - * // Get one Post - * const post = await prisma.post.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Post that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {PostFindUniqueOrThrowArgs} args - Arguments to find a Post - * @example - * // Get one Post - * const post = await prisma.post.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Post that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PostFindFirstArgs} args - Arguments to find a Post - * @example - * // Get one Post - * const post = await prisma.post.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Post that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PostFindFirstOrThrowArgs} args - Arguments to find a Post - * @example - * // Get one Post - * const post = await prisma.post.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Posts that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PostFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Posts - * const posts = await prisma.post.findMany() - * - * // Get first 10 Posts - * const posts = await prisma.post.findMany({ take: 10 }) - * - * // Only select the `id` - * const postWithIdOnly = await prisma.post.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Post. - * @param {PostCreateArgs} args - Arguments to create a Post. - * @example - * // Create one Post - * const Post = await prisma.post.create({ - * data: { - * // ... data to create a Post - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Posts. - * @param {PostCreateManyArgs} args - Arguments to create many Posts. - * @example - * // Create many Posts - * const post = await prisma.post.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Posts and returns the data saved in the database. - * @param {PostCreateManyAndReturnArgs} args - Arguments to create many Posts. - * @example - * // Create many Posts - * const post = await prisma.post.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Posts and only return the `id` - * const postWithIdOnly = await prisma.post.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a Post. - * @param {PostDeleteArgs} args - Arguments to delete one Post. - * @example - * // Delete one Post - * const Post = await prisma.post.delete({ - * where: { - * // ... filter to delete one Post - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Post. - * @param {PostUpdateArgs} args - Arguments to update one Post. - * @example - * // Update one Post - * const post = await prisma.post.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Posts. - * @param {PostDeleteManyArgs} args - Arguments to filter Posts to delete. - * @example - * // Delete a few Posts - * const { count } = await prisma.post.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Posts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PostUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Posts - * const post = await prisma.post.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Posts and returns the data updated in the database. - * @param {PostUpdateManyAndReturnArgs} args - Arguments to update many Posts. - * @example - * // Update many Posts - * const post = await prisma.post.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Posts and only return the `id` - * const postWithIdOnly = await prisma.post.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one Post. - * @param {PostUpsertArgs} args - Arguments to update or create a Post. - * @example - * // Update or create a Post - * const post = await prisma.post.upsert({ - * create: { - * // ... data to create a Post - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Post we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__PostClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Posts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PostCountArgs} args - Arguments to filter Posts to count. - * @example - * // Count the number of Posts - * const count = await prisma.post.count({ - * where: { - * // ... the filter for the Posts we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Post. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PostAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Post. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PostGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends PostGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: PostGroupByArgs['orderBy'] } - : { orderBy?: PostGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPostGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Post model - */ - readonly fields: PostFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Post. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__PostClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - office = {}>(args?: Subset>): Prisma__ContactServiceContactClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - employees = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the Post model - */ - interface PostFieldRefs { - readonly id: FieldRef<"Post", 'Int'> - readonly postName: FieldRef<"Post", 'String'> - readonly rank: FieldRef<"Post", 'String'> - readonly description: FieldRef<"Post", 'String'> - readonly department: FieldRef<"Post", 'String'> - readonly status: FieldRef<"Post", 'String'> - readonly createdAt: FieldRef<"Post", 'DateTime'> - readonly updatedAt: FieldRef<"Post", 'DateTime'> - readonly officeId: FieldRef<"Post", 'Int'> - } - - - // Custom InputTypes - /** - * Post findUnique - */ - export type PostFindUniqueArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - /** - * Filter, which Post to fetch. - */ - where: PostWhereUniqueInput - } - - /** - * Post findUniqueOrThrow - */ - export type PostFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - /** - * Filter, which Post to fetch. - */ - where: PostWhereUniqueInput - } - - /** - * Post findFirst - */ - export type PostFindFirstArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - /** - * Filter, which Post to fetch. - */ - where?: PostWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Posts to fetch. - */ - orderBy?: PostOrderByWithRelationInput | PostOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Posts. - */ - cursor?: PostWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Posts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Posts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Posts. - */ - distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] - } - - /** - * Post findFirstOrThrow - */ - export type PostFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - /** - * Filter, which Post to fetch. - */ - where?: PostWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Posts to fetch. - */ - orderBy?: PostOrderByWithRelationInput | PostOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Posts. - */ - cursor?: PostWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Posts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Posts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Posts. - */ - distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] - } - - /** - * Post findMany - */ - export type PostFindManyArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - /** - * Filter, which Posts to fetch. - */ - where?: PostWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Posts to fetch. - */ - orderBy?: PostOrderByWithRelationInput | PostOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Posts. - */ - cursor?: PostWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Posts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Posts. - */ - skip?: number - distinct?: PostScalarFieldEnum | PostScalarFieldEnum[] - } - - /** - * Post create - */ - export type PostCreateArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - /** - * The data needed to create a Post. - */ - data: XOR - } - - /** - * Post createMany - */ - export type PostCreateManyArgs = { - /** - * The data used to create many Posts. - */ - data: PostCreateManyInput | PostCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Post createManyAndReturn - */ - export type PostCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelectCreateManyAndReturn | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * The data used to create many Posts. - */ - data: PostCreateManyInput | PostCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: PostIncludeCreateManyAndReturn | null - } - - /** - * Post update - */ - export type PostUpdateArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - /** - * The data needed to update a Post. - */ - data: XOR - /** - * Choose, which Post to update. - */ - where: PostWhereUniqueInput - } - - /** - * Post updateMany - */ - export type PostUpdateManyArgs = { - /** - * The data used to update Posts. - */ - data: XOR - /** - * Filter which Posts to update - */ - where?: PostWhereInput - /** - * Limit how many Posts to update. - */ - limit?: number - } - - /** - * Post updateManyAndReturn - */ - export type PostUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * The data used to update Posts. - */ - data: XOR - /** - * Filter which Posts to update - */ - where?: PostWhereInput - /** - * Limit how many Posts to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: PostIncludeUpdateManyAndReturn | null - } - - /** - * Post upsert - */ - export type PostUpsertArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - /** - * The filter to search for the Post to update in case it exists. - */ - where: PostWhereUniqueInput - /** - * In case the Post found by the `where` argument doesn't exist, create a new Post with this data. - */ - create: XOR - /** - * In case the Post was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Post delete - */ - export type PostDeleteArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - /** - * Filter which Post to delete. - */ - where: PostWhereUniqueInput - } - - /** - * Post deleteMany - */ - export type PostDeleteManyArgs = { - /** - * Filter which Posts to delete - */ - where?: PostWhereInput - /** - * Limit how many Posts to delete. - */ - limit?: number - } - - /** - * Post.employees - */ - export type Post$employeesArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - where?: EmployeeWhereInput - orderBy?: EmployeeOrderByWithRelationInput | EmployeeOrderByWithRelationInput[] - cursor?: EmployeeWhereUniqueInput - take?: number - skip?: number - distinct?: EmployeeScalarFieldEnum | EmployeeScalarFieldEnum[] - } - - /** - * Post without action - */ - export type PostDefaultArgs = { - /** - * Select specific fields to fetch from the Post - */ - select?: PostSelect | null - /** - * Omit specific fields from the Post - */ - omit?: PostOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: PostInclude | null - } - - - /** - * Model Employee - */ - - export type AggregateEmployee = { - _count: EmployeeCountAggregateOutputType | null - _avg: EmployeeAvgAggregateOutputType | null - _sum: EmployeeSumAggregateOutputType | null - _min: EmployeeMinAggregateOutputType | null - _max: EmployeeMaxAggregateOutputType | null - } - - export type EmployeeAvgAggregateOutputType = { - id: number | null - salary: number | null - postId: number | null - } - - export type EmployeeSumAggregateOutputType = { - id: number | null - salary: number | null - postId: number | null - } - - export type EmployeeMinAggregateOutputType = { - id: number | null - name: string | null - email: string | null - phone: string | null - designation: string | null - employeeId: string | null - joiningDate: Date | null - salary: number | null - status: string | null - createdAt: Date | null - updatedAt: Date | null - postId: number | null - } - - export type EmployeeMaxAggregateOutputType = { - id: number | null - name: string | null - email: string | null - phone: string | null - designation: string | null - employeeId: string | null - joiningDate: Date | null - salary: number | null - status: string | null - createdAt: Date | null - updatedAt: Date | null - postId: number | null - } - - export type EmployeeCountAggregateOutputType = { - id: number - name: number - email: number - phone: number - designation: number - employeeId: number - joiningDate: number - salary: number - status: number - createdAt: number - updatedAt: number - postId: number - _all: number - } - - - export type EmployeeAvgAggregateInputType = { - id?: true - salary?: true - postId?: true - } - - export type EmployeeSumAggregateInputType = { - id?: true - salary?: true - postId?: true - } - - export type EmployeeMinAggregateInputType = { - id?: true - name?: true - email?: true - phone?: true - designation?: true - employeeId?: true - joiningDate?: true - salary?: true - status?: true - createdAt?: true - updatedAt?: true - postId?: true - } - - export type EmployeeMaxAggregateInputType = { - id?: true - name?: true - email?: true - phone?: true - designation?: true - employeeId?: true - joiningDate?: true - salary?: true - status?: true - createdAt?: true - updatedAt?: true - postId?: true - } - - export type EmployeeCountAggregateInputType = { - id?: true - name?: true - email?: true - phone?: true - designation?: true - employeeId?: true - joiningDate?: true - salary?: true - status?: true - createdAt?: true - updatedAt?: true - postId?: true - _all?: true - } - - export type EmployeeAggregateArgs = { - /** - * Filter which Employee to aggregate. - */ - where?: EmployeeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Employees to fetch. - */ - orderBy?: EmployeeOrderByWithRelationInput | EmployeeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: EmployeeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Employees from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Employees. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Employees - **/ - _count?: true | EmployeeCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: EmployeeAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: EmployeeSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: EmployeeMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: EmployeeMaxAggregateInputType - } - - export type GetEmployeeAggregateType = { - [P in keyof T & keyof AggregateEmployee]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type EmployeeGroupByArgs = { - where?: EmployeeWhereInput - orderBy?: EmployeeOrderByWithAggregationInput | EmployeeOrderByWithAggregationInput[] - by: EmployeeScalarFieldEnum[] | EmployeeScalarFieldEnum - having?: EmployeeScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: EmployeeCountAggregateInputType | true - _avg?: EmployeeAvgAggregateInputType - _sum?: EmployeeSumAggregateInputType - _min?: EmployeeMinAggregateInputType - _max?: EmployeeMaxAggregateInputType - } - - export type EmployeeGroupByOutputType = { - id: number - name: string - email: string - phone: string - designation: string - employeeId: string | null - joiningDate: Date | null - salary: number | null - status: string - createdAt: Date - updatedAt: Date - postId: number - _count: EmployeeCountAggregateOutputType | null - _avg: EmployeeAvgAggregateOutputType | null - _sum: EmployeeSumAggregateOutputType | null - _min: EmployeeMinAggregateOutputType | null - _max: EmployeeMaxAggregateOutputType | null - } - - type GetEmployeeGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof EmployeeGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type EmployeeSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - designation?: boolean - employeeId?: boolean - joiningDate?: boolean - salary?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - postId?: boolean - post?: boolean | PostDefaultArgs - }, ExtArgs["result"]["employee"]> - - export type EmployeeSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - designation?: boolean - employeeId?: boolean - joiningDate?: boolean - salary?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - postId?: boolean - post?: boolean | PostDefaultArgs - }, ExtArgs["result"]["employee"]> - - export type EmployeeSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - designation?: boolean - employeeId?: boolean - joiningDate?: boolean - salary?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - postId?: boolean - post?: boolean | PostDefaultArgs - }, ExtArgs["result"]["employee"]> - - export type EmployeeSelectScalar = { - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - designation?: boolean - employeeId?: boolean - joiningDate?: boolean - salary?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - postId?: boolean - } - - export type EmployeeOmit = $Extensions.GetOmit<"id" | "name" | "email" | "phone" | "designation" | "employeeId" | "joiningDate" | "salary" | "status" | "createdAt" | "updatedAt" | "postId", ExtArgs["result"]["employee"]> - export type EmployeeInclude = { - post?: boolean | PostDefaultArgs - } - export type EmployeeIncludeCreateManyAndReturn = { - post?: boolean | PostDefaultArgs - } - export type EmployeeIncludeUpdateManyAndReturn = { - post?: boolean | PostDefaultArgs - } - - export type $EmployeePayload = { - name: "Employee" - objects: { - post: Prisma.$PostPayload - } - scalars: $Extensions.GetPayloadResult<{ - id: number - name: string - email: string - phone: string - designation: string - employeeId: string | null - joiningDate: Date | null - salary: number | null - status: string - createdAt: Date - updatedAt: Date - postId: number - }, ExtArgs["result"]["employee"]> - composites: {} - } - - type EmployeeGetPayload = $Result.GetResult - - type EmployeeCountArgs = - Omit & { - select?: EmployeeCountAggregateInputType | true - } - - export interface EmployeeDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Employee'], meta: { name: 'Employee' } } - /** - * Find zero or one Employee that matches the filter. - * @param {EmployeeFindUniqueArgs} args - Arguments to find a Employee - * @example - * // Get one Employee - * const employee = await prisma.employee.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__EmployeeClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Employee that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {EmployeeFindUniqueOrThrowArgs} args - Arguments to find a Employee - * @example - * // Get one Employee - * const employee = await prisma.employee.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__EmployeeClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Employee that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {EmployeeFindFirstArgs} args - Arguments to find a Employee - * @example - * // Get one Employee - * const employee = await prisma.employee.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__EmployeeClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Employee that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {EmployeeFindFirstOrThrowArgs} args - Arguments to find a Employee - * @example - * // Get one Employee - * const employee = await prisma.employee.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__EmployeeClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Employees that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {EmployeeFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Employees - * const employees = await prisma.employee.findMany() - * - * // Get first 10 Employees - * const employees = await prisma.employee.findMany({ take: 10 }) - * - * // Only select the `id` - * const employeeWithIdOnly = await prisma.employee.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Employee. - * @param {EmployeeCreateArgs} args - Arguments to create a Employee. - * @example - * // Create one Employee - * const Employee = await prisma.employee.create({ - * data: { - * // ... data to create a Employee - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__EmployeeClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Employees. - * @param {EmployeeCreateManyArgs} args - Arguments to create many Employees. - * @example - * // Create many Employees - * const employee = await prisma.employee.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Employees and returns the data saved in the database. - * @param {EmployeeCreateManyAndReturnArgs} args - Arguments to create many Employees. - * @example - * // Create many Employees - * const employee = await prisma.employee.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Employees and only return the `id` - * const employeeWithIdOnly = await prisma.employee.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a Employee. - * @param {EmployeeDeleteArgs} args - Arguments to delete one Employee. - * @example - * // Delete one Employee - * const Employee = await prisma.employee.delete({ - * where: { - * // ... filter to delete one Employee - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__EmployeeClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Employee. - * @param {EmployeeUpdateArgs} args - Arguments to update one Employee. - * @example - * // Update one Employee - * const employee = await prisma.employee.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__EmployeeClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Employees. - * @param {EmployeeDeleteManyArgs} args - Arguments to filter Employees to delete. - * @example - * // Delete a few Employees - * const { count } = await prisma.employee.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Employees. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {EmployeeUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Employees - * const employee = await prisma.employee.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Employees and returns the data updated in the database. - * @param {EmployeeUpdateManyAndReturnArgs} args - Arguments to update many Employees. - * @example - * // Update many Employees - * const employee = await prisma.employee.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Employees and only return the `id` - * const employeeWithIdOnly = await prisma.employee.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one Employee. - * @param {EmployeeUpsertArgs} args - Arguments to update or create a Employee. - * @example - * // Update or create a Employee - * const employee = await prisma.employee.upsert({ - * create: { - * // ... data to create a Employee - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Employee we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__EmployeeClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Employees. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {EmployeeCountArgs} args - Arguments to filter Employees to count. - * @example - * // Count the number of Employees - * const count = await prisma.employee.count({ - * where: { - * // ... the filter for the Employees we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Employee. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {EmployeeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Employee. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {EmployeeGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends EmployeeGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: EmployeeGroupByArgs['orderBy'] } - : { orderBy?: EmployeeGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetEmployeeGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Employee model - */ - readonly fields: EmployeeFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Employee. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__EmployeeClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - post = {}>(args?: Subset>): Prisma__PostClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the Employee model - */ - interface EmployeeFieldRefs { - readonly id: FieldRef<"Employee", 'Int'> - readonly name: FieldRef<"Employee", 'String'> - readonly email: FieldRef<"Employee", 'String'> - readonly phone: FieldRef<"Employee", 'String'> - readonly designation: FieldRef<"Employee", 'String'> - readonly employeeId: FieldRef<"Employee", 'String'> - readonly joiningDate: FieldRef<"Employee", 'DateTime'> - readonly salary: FieldRef<"Employee", 'Float'> - readonly status: FieldRef<"Employee", 'String'> - readonly createdAt: FieldRef<"Employee", 'DateTime'> - readonly updatedAt: FieldRef<"Employee", 'DateTime'> - readonly postId: FieldRef<"Employee", 'Int'> - } - - - // Custom InputTypes - /** - * Employee findUnique - */ - export type EmployeeFindUniqueArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - /** - * Filter, which Employee to fetch. - */ - where: EmployeeWhereUniqueInput - } - - /** - * Employee findUniqueOrThrow - */ - export type EmployeeFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - /** - * Filter, which Employee to fetch. - */ - where: EmployeeWhereUniqueInput - } - - /** - * Employee findFirst - */ - export type EmployeeFindFirstArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - /** - * Filter, which Employee to fetch. - */ - where?: EmployeeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Employees to fetch. - */ - orderBy?: EmployeeOrderByWithRelationInput | EmployeeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Employees. - */ - cursor?: EmployeeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Employees from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Employees. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Employees. - */ - distinct?: EmployeeScalarFieldEnum | EmployeeScalarFieldEnum[] - } - - /** - * Employee findFirstOrThrow - */ - export type EmployeeFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - /** - * Filter, which Employee to fetch. - */ - where?: EmployeeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Employees to fetch. - */ - orderBy?: EmployeeOrderByWithRelationInput | EmployeeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Employees. - */ - cursor?: EmployeeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Employees from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Employees. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Employees. - */ - distinct?: EmployeeScalarFieldEnum | EmployeeScalarFieldEnum[] - } - - /** - * Employee findMany - */ - export type EmployeeFindManyArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - /** - * Filter, which Employees to fetch. - */ - where?: EmployeeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Employees to fetch. - */ - orderBy?: EmployeeOrderByWithRelationInput | EmployeeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Employees. - */ - cursor?: EmployeeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Employees from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Employees. - */ - skip?: number - distinct?: EmployeeScalarFieldEnum | EmployeeScalarFieldEnum[] - } - - /** - * Employee create - */ - export type EmployeeCreateArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - /** - * The data needed to create a Employee. - */ - data: XOR - } - - /** - * Employee createMany - */ - export type EmployeeCreateManyArgs = { - /** - * The data used to create many Employees. - */ - data: EmployeeCreateManyInput | EmployeeCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Employee createManyAndReturn - */ - export type EmployeeCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelectCreateManyAndReturn | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * The data used to create many Employees. - */ - data: EmployeeCreateManyInput | EmployeeCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeIncludeCreateManyAndReturn | null - } - - /** - * Employee update - */ - export type EmployeeUpdateArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - /** - * The data needed to update a Employee. - */ - data: XOR - /** - * Choose, which Employee to update. - */ - where: EmployeeWhereUniqueInput - } - - /** - * Employee updateMany - */ - export type EmployeeUpdateManyArgs = { - /** - * The data used to update Employees. - */ - data: XOR - /** - * Filter which Employees to update - */ - where?: EmployeeWhereInput - /** - * Limit how many Employees to update. - */ - limit?: number - } - - /** - * Employee updateManyAndReturn - */ - export type EmployeeUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * The data used to update Employees. - */ - data: XOR - /** - * Filter which Employees to update - */ - where?: EmployeeWhereInput - /** - * Limit how many Employees to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeIncludeUpdateManyAndReturn | null - } - - /** - * Employee upsert - */ - export type EmployeeUpsertArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - /** - * The filter to search for the Employee to update in case it exists. - */ - where: EmployeeWhereUniqueInput - /** - * In case the Employee found by the `where` argument doesn't exist, create a new Employee with this data. - */ - create: XOR - /** - * In case the Employee was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Employee delete - */ - export type EmployeeDeleteArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - /** - * Filter which Employee to delete. - */ - where: EmployeeWhereUniqueInput - } - - /** - * Employee deleteMany - */ - export type EmployeeDeleteManyArgs = { - /** - * Filter which Employees to delete - */ - where?: EmployeeWhereInput - /** - * Limit how many Employees to delete. - */ - limit?: number - } - - /** - * Employee without action - */ - export type EmployeeDefaultArgs = { - /** - * Select specific fields to fetch from the Employee - */ - select?: EmployeeSelect | null - /** - * Omit specific fields from the Employee - */ - omit?: EmployeeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: EmployeeInclude | null - } - - - /** - * Model Feedback - */ - - export type AggregateFeedback = { - _count: FeedbackCountAggregateOutputType | null - _avg: FeedbackAvgAggregateOutputType | null - _sum: FeedbackSumAggregateOutputType | null - _min: FeedbackMinAggregateOutputType | null - _max: FeedbackMaxAggregateOutputType | null - } - - export type FeedbackAvgAggregateOutputType = { - id: number | null - rating: number | null - } - - export type FeedbackSumAggregateOutputType = { - id: number | null - rating: number | null - } - - export type FeedbackMinAggregateOutputType = { - id: number | null - name: string | null - email: string | null - phone: string | null - subject: string | null - message: string | null - rating: number | null - category: string | null - status: string | null - createdAt: Date | null - updatedAt: Date | null - resolvedAt: Date | null - resolvedBy: string | null - adminNotes: string | null - } - - export type FeedbackMaxAggregateOutputType = { - id: number | null - name: string | null - email: string | null - phone: string | null - subject: string | null - message: string | null - rating: number | null - category: string | null - status: string | null - createdAt: Date | null - updatedAt: Date | null - resolvedAt: Date | null - resolvedBy: string | null - adminNotes: string | null - } - - export type FeedbackCountAggregateOutputType = { - id: number - name: number - email: number - phone: number - subject: number - message: number - rating: number - category: number - status: number - createdAt: number - updatedAt: number - resolvedAt: number - resolvedBy: number - adminNotes: number - _all: number - } - - - export type FeedbackAvgAggregateInputType = { - id?: true - rating?: true - } - - export type FeedbackSumAggregateInputType = { - id?: true - rating?: true - } - - export type FeedbackMinAggregateInputType = { - id?: true - name?: true - email?: true - phone?: true - subject?: true - message?: true - rating?: true - category?: true - status?: true - createdAt?: true - updatedAt?: true - resolvedAt?: true - resolvedBy?: true - adminNotes?: true - } - - export type FeedbackMaxAggregateInputType = { - id?: true - name?: true - email?: true - phone?: true - subject?: true - message?: true - rating?: true - category?: true - status?: true - createdAt?: true - updatedAt?: true - resolvedAt?: true - resolvedBy?: true - adminNotes?: true - } - - export type FeedbackCountAggregateInputType = { - id?: true - name?: true - email?: true - phone?: true - subject?: true - message?: true - rating?: true - category?: true - status?: true - createdAt?: true - updatedAt?: true - resolvedAt?: true - resolvedBy?: true - adminNotes?: true - _all?: true - } - - export type FeedbackAggregateArgs = { - /** - * Filter which Feedback to aggregate. - */ - where?: FeedbackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Feedbacks to fetch. - */ - orderBy?: FeedbackOrderByWithRelationInput | FeedbackOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: FeedbackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Feedbacks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Feedbacks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Feedbacks - **/ - _count?: true | FeedbackCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: FeedbackAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: FeedbackSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: FeedbackMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: FeedbackMaxAggregateInputType - } - - export type GetFeedbackAggregateType = { - [P in keyof T & keyof AggregateFeedback]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type FeedbackGroupByArgs = { - where?: FeedbackWhereInput - orderBy?: FeedbackOrderByWithAggregationInput | FeedbackOrderByWithAggregationInput[] - by: FeedbackScalarFieldEnum[] | FeedbackScalarFieldEnum - having?: FeedbackScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: FeedbackCountAggregateInputType | true - _avg?: FeedbackAvgAggregateInputType - _sum?: FeedbackSumAggregateInputType - _min?: FeedbackMinAggregateInputType - _max?: FeedbackMaxAggregateInputType - } - - export type FeedbackGroupByOutputType = { - id: number - name: string - email: string - phone: string | null - subject: string - message: string - rating: number | null - category: string | null - status: string - createdAt: Date - updatedAt: Date - resolvedAt: Date | null - resolvedBy: string | null - adminNotes: string | null - _count: FeedbackCountAggregateOutputType | null - _avg: FeedbackAvgAggregateOutputType | null - _sum: FeedbackSumAggregateOutputType | null - _min: FeedbackMinAggregateOutputType | null - _max: FeedbackMaxAggregateOutputType | null - } - - type GetFeedbackGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof FeedbackGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type FeedbackSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - subject?: boolean - message?: boolean - rating?: boolean - category?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - resolvedAt?: boolean - resolvedBy?: boolean - adminNotes?: boolean - }, ExtArgs["result"]["feedback"]> - - export type FeedbackSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - subject?: boolean - message?: boolean - rating?: boolean - category?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - resolvedAt?: boolean - resolvedBy?: boolean - adminNotes?: boolean - }, ExtArgs["result"]["feedback"]> - - export type FeedbackSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - subject?: boolean - message?: boolean - rating?: boolean - category?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - resolvedAt?: boolean - resolvedBy?: boolean - adminNotes?: boolean - }, ExtArgs["result"]["feedback"]> - - export type FeedbackSelectScalar = { - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - subject?: boolean - message?: boolean - rating?: boolean - category?: boolean - status?: boolean - createdAt?: boolean - updatedAt?: boolean - resolvedAt?: boolean - resolvedBy?: boolean - adminNotes?: boolean - } - - export type FeedbackOmit = $Extensions.GetOmit<"id" | "name" | "email" | "phone" | "subject" | "message" | "rating" | "category" | "status" | "createdAt" | "updatedAt" | "resolvedAt" | "resolvedBy" | "adminNotes", ExtArgs["result"]["feedback"]> - - export type $FeedbackPayload = { - name: "Feedback" - objects: {} - scalars: $Extensions.GetPayloadResult<{ - id: number - name: string - email: string - phone: string | null - subject: string - message: string - rating: number | null - category: string | null - status: string - createdAt: Date - updatedAt: Date - resolvedAt: Date | null - resolvedBy: string | null - adminNotes: string | null - }, ExtArgs["result"]["feedback"]> - composites: {} - } - - type FeedbackGetPayload = $Result.GetResult - - type FeedbackCountArgs = - Omit & { - select?: FeedbackCountAggregateInputType | true - } - - export interface FeedbackDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Feedback'], meta: { name: 'Feedback' } } - /** - * Find zero or one Feedback that matches the filter. - * @param {FeedbackFindUniqueArgs} args - Arguments to find a Feedback - * @example - * // Get one Feedback - * const feedback = await prisma.feedback.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__FeedbackClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Feedback that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {FeedbackFindUniqueOrThrowArgs} args - Arguments to find a Feedback - * @example - * // Get one Feedback - * const feedback = await prisma.feedback.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__FeedbackClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Feedback that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {FeedbackFindFirstArgs} args - Arguments to find a Feedback - * @example - * // Get one Feedback - * const feedback = await prisma.feedback.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__FeedbackClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Feedback that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {FeedbackFindFirstOrThrowArgs} args - Arguments to find a Feedback - * @example - * // Get one Feedback - * const feedback = await prisma.feedback.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__FeedbackClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Feedbacks that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {FeedbackFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Feedbacks - * const feedbacks = await prisma.feedback.findMany() - * - * // Get first 10 Feedbacks - * const feedbacks = await prisma.feedback.findMany({ take: 10 }) - * - * // Only select the `id` - * const feedbackWithIdOnly = await prisma.feedback.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Feedback. - * @param {FeedbackCreateArgs} args - Arguments to create a Feedback. - * @example - * // Create one Feedback - * const Feedback = await prisma.feedback.create({ - * data: { - * // ... data to create a Feedback - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__FeedbackClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Feedbacks. - * @param {FeedbackCreateManyArgs} args - Arguments to create many Feedbacks. - * @example - * // Create many Feedbacks - * const feedback = await prisma.feedback.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Feedbacks and returns the data saved in the database. - * @param {FeedbackCreateManyAndReturnArgs} args - Arguments to create many Feedbacks. - * @example - * // Create many Feedbacks - * const feedback = await prisma.feedback.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Feedbacks and only return the `id` - * const feedbackWithIdOnly = await prisma.feedback.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a Feedback. - * @param {FeedbackDeleteArgs} args - Arguments to delete one Feedback. - * @example - * // Delete one Feedback - * const Feedback = await prisma.feedback.delete({ - * where: { - * // ... filter to delete one Feedback - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__FeedbackClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Feedback. - * @param {FeedbackUpdateArgs} args - Arguments to update one Feedback. - * @example - * // Update one Feedback - * const feedback = await prisma.feedback.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__FeedbackClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Feedbacks. - * @param {FeedbackDeleteManyArgs} args - Arguments to filter Feedbacks to delete. - * @example - * // Delete a few Feedbacks - * const { count } = await prisma.feedback.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Feedbacks. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {FeedbackUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Feedbacks - * const feedback = await prisma.feedback.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Feedbacks and returns the data updated in the database. - * @param {FeedbackUpdateManyAndReturnArgs} args - Arguments to update many Feedbacks. - * @example - * // Update many Feedbacks - * const feedback = await prisma.feedback.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Feedbacks and only return the `id` - * const feedbackWithIdOnly = await prisma.feedback.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one Feedback. - * @param {FeedbackUpsertArgs} args - Arguments to update or create a Feedback. - * @example - * // Update or create a Feedback - * const feedback = await prisma.feedback.upsert({ - * create: { - * // ... data to create a Feedback - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Feedback we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__FeedbackClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Feedbacks. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {FeedbackCountArgs} args - Arguments to filter Feedbacks to count. - * @example - * // Count the number of Feedbacks - * const count = await prisma.feedback.count({ - * where: { - * // ... the filter for the Feedbacks we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Feedback. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {FeedbackAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Feedback. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {FeedbackGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends FeedbackGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: FeedbackGroupByArgs['orderBy'] } - : { orderBy?: FeedbackGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetFeedbackGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Feedback model - */ - readonly fields: FeedbackFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Feedback. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__FeedbackClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the Feedback model - */ - interface FeedbackFieldRefs { - readonly id: FieldRef<"Feedback", 'Int'> - readonly name: FieldRef<"Feedback", 'String'> - readonly email: FieldRef<"Feedback", 'String'> - readonly phone: FieldRef<"Feedback", 'String'> - readonly subject: FieldRef<"Feedback", 'String'> - readonly message: FieldRef<"Feedback", 'String'> - readonly rating: FieldRef<"Feedback", 'Int'> - readonly category: FieldRef<"Feedback", 'String'> - readonly status: FieldRef<"Feedback", 'String'> - readonly createdAt: FieldRef<"Feedback", 'DateTime'> - readonly updatedAt: FieldRef<"Feedback", 'DateTime'> - readonly resolvedAt: FieldRef<"Feedback", 'DateTime'> - readonly resolvedBy: FieldRef<"Feedback", 'String'> - readonly adminNotes: FieldRef<"Feedback", 'String'> - } - - - // Custom InputTypes - /** - * Feedback findUnique - */ - export type FeedbackFindUniqueArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelect | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * Filter, which Feedback to fetch. - */ - where: FeedbackWhereUniqueInput - } - - /** - * Feedback findUniqueOrThrow - */ - export type FeedbackFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelect | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * Filter, which Feedback to fetch. - */ - where: FeedbackWhereUniqueInput - } - - /** - * Feedback findFirst - */ - export type FeedbackFindFirstArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelect | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * Filter, which Feedback to fetch. - */ - where?: FeedbackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Feedbacks to fetch. - */ - orderBy?: FeedbackOrderByWithRelationInput | FeedbackOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Feedbacks. - */ - cursor?: FeedbackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Feedbacks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Feedbacks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Feedbacks. - */ - distinct?: FeedbackScalarFieldEnum | FeedbackScalarFieldEnum[] - } - - /** - * Feedback findFirstOrThrow - */ - export type FeedbackFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelect | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * Filter, which Feedback to fetch. - */ - where?: FeedbackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Feedbacks to fetch. - */ - orderBy?: FeedbackOrderByWithRelationInput | FeedbackOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Feedbacks. - */ - cursor?: FeedbackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Feedbacks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Feedbacks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Feedbacks. - */ - distinct?: FeedbackScalarFieldEnum | FeedbackScalarFieldEnum[] - } - - /** - * Feedback findMany - */ - export type FeedbackFindManyArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelect | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * Filter, which Feedbacks to fetch. - */ - where?: FeedbackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Feedbacks to fetch. - */ - orderBy?: FeedbackOrderByWithRelationInput | FeedbackOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Feedbacks. - */ - cursor?: FeedbackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Feedbacks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Feedbacks. - */ - skip?: number - distinct?: FeedbackScalarFieldEnum | FeedbackScalarFieldEnum[] - } - - /** - * Feedback create - */ - export type FeedbackCreateArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelect | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * The data needed to create a Feedback. - */ - data: XOR - } - - /** - * Feedback createMany - */ - export type FeedbackCreateManyArgs = { - /** - * The data used to create many Feedbacks. - */ - data: FeedbackCreateManyInput | FeedbackCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Feedback createManyAndReturn - */ - export type FeedbackCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelectCreateManyAndReturn | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * The data used to create many Feedbacks. - */ - data: FeedbackCreateManyInput | FeedbackCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Feedback update - */ - export type FeedbackUpdateArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelect | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * The data needed to update a Feedback. - */ - data: XOR - /** - * Choose, which Feedback to update. - */ - where: FeedbackWhereUniqueInput - } - - /** - * Feedback updateMany - */ - export type FeedbackUpdateManyArgs = { - /** - * The data used to update Feedbacks. - */ - data: XOR - /** - * Filter which Feedbacks to update - */ - where?: FeedbackWhereInput - /** - * Limit how many Feedbacks to update. - */ - limit?: number - } - - /** - * Feedback updateManyAndReturn - */ - export type FeedbackUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * The data used to update Feedbacks. - */ - data: XOR - /** - * Filter which Feedbacks to update - */ - where?: FeedbackWhereInput - /** - * Limit how many Feedbacks to update. - */ - limit?: number - } - - /** - * Feedback upsert - */ - export type FeedbackUpsertArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelect | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * The filter to search for the Feedback to update in case it exists. - */ - where: FeedbackWhereUniqueInput - /** - * In case the Feedback found by the `where` argument doesn't exist, create a new Feedback with this data. - */ - create: XOR - /** - * In case the Feedback was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Feedback delete - */ - export type FeedbackDeleteArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelect | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - /** - * Filter which Feedback to delete. - */ - where: FeedbackWhereUniqueInput - } - - /** - * Feedback deleteMany - */ - export type FeedbackDeleteManyArgs = { - /** - * Filter which Feedbacks to delete - */ - where?: FeedbackWhereInput - /** - * Limit how many Feedbacks to delete. - */ - limit?: number - } - - /** - * Feedback without action - */ - export type FeedbackDefaultArgs = { - /** - * Select specific fields to fetch from the Feedback - */ - select?: FeedbackSelect | null - /** - * Omit specific fields from the Feedback - */ - omit?: FeedbackOmit | null - } - - - /** - * Model Grievance - */ - - export type AggregateGrievance = { - _count: GrievanceCountAggregateOutputType | null - _avg: GrievanceAvgAggregateOutputType | null - _sum: GrievanceSumAggregateOutputType | null - _min: GrievanceMinAggregateOutputType | null - _max: GrievanceMaxAggregateOutputType | null - } - - export type GrievanceAvgAggregateOutputType = { - id: number | null - } - - export type GrievanceSumAggregateOutputType = { - id: number | null - } - - export type GrievanceMinAggregateOutputType = { - id: number | null - name: string | null - email: string | null - phone: string | null - address: string | null - subject: string | null - description: string | null - category: string | null - priority: string | null - status: string | null - createdAt: Date | null - updatedAt: Date | null - assignedTo: string | null - adminNotes: string | null - resolvedAt: Date | null - trackingId: string | null - } - - export type GrievanceMaxAggregateOutputType = { - id: number | null - name: string | null - email: string | null - phone: string | null - address: string | null - subject: string | null - description: string | null - category: string | null - priority: string | null - status: string | null - createdAt: Date | null - updatedAt: Date | null - assignedTo: string | null - adminNotes: string | null - resolvedAt: Date | null - trackingId: string | null - } - - export type GrievanceCountAggregateOutputType = { - id: number - name: number - email: number - phone: number - address: number - subject: number - description: number - category: number - priority: number - status: number - attachments: number - createdAt: number - updatedAt: number - assignedTo: number - adminNotes: number - resolvedAt: number - trackingId: number - _all: number - } - - - export type GrievanceAvgAggregateInputType = { - id?: true - } - - export type GrievanceSumAggregateInputType = { - id?: true - } - - export type GrievanceMinAggregateInputType = { - id?: true - name?: true - email?: true - phone?: true - address?: true - subject?: true - description?: true - category?: true - priority?: true - status?: true - createdAt?: true - updatedAt?: true - assignedTo?: true - adminNotes?: true - resolvedAt?: true - trackingId?: true - } - - export type GrievanceMaxAggregateInputType = { - id?: true - name?: true - email?: true - phone?: true - address?: true - subject?: true - description?: true - category?: true - priority?: true - status?: true - createdAt?: true - updatedAt?: true - assignedTo?: true - adminNotes?: true - resolvedAt?: true - trackingId?: true - } - - export type GrievanceCountAggregateInputType = { - id?: true - name?: true - email?: true - phone?: true - address?: true - subject?: true - description?: true - category?: true - priority?: true - status?: true - attachments?: true - createdAt?: true - updatedAt?: true - assignedTo?: true - adminNotes?: true - resolvedAt?: true - trackingId?: true - _all?: true - } - - export type GrievanceAggregateArgs = { - /** - * Filter which Grievance to aggregate. - */ - where?: GrievanceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Grievances to fetch. - */ - orderBy?: GrievanceOrderByWithRelationInput | GrievanceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: GrievanceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Grievances from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Grievances. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Grievances - **/ - _count?: true | GrievanceCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: GrievanceAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: GrievanceSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: GrievanceMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: GrievanceMaxAggregateInputType - } - - export type GetGrievanceAggregateType = { - [P in keyof T & keyof AggregateGrievance]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type GrievanceGroupByArgs = { - where?: GrievanceWhereInput - orderBy?: GrievanceOrderByWithAggregationInput | GrievanceOrderByWithAggregationInput[] - by: GrievanceScalarFieldEnum[] | GrievanceScalarFieldEnum - having?: GrievanceScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: GrievanceCountAggregateInputType | true - _avg?: GrievanceAvgAggregateInputType - _sum?: GrievanceSumAggregateInputType - _min?: GrievanceMinAggregateInputType - _max?: GrievanceMaxAggregateInputType - } - - export type GrievanceGroupByOutputType = { - id: number - name: string - email: string - phone: string - address: string - subject: string - description: string - category: string | null - priority: string - status: string - attachments: string[] - createdAt: Date - updatedAt: Date - assignedTo: string | null - adminNotes: string | null - resolvedAt: Date | null - trackingId: string - _count: GrievanceCountAggregateOutputType | null - _avg: GrievanceAvgAggregateOutputType | null - _sum: GrievanceSumAggregateOutputType | null - _min: GrievanceMinAggregateOutputType | null - _max: GrievanceMaxAggregateOutputType | null - } - - type GetGrievanceGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof GrievanceGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type GrievanceSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - address?: boolean - subject?: boolean - description?: boolean - category?: boolean - priority?: boolean - status?: boolean - attachments?: boolean - createdAt?: boolean - updatedAt?: boolean - assignedTo?: boolean - adminNotes?: boolean - resolvedAt?: boolean - trackingId?: boolean - }, ExtArgs["result"]["grievance"]> - - export type GrievanceSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - address?: boolean - subject?: boolean - description?: boolean - category?: boolean - priority?: boolean - status?: boolean - attachments?: boolean - createdAt?: boolean - updatedAt?: boolean - assignedTo?: boolean - adminNotes?: boolean - resolvedAt?: boolean - trackingId?: boolean - }, ExtArgs["result"]["grievance"]> - - export type GrievanceSelectUpdateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - address?: boolean - subject?: boolean - description?: boolean - category?: boolean - priority?: boolean - status?: boolean - attachments?: boolean - createdAt?: boolean - updatedAt?: boolean - assignedTo?: boolean - adminNotes?: boolean - resolvedAt?: boolean - trackingId?: boolean - }, ExtArgs["result"]["grievance"]> - - export type GrievanceSelectScalar = { - id?: boolean - name?: boolean - email?: boolean - phone?: boolean - address?: boolean - subject?: boolean - description?: boolean - category?: boolean - priority?: boolean - status?: boolean - attachments?: boolean - createdAt?: boolean - updatedAt?: boolean - assignedTo?: boolean - adminNotes?: boolean - resolvedAt?: boolean - trackingId?: boolean - } - - export type GrievanceOmit = $Extensions.GetOmit<"id" | "name" | "email" | "phone" | "address" | "subject" | "description" | "category" | "priority" | "status" | "attachments" | "createdAt" | "updatedAt" | "assignedTo" | "adminNotes" | "resolvedAt" | "trackingId", ExtArgs["result"]["grievance"]> - - export type $GrievancePayload = { - name: "Grievance" - objects: {} - scalars: $Extensions.GetPayloadResult<{ - id: number - name: string - email: string - phone: string - address: string - subject: string - description: string - category: string | null - priority: string - status: string - attachments: string[] - createdAt: Date - updatedAt: Date - assignedTo: string | null - adminNotes: string | null - resolvedAt: Date | null - trackingId: string - }, ExtArgs["result"]["grievance"]> - composites: {} - } - - type GrievanceGetPayload = $Result.GetResult - - type GrievanceCountArgs = - Omit & { - select?: GrievanceCountAggregateInputType | true - } - - export interface GrievanceDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Grievance'], meta: { name: 'Grievance' } } - /** - * Find zero or one Grievance that matches the filter. - * @param {GrievanceFindUniqueArgs} args - Arguments to find a Grievance - * @example - * // Get one Grievance - * const grievance = await prisma.grievance.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__GrievanceClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Grievance that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {GrievanceFindUniqueOrThrowArgs} args - Arguments to find a Grievance - * @example - * // Get one Grievance - * const grievance = await prisma.grievance.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__GrievanceClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Grievance that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GrievanceFindFirstArgs} args - Arguments to find a Grievance - * @example - * // Get one Grievance - * const grievance = await prisma.grievance.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__GrievanceClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Grievance that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GrievanceFindFirstOrThrowArgs} args - Arguments to find a Grievance - * @example - * // Get one Grievance - * const grievance = await prisma.grievance.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__GrievanceClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Grievances that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GrievanceFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Grievances - * const grievances = await prisma.grievance.findMany() - * - * // Get first 10 Grievances - * const grievances = await prisma.grievance.findMany({ take: 10 }) - * - * // Only select the `id` - * const grievanceWithIdOnly = await prisma.grievance.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Grievance. - * @param {GrievanceCreateArgs} args - Arguments to create a Grievance. - * @example - * // Create one Grievance - * const Grievance = await prisma.grievance.create({ - * data: { - * // ... data to create a Grievance - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__GrievanceClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Grievances. - * @param {GrievanceCreateManyArgs} args - Arguments to create many Grievances. - * @example - * // Create many Grievances - * const grievance = await prisma.grievance.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Grievances and returns the data saved in the database. - * @param {GrievanceCreateManyAndReturnArgs} args - Arguments to create many Grievances. - * @example - * // Create many Grievances - * const grievance = await prisma.grievance.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Grievances and only return the `id` - * const grievanceWithIdOnly = await prisma.grievance.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a Grievance. - * @param {GrievanceDeleteArgs} args - Arguments to delete one Grievance. - * @example - * // Delete one Grievance - * const Grievance = await prisma.grievance.delete({ - * where: { - * // ... filter to delete one Grievance - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__GrievanceClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Grievance. - * @param {GrievanceUpdateArgs} args - Arguments to update one Grievance. - * @example - * // Update one Grievance - * const grievance = await prisma.grievance.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__GrievanceClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Grievances. - * @param {GrievanceDeleteManyArgs} args - Arguments to filter Grievances to delete. - * @example - * // Delete a few Grievances - * const { count } = await prisma.grievance.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Grievances. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GrievanceUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Grievances - * const grievance = await prisma.grievance.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Grievances and returns the data updated in the database. - * @param {GrievanceUpdateManyAndReturnArgs} args - Arguments to update many Grievances. - * @example - * // Update many Grievances - * const grievance = await prisma.grievance.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Grievances and only return the `id` - * const grievanceWithIdOnly = await prisma.grievance.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one Grievance. - * @param {GrievanceUpsertArgs} args - Arguments to update or create a Grievance. - * @example - * // Update or create a Grievance - * const grievance = await prisma.grievance.upsert({ - * create: { - * // ... data to create a Grievance - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Grievance we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__GrievanceClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Grievances. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GrievanceCountArgs} args - Arguments to filter Grievances to count. - * @example - * // Count the number of Grievances - * const count = await prisma.grievance.count({ - * where: { - * // ... the filter for the Grievances we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Grievance. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GrievanceAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Grievance. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GrievanceGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends GrievanceGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: GrievanceGroupByArgs['orderBy'] } - : { orderBy?: GrievanceGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetGrievanceGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Grievance model - */ - readonly fields: GrievanceFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Grievance. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__GrievanceClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the Grievance model - */ - interface GrievanceFieldRefs { - readonly id: FieldRef<"Grievance", 'Int'> - readonly name: FieldRef<"Grievance", 'String'> - readonly email: FieldRef<"Grievance", 'String'> - readonly phone: FieldRef<"Grievance", 'String'> - readonly address: FieldRef<"Grievance", 'String'> - readonly subject: FieldRef<"Grievance", 'String'> - readonly description: FieldRef<"Grievance", 'String'> - readonly category: FieldRef<"Grievance", 'String'> - readonly priority: FieldRef<"Grievance", 'String'> - readonly status: FieldRef<"Grievance", 'String'> - readonly attachments: FieldRef<"Grievance", 'String[]'> - readonly createdAt: FieldRef<"Grievance", 'DateTime'> - readonly updatedAt: FieldRef<"Grievance", 'DateTime'> - readonly assignedTo: FieldRef<"Grievance", 'String'> - readonly adminNotes: FieldRef<"Grievance", 'String'> - readonly resolvedAt: FieldRef<"Grievance", 'DateTime'> - readonly trackingId: FieldRef<"Grievance", 'String'> - } - - - // Custom InputTypes - /** - * Grievance findUnique - */ - export type GrievanceFindUniqueArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelect | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * Filter, which Grievance to fetch. - */ - where: GrievanceWhereUniqueInput - } - - /** - * Grievance findUniqueOrThrow - */ - export type GrievanceFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelect | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * Filter, which Grievance to fetch. - */ - where: GrievanceWhereUniqueInput - } - - /** - * Grievance findFirst - */ - export type GrievanceFindFirstArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelect | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * Filter, which Grievance to fetch. - */ - where?: GrievanceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Grievances to fetch. - */ - orderBy?: GrievanceOrderByWithRelationInput | GrievanceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Grievances. - */ - cursor?: GrievanceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Grievances from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Grievances. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Grievances. - */ - distinct?: GrievanceScalarFieldEnum | GrievanceScalarFieldEnum[] - } - - /** - * Grievance findFirstOrThrow - */ - export type GrievanceFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelect | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * Filter, which Grievance to fetch. - */ - where?: GrievanceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Grievances to fetch. - */ - orderBy?: GrievanceOrderByWithRelationInput | GrievanceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Grievances. - */ - cursor?: GrievanceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Grievances from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Grievances. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Grievances. - */ - distinct?: GrievanceScalarFieldEnum | GrievanceScalarFieldEnum[] - } - - /** - * Grievance findMany - */ - export type GrievanceFindManyArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelect | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * Filter, which Grievances to fetch. - */ - where?: GrievanceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Grievances to fetch. - */ - orderBy?: GrievanceOrderByWithRelationInput | GrievanceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Grievances. - */ - cursor?: GrievanceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Grievances from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Grievances. - */ - skip?: number - distinct?: GrievanceScalarFieldEnum | GrievanceScalarFieldEnum[] - } - - /** - * Grievance create - */ - export type GrievanceCreateArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelect | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * The data needed to create a Grievance. - */ - data: XOR - } - - /** - * Grievance createMany - */ - export type GrievanceCreateManyArgs = { - /** - * The data used to create many Grievances. - */ - data: GrievanceCreateManyInput | GrievanceCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Grievance createManyAndReturn - */ - export type GrievanceCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelectCreateManyAndReturn | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * The data used to create many Grievances. - */ - data: GrievanceCreateManyInput | GrievanceCreateManyInput[] - skipDuplicates?: boolean - } - - /** - * Grievance update - */ - export type GrievanceUpdateArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelect | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * The data needed to update a Grievance. - */ - data: XOR - /** - * Choose, which Grievance to update. - */ - where: GrievanceWhereUniqueInput - } - - /** - * Grievance updateMany - */ - export type GrievanceUpdateManyArgs = { - /** - * The data used to update Grievances. - */ - data: XOR - /** - * Filter which Grievances to update - */ - where?: GrievanceWhereInput - /** - * Limit how many Grievances to update. - */ - limit?: number - } - - /** - * Grievance updateManyAndReturn - */ - export type GrievanceUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * The data used to update Grievances. - */ - data: XOR - /** - * Filter which Grievances to update - */ - where?: GrievanceWhereInput - /** - * Limit how many Grievances to update. - */ - limit?: number - } - - /** - * Grievance upsert - */ - export type GrievanceUpsertArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelect | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * The filter to search for the Grievance to update in case it exists. - */ - where: GrievanceWhereUniqueInput - /** - * In case the Grievance found by the `where` argument doesn't exist, create a new Grievance with this data. - */ - create: XOR - /** - * In case the Grievance was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Grievance delete - */ - export type GrievanceDeleteArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelect | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - /** - * Filter which Grievance to delete. - */ - where: GrievanceWhereUniqueInput - } - - /** - * Grievance deleteMany - */ - export type GrievanceDeleteManyArgs = { - /** - * Filter which Grievances to delete - */ - where?: GrievanceWhereInput - /** - * Limit how many Grievances to delete. - */ - limit?: number - } - - /** - * Grievance without action - */ - export type GrievanceDefaultArgs = { - /** - * Select specific fields to fetch from the Grievance - */ - select?: GrievanceSelect | null - /** - * Omit specific fields from the Grievance - */ - omit?: GrievanceOmit | null - } - - - /** - * Enums - */ - - export const TransactionIsolationLevel: { - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' - }; - - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - - - export const AdminScalarFieldEnum: { - id: 'id', - email: 'email', - password: 'password', - name: 'name', - role: 'role', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type AdminScalarFieldEnum = (typeof AdminScalarFieldEnum)[keyof typeof AdminScalarFieldEnum] - - - export const SchemeServiceScalarFieldEnum: { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - schemeDetails: 'schemeDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' - }; - - export type SchemeServiceScalarFieldEnum = (typeof SchemeServiceScalarFieldEnum)[keyof typeof SchemeServiceScalarFieldEnum] - - - export const ContactPersonScalarFieldEnum: { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - schemeServiceId: 'schemeServiceId' - }; - - export type ContactPersonScalarFieldEnum = (typeof ContactPersonScalarFieldEnum)[keyof typeof ContactPersonScalarFieldEnum] - - - export const SupportiveDocumentScalarFieldEnum: { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - schemeServiceId: 'schemeServiceId' - }; - - export type SupportiveDocumentScalarFieldEnum = (typeof SupportiveDocumentScalarFieldEnum)[keyof typeof SupportiveDocumentScalarFieldEnum] - - - export const CertificateServiceScalarFieldEnum: { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - certificateDetails: 'certificateDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' - }; - - export type CertificateServiceScalarFieldEnum = (typeof CertificateServiceScalarFieldEnum)[keyof typeof CertificateServiceScalarFieldEnum] - - - export const CertificateContactScalarFieldEnum: { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' - }; - - export type CertificateContactScalarFieldEnum = (typeof CertificateContactScalarFieldEnum)[keyof typeof CertificateContactScalarFieldEnum] - - - export const CertificateDocumentScalarFieldEnum: { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' - }; - - export type CertificateDocumentScalarFieldEnum = (typeof CertificateDocumentScalarFieldEnum)[keyof typeof CertificateDocumentScalarFieldEnum] - - - export const CertificateProcessStepScalarFieldEnum: { - id: 'id', - slNo: 'slNo', - stepDetails: 'stepDetails', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' - }; - - export type CertificateProcessStepScalarFieldEnum = (typeof CertificateProcessStepScalarFieldEnum)[keyof typeof CertificateProcessStepScalarFieldEnum] - - - export const CertificateEligibilityScalarFieldEnum: { - id: 'id', - eligibilityDetail: 'eligibilityDetail', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' - }; - - export type CertificateEligibilityScalarFieldEnum = (typeof CertificateEligibilityScalarFieldEnum)[keyof typeof CertificateEligibilityScalarFieldEnum] - - - export const ContactServiceScalarFieldEnum: { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - contactDetails: 'contactDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' - }; - - export type ContactServiceScalarFieldEnum = (typeof ContactServiceScalarFieldEnum)[keyof typeof ContactServiceScalarFieldEnum] - - - export const ContactServiceContactScalarFieldEnum: { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - contactServiceId: 'contactServiceId' - }; - - export type ContactServiceContactScalarFieldEnum = (typeof ContactServiceContactScalarFieldEnum)[keyof typeof ContactServiceContactScalarFieldEnum] - - - export const ContactServiceDocumentScalarFieldEnum: { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - contactServiceId: 'contactServiceId' - }; - - export type ContactServiceDocumentScalarFieldEnum = (typeof ContactServiceDocumentScalarFieldEnum)[keyof typeof ContactServiceDocumentScalarFieldEnum] - - - export const PostScalarFieldEnum: { - id: 'id', - postName: 'postName', - rank: 'rank', - description: 'description', - department: 'department', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - officeId: 'officeId' - }; - - export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] - - - export const EmployeeScalarFieldEnum: { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - designation: 'designation', - employeeId: 'employeeId', - joiningDate: 'joiningDate', - salary: 'salary', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - postId: 'postId' - }; - - export type EmployeeScalarFieldEnum = (typeof EmployeeScalarFieldEnum)[keyof typeof EmployeeScalarFieldEnum] - - - export const FeedbackScalarFieldEnum: { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - subject: 'subject', - message: 'message', - rating: 'rating', - category: 'category', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - resolvedAt: 'resolvedAt', - resolvedBy: 'resolvedBy', - adminNotes: 'adminNotes' - }; - - export type FeedbackScalarFieldEnum = (typeof FeedbackScalarFieldEnum)[keyof typeof FeedbackScalarFieldEnum] - - - export const GrievanceScalarFieldEnum: { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - address: 'address', - subject: 'subject', - description: 'description', - category: 'category', - priority: 'priority', - status: 'status', - attachments: 'attachments', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - assignedTo: 'assignedTo', - adminNotes: 'adminNotes', - resolvedAt: 'resolvedAt', - trackingId: 'trackingId' - }; - - export type GrievanceScalarFieldEnum = (typeof GrievanceScalarFieldEnum)[keyof typeof GrievanceScalarFieldEnum] - - - export const SortOrder: { - asc: 'asc', - desc: 'desc' - }; - - export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - - - export const QueryMode: { - default: 'default', - insensitive: 'insensitive' - }; - - export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] - - - export const NullsOrder: { - first: 'first', - last: 'last' - }; - - export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] - - - /** - * Field references - */ - - - /** - * Reference to a field of type 'Int' - */ - export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> - - - - /** - * Reference to a field of type 'Int[]' - */ - export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> - - - - /** - * Reference to a field of type 'String' - */ - export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> - - - - /** - * Reference to a field of type 'String[]' - */ - export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> - - - - /** - * Reference to a field of type 'DateTime' - */ - export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> - - - - /** - * Reference to a field of type 'DateTime[]' - */ - export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> - - - - /** - * Reference to a field of type 'Boolean' - */ - export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> - - - - /** - * Reference to a field of type 'Float' - */ - export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> - - - - /** - * Reference to a field of type 'Float[]' - */ - export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> - - /** - * Deep Input Types - */ - - - export type AdminWhereInput = { - AND?: AdminWhereInput | AdminWhereInput[] - OR?: AdminWhereInput[] - NOT?: AdminWhereInput | AdminWhereInput[] - id?: IntFilter<"Admin"> | number - email?: StringFilter<"Admin"> | string - password?: StringFilter<"Admin"> | string - name?: StringFilter<"Admin"> | string - role?: StringFilter<"Admin"> | string - createdAt?: DateTimeFilter<"Admin"> | Date | string - updatedAt?: DateTimeFilter<"Admin"> | Date | string - schemeServices?: SchemeServiceListRelationFilter - certificateServices?: CertificateServiceListRelationFilter - contactServices?: ContactServiceListRelationFilter - } - - export type AdminOrderByWithRelationInput = { - id?: SortOrder - email?: SortOrder - password?: SortOrder - name?: SortOrder - role?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - schemeServices?: SchemeServiceOrderByRelationAggregateInput - certificateServices?: CertificateServiceOrderByRelationAggregateInput - contactServices?: ContactServiceOrderByRelationAggregateInput - } - - export type AdminWhereUniqueInput = Prisma.AtLeast<{ - id?: number - email?: string - AND?: AdminWhereInput | AdminWhereInput[] - OR?: AdminWhereInput[] - NOT?: AdminWhereInput | AdminWhereInput[] - password?: StringFilter<"Admin"> | string - name?: StringFilter<"Admin"> | string - role?: StringFilter<"Admin"> | string - createdAt?: DateTimeFilter<"Admin"> | Date | string - updatedAt?: DateTimeFilter<"Admin"> | Date | string - schemeServices?: SchemeServiceListRelationFilter - certificateServices?: CertificateServiceListRelationFilter - contactServices?: ContactServiceListRelationFilter - }, "id" | "email"> - - export type AdminOrderByWithAggregationInput = { - id?: SortOrder - email?: SortOrder - password?: SortOrder - name?: SortOrder - role?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: AdminCountOrderByAggregateInput - _avg?: AdminAvgOrderByAggregateInput - _max?: AdminMaxOrderByAggregateInput - _min?: AdminMinOrderByAggregateInput - _sum?: AdminSumOrderByAggregateInput - } - - export type AdminScalarWhereWithAggregatesInput = { - AND?: AdminScalarWhereWithAggregatesInput | AdminScalarWhereWithAggregatesInput[] - OR?: AdminScalarWhereWithAggregatesInput[] - NOT?: AdminScalarWhereWithAggregatesInput | AdminScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"Admin"> | number - email?: StringWithAggregatesFilter<"Admin"> | string - password?: StringWithAggregatesFilter<"Admin"> | string - name?: StringWithAggregatesFilter<"Admin"> | string - role?: StringWithAggregatesFilter<"Admin"> | string - createdAt?: DateTimeWithAggregatesFilter<"Admin"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Admin"> | Date | string - } - - export type SchemeServiceWhereInput = { - AND?: SchemeServiceWhereInput | SchemeServiceWhereInput[] - OR?: SchemeServiceWhereInput[] - NOT?: SchemeServiceWhereInput | SchemeServiceWhereInput[] - id?: IntFilter<"SchemeService"> | number - name?: StringFilter<"SchemeService"> | string - summary?: StringFilter<"SchemeService"> | string - type?: StringNullableFilter<"SchemeService"> | string | null - targetAudience?: StringNullableListFilter<"SchemeService"> - applicationMode?: StringFilter<"SchemeService"> | string - onlineUrl?: StringNullableFilter<"SchemeService"> | string | null - offlineAddress?: StringNullableFilter<"SchemeService"> | string | null - status?: StringFilter<"SchemeService"> | string - isActive?: BoolFilter<"SchemeService"> | boolean - createdAt?: DateTimeFilter<"SchemeService"> | Date | string - updatedAt?: DateTimeFilter<"SchemeService"> | Date | string - adminId?: IntFilter<"SchemeService"> | number - eligibilityDetails?: StringNullableListFilter<"SchemeService"> - schemeDetails?: StringNullableListFilter<"SchemeService"> - processDetails?: StringNullableListFilter<"SchemeService"> - processNew?: StringNullableFilter<"SchemeService"> | string | null - processUpdate?: StringNullableFilter<"SchemeService"> | string | null - processLost?: StringNullableFilter<"SchemeService"> | string | null - processSurrender?: StringNullableFilter<"SchemeService"> | string | null - docNew?: StringNullableFilter<"SchemeService"> | string | null - docUpdate?: StringNullableFilter<"SchemeService"> | string | null - docLost?: StringNullableFilter<"SchemeService"> | string | null - docSurrender?: StringNullableFilter<"SchemeService"> | string | null - admin?: XOR - contacts?: ContactPersonListRelationFilter - documents?: SupportiveDocumentListRelationFilter - } - - export type SchemeServiceOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrderInput | SortOrder - targetAudience?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrderInput | SortOrder - offlineAddress?: SortOrderInput | SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - eligibilityDetails?: SortOrder - schemeDetails?: SortOrder - processDetails?: SortOrder - processNew?: SortOrderInput | SortOrder - processUpdate?: SortOrderInput | SortOrder - processLost?: SortOrderInput | SortOrder - processSurrender?: SortOrderInput | SortOrder - docNew?: SortOrderInput | SortOrder - docUpdate?: SortOrderInput | SortOrder - docLost?: SortOrderInput | SortOrder - docSurrender?: SortOrderInput | SortOrder - admin?: AdminOrderByWithRelationInput - contacts?: ContactPersonOrderByRelationAggregateInput - documents?: SupportiveDocumentOrderByRelationAggregateInput - } - - export type SchemeServiceWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: SchemeServiceWhereInput | SchemeServiceWhereInput[] - OR?: SchemeServiceWhereInput[] - NOT?: SchemeServiceWhereInput | SchemeServiceWhereInput[] - name?: StringFilter<"SchemeService"> | string - summary?: StringFilter<"SchemeService"> | string - type?: StringNullableFilter<"SchemeService"> | string | null - targetAudience?: StringNullableListFilter<"SchemeService"> - applicationMode?: StringFilter<"SchemeService"> | string - onlineUrl?: StringNullableFilter<"SchemeService"> | string | null - offlineAddress?: StringNullableFilter<"SchemeService"> | string | null - status?: StringFilter<"SchemeService"> | string - isActive?: BoolFilter<"SchemeService"> | boolean - createdAt?: DateTimeFilter<"SchemeService"> | Date | string - updatedAt?: DateTimeFilter<"SchemeService"> | Date | string - adminId?: IntFilter<"SchemeService"> | number - eligibilityDetails?: StringNullableListFilter<"SchemeService"> - schemeDetails?: StringNullableListFilter<"SchemeService"> - processDetails?: StringNullableListFilter<"SchemeService"> - processNew?: StringNullableFilter<"SchemeService"> | string | null - processUpdate?: StringNullableFilter<"SchemeService"> | string | null - processLost?: StringNullableFilter<"SchemeService"> | string | null - processSurrender?: StringNullableFilter<"SchemeService"> | string | null - docNew?: StringNullableFilter<"SchemeService"> | string | null - docUpdate?: StringNullableFilter<"SchemeService"> | string | null - docLost?: StringNullableFilter<"SchemeService"> | string | null - docSurrender?: StringNullableFilter<"SchemeService"> | string | null - admin?: XOR - contacts?: ContactPersonListRelationFilter - documents?: SupportiveDocumentListRelationFilter - }, "id"> - - export type SchemeServiceOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrderInput | SortOrder - targetAudience?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrderInput | SortOrder - offlineAddress?: SortOrderInput | SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - eligibilityDetails?: SortOrder - schemeDetails?: SortOrder - processDetails?: SortOrder - processNew?: SortOrderInput | SortOrder - processUpdate?: SortOrderInput | SortOrder - processLost?: SortOrderInput | SortOrder - processSurrender?: SortOrderInput | SortOrder - docNew?: SortOrderInput | SortOrder - docUpdate?: SortOrderInput | SortOrder - docLost?: SortOrderInput | SortOrder - docSurrender?: SortOrderInput | SortOrder - _count?: SchemeServiceCountOrderByAggregateInput - _avg?: SchemeServiceAvgOrderByAggregateInput - _max?: SchemeServiceMaxOrderByAggregateInput - _min?: SchemeServiceMinOrderByAggregateInput - _sum?: SchemeServiceSumOrderByAggregateInput - } - - export type SchemeServiceScalarWhereWithAggregatesInput = { - AND?: SchemeServiceScalarWhereWithAggregatesInput | SchemeServiceScalarWhereWithAggregatesInput[] - OR?: SchemeServiceScalarWhereWithAggregatesInput[] - NOT?: SchemeServiceScalarWhereWithAggregatesInput | SchemeServiceScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"SchemeService"> | number - name?: StringWithAggregatesFilter<"SchemeService"> | string - summary?: StringWithAggregatesFilter<"SchemeService"> | string - type?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - targetAudience?: StringNullableListFilter<"SchemeService"> - applicationMode?: StringWithAggregatesFilter<"SchemeService"> | string - onlineUrl?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - offlineAddress?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - status?: StringWithAggregatesFilter<"SchemeService"> | string - isActive?: BoolWithAggregatesFilter<"SchemeService"> | boolean - createdAt?: DateTimeWithAggregatesFilter<"SchemeService"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"SchemeService"> | Date | string - adminId?: IntWithAggregatesFilter<"SchemeService"> | number - eligibilityDetails?: StringNullableListFilter<"SchemeService"> - schemeDetails?: StringNullableListFilter<"SchemeService"> - processDetails?: StringNullableListFilter<"SchemeService"> - processNew?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - processUpdate?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - processLost?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - processSurrender?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - docNew?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - docUpdate?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - docLost?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - docSurrender?: StringNullableWithAggregatesFilter<"SchemeService"> | string | null - } - - export type ContactPersonWhereInput = { - AND?: ContactPersonWhereInput | ContactPersonWhereInput[] - OR?: ContactPersonWhereInput[] - NOT?: ContactPersonWhereInput | ContactPersonWhereInput[] - id?: IntFilter<"ContactPerson"> | number - serviceName?: StringFilter<"ContactPerson"> | string - district?: StringFilter<"ContactPerson"> | string - subDistrict?: StringFilter<"ContactPerson"> | string - block?: StringFilter<"ContactPerson"> | string - name?: StringFilter<"ContactPerson"> | string - designation?: StringFilter<"ContactPerson"> | string - contact?: StringFilter<"ContactPerson"> | string - email?: StringFilter<"ContactPerson"> | string - schemeServiceId?: IntFilter<"ContactPerson"> | number - schemeService?: XOR - } - - export type ContactPersonOrderByWithRelationInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - schemeServiceId?: SortOrder - schemeService?: SchemeServiceOrderByWithRelationInput - } - - export type ContactPersonWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: ContactPersonWhereInput | ContactPersonWhereInput[] - OR?: ContactPersonWhereInput[] - NOT?: ContactPersonWhereInput | ContactPersonWhereInput[] - serviceName?: StringFilter<"ContactPerson"> | string - district?: StringFilter<"ContactPerson"> | string - subDistrict?: StringFilter<"ContactPerson"> | string - block?: StringFilter<"ContactPerson"> | string - name?: StringFilter<"ContactPerson"> | string - designation?: StringFilter<"ContactPerson"> | string - contact?: StringFilter<"ContactPerson"> | string - email?: StringFilter<"ContactPerson"> | string - schemeServiceId?: IntFilter<"ContactPerson"> | number - schemeService?: XOR - }, "id"> - - export type ContactPersonOrderByWithAggregationInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - schemeServiceId?: SortOrder - _count?: ContactPersonCountOrderByAggregateInput - _avg?: ContactPersonAvgOrderByAggregateInput - _max?: ContactPersonMaxOrderByAggregateInput - _min?: ContactPersonMinOrderByAggregateInput - _sum?: ContactPersonSumOrderByAggregateInput - } - - export type ContactPersonScalarWhereWithAggregatesInput = { - AND?: ContactPersonScalarWhereWithAggregatesInput | ContactPersonScalarWhereWithAggregatesInput[] - OR?: ContactPersonScalarWhereWithAggregatesInput[] - NOT?: ContactPersonScalarWhereWithAggregatesInput | ContactPersonScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"ContactPerson"> | number - serviceName?: StringWithAggregatesFilter<"ContactPerson"> | string - district?: StringWithAggregatesFilter<"ContactPerson"> | string - subDistrict?: StringWithAggregatesFilter<"ContactPerson"> | string - block?: StringWithAggregatesFilter<"ContactPerson"> | string - name?: StringWithAggregatesFilter<"ContactPerson"> | string - designation?: StringWithAggregatesFilter<"ContactPerson"> | string - contact?: StringWithAggregatesFilter<"ContactPerson"> | string - email?: StringWithAggregatesFilter<"ContactPerson"> | string - schemeServiceId?: IntWithAggregatesFilter<"ContactPerson"> | number - } - - export type SupportiveDocumentWhereInput = { - AND?: SupportiveDocumentWhereInput | SupportiveDocumentWhereInput[] - OR?: SupportiveDocumentWhereInput[] - NOT?: SupportiveDocumentWhereInput | SupportiveDocumentWhereInput[] - id?: IntFilter<"SupportiveDocument"> | number - slNo?: IntFilter<"SupportiveDocument"> | number - documentType?: StringFilter<"SupportiveDocument"> | string - validProof?: StringFilter<"SupportiveDocument"> | string - isRequired?: BoolFilter<"SupportiveDocument"> | boolean - schemeServiceId?: IntFilter<"SupportiveDocument"> | number - schemeService?: XOR - } - - export type SupportiveDocumentOrderByWithRelationInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - schemeServiceId?: SortOrder - schemeService?: SchemeServiceOrderByWithRelationInput - } - - export type SupportiveDocumentWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: SupportiveDocumentWhereInput | SupportiveDocumentWhereInput[] - OR?: SupportiveDocumentWhereInput[] - NOT?: SupportiveDocumentWhereInput | SupportiveDocumentWhereInput[] - slNo?: IntFilter<"SupportiveDocument"> | number - documentType?: StringFilter<"SupportiveDocument"> | string - validProof?: StringFilter<"SupportiveDocument"> | string - isRequired?: BoolFilter<"SupportiveDocument"> | boolean - schemeServiceId?: IntFilter<"SupportiveDocument"> | number - schemeService?: XOR - }, "id"> - - export type SupportiveDocumentOrderByWithAggregationInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - schemeServiceId?: SortOrder - _count?: SupportiveDocumentCountOrderByAggregateInput - _avg?: SupportiveDocumentAvgOrderByAggregateInput - _max?: SupportiveDocumentMaxOrderByAggregateInput - _min?: SupportiveDocumentMinOrderByAggregateInput - _sum?: SupportiveDocumentSumOrderByAggregateInput - } - - export type SupportiveDocumentScalarWhereWithAggregatesInput = { - AND?: SupportiveDocumentScalarWhereWithAggregatesInput | SupportiveDocumentScalarWhereWithAggregatesInput[] - OR?: SupportiveDocumentScalarWhereWithAggregatesInput[] - NOT?: SupportiveDocumentScalarWhereWithAggregatesInput | SupportiveDocumentScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"SupportiveDocument"> | number - slNo?: IntWithAggregatesFilter<"SupportiveDocument"> | number - documentType?: StringWithAggregatesFilter<"SupportiveDocument"> | string - validProof?: StringWithAggregatesFilter<"SupportiveDocument"> | string - isRequired?: BoolWithAggregatesFilter<"SupportiveDocument"> | boolean - schemeServiceId?: IntWithAggregatesFilter<"SupportiveDocument"> | number - } - - export type CertificateServiceWhereInput = { - AND?: CertificateServiceWhereInput | CertificateServiceWhereInput[] - OR?: CertificateServiceWhereInput[] - NOT?: CertificateServiceWhereInput | CertificateServiceWhereInput[] - id?: IntFilter<"CertificateService"> | number - name?: StringFilter<"CertificateService"> | string - summary?: StringFilter<"CertificateService"> | string - type?: StringNullableFilter<"CertificateService"> | string | null - targetAudience?: StringNullableListFilter<"CertificateService"> - applicationMode?: StringFilter<"CertificateService"> | string - onlineUrl?: StringNullableFilter<"CertificateService"> | string | null - offlineAddress?: StringNullableFilter<"CertificateService"> | string | null - status?: StringFilter<"CertificateService"> | string - isActive?: BoolFilter<"CertificateService"> | boolean - createdAt?: DateTimeFilter<"CertificateService"> | Date | string - updatedAt?: DateTimeFilter<"CertificateService"> | Date | string - adminId?: IntFilter<"CertificateService"> | number - eligibilityDetails?: StringNullableListFilter<"CertificateService"> - certificateDetails?: StringNullableListFilter<"CertificateService"> - processDetails?: StringNullableListFilter<"CertificateService"> - processNew?: StringNullableFilter<"CertificateService"> | string | null - processUpdate?: StringNullableFilter<"CertificateService"> | string | null - processLost?: StringNullableFilter<"CertificateService"> | string | null - processSurrender?: StringNullableFilter<"CertificateService"> | string | null - docNew?: StringNullableFilter<"CertificateService"> | string | null - docUpdate?: StringNullableFilter<"CertificateService"> | string | null - docLost?: StringNullableFilter<"CertificateService"> | string | null - docSurrender?: StringNullableFilter<"CertificateService"> | string | null - admin?: XOR - contacts?: CertificateContactListRelationFilter - documents?: CertificateDocumentListRelationFilter - processSteps?: CertificateProcessStepListRelationFilter - eligibilityItems?: CertificateEligibilityListRelationFilter - } - - export type CertificateServiceOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrderInput | SortOrder - targetAudience?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrderInput | SortOrder - offlineAddress?: SortOrderInput | SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - eligibilityDetails?: SortOrder - certificateDetails?: SortOrder - processDetails?: SortOrder - processNew?: SortOrderInput | SortOrder - processUpdate?: SortOrderInput | SortOrder - processLost?: SortOrderInput | SortOrder - processSurrender?: SortOrderInput | SortOrder - docNew?: SortOrderInput | SortOrder - docUpdate?: SortOrderInput | SortOrder - docLost?: SortOrderInput | SortOrder - docSurrender?: SortOrderInput | SortOrder - admin?: AdminOrderByWithRelationInput - contacts?: CertificateContactOrderByRelationAggregateInput - documents?: CertificateDocumentOrderByRelationAggregateInput - processSteps?: CertificateProcessStepOrderByRelationAggregateInput - eligibilityItems?: CertificateEligibilityOrderByRelationAggregateInput - } - - export type CertificateServiceWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: CertificateServiceWhereInput | CertificateServiceWhereInput[] - OR?: CertificateServiceWhereInput[] - NOT?: CertificateServiceWhereInput | CertificateServiceWhereInput[] - name?: StringFilter<"CertificateService"> | string - summary?: StringFilter<"CertificateService"> | string - type?: StringNullableFilter<"CertificateService"> | string | null - targetAudience?: StringNullableListFilter<"CertificateService"> - applicationMode?: StringFilter<"CertificateService"> | string - onlineUrl?: StringNullableFilter<"CertificateService"> | string | null - offlineAddress?: StringNullableFilter<"CertificateService"> | string | null - status?: StringFilter<"CertificateService"> | string - isActive?: BoolFilter<"CertificateService"> | boolean - createdAt?: DateTimeFilter<"CertificateService"> | Date | string - updatedAt?: DateTimeFilter<"CertificateService"> | Date | string - adminId?: IntFilter<"CertificateService"> | number - eligibilityDetails?: StringNullableListFilter<"CertificateService"> - certificateDetails?: StringNullableListFilter<"CertificateService"> - processDetails?: StringNullableListFilter<"CertificateService"> - processNew?: StringNullableFilter<"CertificateService"> | string | null - processUpdate?: StringNullableFilter<"CertificateService"> | string | null - processLost?: StringNullableFilter<"CertificateService"> | string | null - processSurrender?: StringNullableFilter<"CertificateService"> | string | null - docNew?: StringNullableFilter<"CertificateService"> | string | null - docUpdate?: StringNullableFilter<"CertificateService"> | string | null - docLost?: StringNullableFilter<"CertificateService"> | string | null - docSurrender?: StringNullableFilter<"CertificateService"> | string | null - admin?: XOR - contacts?: CertificateContactListRelationFilter - documents?: CertificateDocumentListRelationFilter - processSteps?: CertificateProcessStepListRelationFilter - eligibilityItems?: CertificateEligibilityListRelationFilter - }, "id"> - - export type CertificateServiceOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrderInput | SortOrder - targetAudience?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrderInput | SortOrder - offlineAddress?: SortOrderInput | SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - eligibilityDetails?: SortOrder - certificateDetails?: SortOrder - processDetails?: SortOrder - processNew?: SortOrderInput | SortOrder - processUpdate?: SortOrderInput | SortOrder - processLost?: SortOrderInput | SortOrder - processSurrender?: SortOrderInput | SortOrder - docNew?: SortOrderInput | SortOrder - docUpdate?: SortOrderInput | SortOrder - docLost?: SortOrderInput | SortOrder - docSurrender?: SortOrderInput | SortOrder - _count?: CertificateServiceCountOrderByAggregateInput - _avg?: CertificateServiceAvgOrderByAggregateInput - _max?: CertificateServiceMaxOrderByAggregateInput - _min?: CertificateServiceMinOrderByAggregateInput - _sum?: CertificateServiceSumOrderByAggregateInput - } - - export type CertificateServiceScalarWhereWithAggregatesInput = { - AND?: CertificateServiceScalarWhereWithAggregatesInput | CertificateServiceScalarWhereWithAggregatesInput[] - OR?: CertificateServiceScalarWhereWithAggregatesInput[] - NOT?: CertificateServiceScalarWhereWithAggregatesInput | CertificateServiceScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"CertificateService"> | number - name?: StringWithAggregatesFilter<"CertificateService"> | string - summary?: StringWithAggregatesFilter<"CertificateService"> | string - type?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - targetAudience?: StringNullableListFilter<"CertificateService"> - applicationMode?: StringWithAggregatesFilter<"CertificateService"> | string - onlineUrl?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - offlineAddress?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - status?: StringWithAggregatesFilter<"CertificateService"> | string - isActive?: BoolWithAggregatesFilter<"CertificateService"> | boolean - createdAt?: DateTimeWithAggregatesFilter<"CertificateService"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"CertificateService"> | Date | string - adminId?: IntWithAggregatesFilter<"CertificateService"> | number - eligibilityDetails?: StringNullableListFilter<"CertificateService"> - certificateDetails?: StringNullableListFilter<"CertificateService"> - processDetails?: StringNullableListFilter<"CertificateService"> - processNew?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - processUpdate?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - processLost?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - processSurrender?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - docNew?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - docUpdate?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - docLost?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - docSurrender?: StringNullableWithAggregatesFilter<"CertificateService"> | string | null - } - - export type CertificateContactWhereInput = { - AND?: CertificateContactWhereInput | CertificateContactWhereInput[] - OR?: CertificateContactWhereInput[] - NOT?: CertificateContactWhereInput | CertificateContactWhereInput[] - id?: IntFilter<"CertificateContact"> | number - serviceName?: StringFilter<"CertificateContact"> | string - district?: StringFilter<"CertificateContact"> | string - subDistrict?: StringFilter<"CertificateContact"> | string - block?: StringFilter<"CertificateContact"> | string - name?: StringFilter<"CertificateContact"> | string - designation?: StringFilter<"CertificateContact"> | string - contact?: StringFilter<"CertificateContact"> | string - email?: StringFilter<"CertificateContact"> | string - applicationType?: StringFilter<"CertificateContact"> | string - certificateServiceId?: IntFilter<"CertificateContact"> | number - certificateService?: XOR - } - - export type CertificateContactOrderByWithRelationInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - certificateService?: CertificateServiceOrderByWithRelationInput - } - - export type CertificateContactWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: CertificateContactWhereInput | CertificateContactWhereInput[] - OR?: CertificateContactWhereInput[] - NOT?: CertificateContactWhereInput | CertificateContactWhereInput[] - serviceName?: StringFilter<"CertificateContact"> | string - district?: StringFilter<"CertificateContact"> | string - subDistrict?: StringFilter<"CertificateContact"> | string - block?: StringFilter<"CertificateContact"> | string - name?: StringFilter<"CertificateContact"> | string - designation?: StringFilter<"CertificateContact"> | string - contact?: StringFilter<"CertificateContact"> | string - email?: StringFilter<"CertificateContact"> | string - applicationType?: StringFilter<"CertificateContact"> | string - certificateServiceId?: IntFilter<"CertificateContact"> | number - certificateService?: XOR - }, "id"> - - export type CertificateContactOrderByWithAggregationInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - _count?: CertificateContactCountOrderByAggregateInput - _avg?: CertificateContactAvgOrderByAggregateInput - _max?: CertificateContactMaxOrderByAggregateInput - _min?: CertificateContactMinOrderByAggregateInput - _sum?: CertificateContactSumOrderByAggregateInput - } - - export type CertificateContactScalarWhereWithAggregatesInput = { - AND?: CertificateContactScalarWhereWithAggregatesInput | CertificateContactScalarWhereWithAggregatesInput[] - OR?: CertificateContactScalarWhereWithAggregatesInput[] - NOT?: CertificateContactScalarWhereWithAggregatesInput | CertificateContactScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"CertificateContact"> | number - serviceName?: StringWithAggregatesFilter<"CertificateContact"> | string - district?: StringWithAggregatesFilter<"CertificateContact"> | string - subDistrict?: StringWithAggregatesFilter<"CertificateContact"> | string - block?: StringWithAggregatesFilter<"CertificateContact"> | string - name?: StringWithAggregatesFilter<"CertificateContact"> | string - designation?: StringWithAggregatesFilter<"CertificateContact"> | string - contact?: StringWithAggregatesFilter<"CertificateContact"> | string - email?: StringWithAggregatesFilter<"CertificateContact"> | string - applicationType?: StringWithAggregatesFilter<"CertificateContact"> | string - certificateServiceId?: IntWithAggregatesFilter<"CertificateContact"> | number - } - - export type CertificateDocumentWhereInput = { - AND?: CertificateDocumentWhereInput | CertificateDocumentWhereInput[] - OR?: CertificateDocumentWhereInput[] - NOT?: CertificateDocumentWhereInput | CertificateDocumentWhereInput[] - id?: IntFilter<"CertificateDocument"> | number - slNo?: IntFilter<"CertificateDocument"> | number - documentType?: StringFilter<"CertificateDocument"> | string - validProof?: StringFilter<"CertificateDocument"> | string - isRequired?: BoolFilter<"CertificateDocument"> | boolean - applicationType?: StringFilter<"CertificateDocument"> | string - certificateServiceId?: IntFilter<"CertificateDocument"> | number - certificateService?: XOR - } - - export type CertificateDocumentOrderByWithRelationInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - certificateService?: CertificateServiceOrderByWithRelationInput - } - - export type CertificateDocumentWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: CertificateDocumentWhereInput | CertificateDocumentWhereInput[] - OR?: CertificateDocumentWhereInput[] - NOT?: CertificateDocumentWhereInput | CertificateDocumentWhereInput[] - slNo?: IntFilter<"CertificateDocument"> | number - documentType?: StringFilter<"CertificateDocument"> | string - validProof?: StringFilter<"CertificateDocument"> | string - isRequired?: BoolFilter<"CertificateDocument"> | boolean - applicationType?: StringFilter<"CertificateDocument"> | string - certificateServiceId?: IntFilter<"CertificateDocument"> | number - certificateService?: XOR - }, "id"> - - export type CertificateDocumentOrderByWithAggregationInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - _count?: CertificateDocumentCountOrderByAggregateInput - _avg?: CertificateDocumentAvgOrderByAggregateInput - _max?: CertificateDocumentMaxOrderByAggregateInput - _min?: CertificateDocumentMinOrderByAggregateInput - _sum?: CertificateDocumentSumOrderByAggregateInput - } - - export type CertificateDocumentScalarWhereWithAggregatesInput = { - AND?: CertificateDocumentScalarWhereWithAggregatesInput | CertificateDocumentScalarWhereWithAggregatesInput[] - OR?: CertificateDocumentScalarWhereWithAggregatesInput[] - NOT?: CertificateDocumentScalarWhereWithAggregatesInput | CertificateDocumentScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"CertificateDocument"> | number - slNo?: IntWithAggregatesFilter<"CertificateDocument"> | number - documentType?: StringWithAggregatesFilter<"CertificateDocument"> | string - validProof?: StringWithAggregatesFilter<"CertificateDocument"> | string - isRequired?: BoolWithAggregatesFilter<"CertificateDocument"> | boolean - applicationType?: StringWithAggregatesFilter<"CertificateDocument"> | string - certificateServiceId?: IntWithAggregatesFilter<"CertificateDocument"> | number - } - - export type CertificateProcessStepWhereInput = { - AND?: CertificateProcessStepWhereInput | CertificateProcessStepWhereInput[] - OR?: CertificateProcessStepWhereInput[] - NOT?: CertificateProcessStepWhereInput | CertificateProcessStepWhereInput[] - id?: IntFilter<"CertificateProcessStep"> | number - slNo?: IntFilter<"CertificateProcessStep"> | number - stepDetails?: StringFilter<"CertificateProcessStep"> | string - applicationType?: StringFilter<"CertificateProcessStep"> | string - certificateServiceId?: IntFilter<"CertificateProcessStep"> | number - certificateService?: XOR - } - - export type CertificateProcessStepOrderByWithRelationInput = { - id?: SortOrder - slNo?: SortOrder - stepDetails?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - certificateService?: CertificateServiceOrderByWithRelationInput - } - - export type CertificateProcessStepWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: CertificateProcessStepWhereInput | CertificateProcessStepWhereInput[] - OR?: CertificateProcessStepWhereInput[] - NOT?: CertificateProcessStepWhereInput | CertificateProcessStepWhereInput[] - slNo?: IntFilter<"CertificateProcessStep"> | number - stepDetails?: StringFilter<"CertificateProcessStep"> | string - applicationType?: StringFilter<"CertificateProcessStep"> | string - certificateServiceId?: IntFilter<"CertificateProcessStep"> | number - certificateService?: XOR - }, "id"> - - export type CertificateProcessStepOrderByWithAggregationInput = { - id?: SortOrder - slNo?: SortOrder - stepDetails?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - _count?: CertificateProcessStepCountOrderByAggregateInput - _avg?: CertificateProcessStepAvgOrderByAggregateInput - _max?: CertificateProcessStepMaxOrderByAggregateInput - _min?: CertificateProcessStepMinOrderByAggregateInput - _sum?: CertificateProcessStepSumOrderByAggregateInput - } - - export type CertificateProcessStepScalarWhereWithAggregatesInput = { - AND?: CertificateProcessStepScalarWhereWithAggregatesInput | CertificateProcessStepScalarWhereWithAggregatesInput[] - OR?: CertificateProcessStepScalarWhereWithAggregatesInput[] - NOT?: CertificateProcessStepScalarWhereWithAggregatesInput | CertificateProcessStepScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"CertificateProcessStep"> | number - slNo?: IntWithAggregatesFilter<"CertificateProcessStep"> | number - stepDetails?: StringWithAggregatesFilter<"CertificateProcessStep"> | string - applicationType?: StringWithAggregatesFilter<"CertificateProcessStep"> | string - certificateServiceId?: IntWithAggregatesFilter<"CertificateProcessStep"> | number - } - - export type CertificateEligibilityWhereInput = { - AND?: CertificateEligibilityWhereInput | CertificateEligibilityWhereInput[] - OR?: CertificateEligibilityWhereInput[] - NOT?: CertificateEligibilityWhereInput | CertificateEligibilityWhereInput[] - id?: IntFilter<"CertificateEligibility"> | number - eligibilityDetail?: StringFilter<"CertificateEligibility"> | string - applicationType?: StringFilter<"CertificateEligibility"> | string - certificateServiceId?: IntFilter<"CertificateEligibility"> | number - certificateService?: XOR - } - - export type CertificateEligibilityOrderByWithRelationInput = { - id?: SortOrder - eligibilityDetail?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - certificateService?: CertificateServiceOrderByWithRelationInput - } - - export type CertificateEligibilityWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: CertificateEligibilityWhereInput | CertificateEligibilityWhereInput[] - OR?: CertificateEligibilityWhereInput[] - NOT?: CertificateEligibilityWhereInput | CertificateEligibilityWhereInput[] - eligibilityDetail?: StringFilter<"CertificateEligibility"> | string - applicationType?: StringFilter<"CertificateEligibility"> | string - certificateServiceId?: IntFilter<"CertificateEligibility"> | number - certificateService?: XOR - }, "id"> - - export type CertificateEligibilityOrderByWithAggregationInput = { - id?: SortOrder - eligibilityDetail?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - _count?: CertificateEligibilityCountOrderByAggregateInput - _avg?: CertificateEligibilityAvgOrderByAggregateInput - _max?: CertificateEligibilityMaxOrderByAggregateInput - _min?: CertificateEligibilityMinOrderByAggregateInput - _sum?: CertificateEligibilitySumOrderByAggregateInput - } - - export type CertificateEligibilityScalarWhereWithAggregatesInput = { - AND?: CertificateEligibilityScalarWhereWithAggregatesInput | CertificateEligibilityScalarWhereWithAggregatesInput[] - OR?: CertificateEligibilityScalarWhereWithAggregatesInput[] - NOT?: CertificateEligibilityScalarWhereWithAggregatesInput | CertificateEligibilityScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"CertificateEligibility"> | number - eligibilityDetail?: StringWithAggregatesFilter<"CertificateEligibility"> | string - applicationType?: StringWithAggregatesFilter<"CertificateEligibility"> | string - certificateServiceId?: IntWithAggregatesFilter<"CertificateEligibility"> | number - } - - export type ContactServiceWhereInput = { - AND?: ContactServiceWhereInput | ContactServiceWhereInput[] - OR?: ContactServiceWhereInput[] - NOT?: ContactServiceWhereInput | ContactServiceWhereInput[] - id?: IntFilter<"ContactService"> | number - name?: StringFilter<"ContactService"> | string - summary?: StringFilter<"ContactService"> | string - type?: StringNullableFilter<"ContactService"> | string | null - targetAudience?: StringNullableListFilter<"ContactService"> - applicationMode?: StringFilter<"ContactService"> | string - onlineUrl?: StringNullableFilter<"ContactService"> | string | null - offlineAddress?: StringNullableFilter<"ContactService"> | string | null - status?: StringFilter<"ContactService"> | string - isActive?: BoolFilter<"ContactService"> | boolean - createdAt?: DateTimeFilter<"ContactService"> | Date | string - updatedAt?: DateTimeFilter<"ContactService"> | Date | string - adminId?: IntFilter<"ContactService"> | number - eligibilityDetails?: StringNullableListFilter<"ContactService"> - contactDetails?: StringNullableListFilter<"ContactService"> - processDetails?: StringNullableListFilter<"ContactService"> - processNew?: StringNullableFilter<"ContactService"> | string | null - processUpdate?: StringNullableFilter<"ContactService"> | string | null - processLost?: StringNullableFilter<"ContactService"> | string | null - processSurrender?: StringNullableFilter<"ContactService"> | string | null - docNew?: StringNullableFilter<"ContactService"> | string | null - docUpdate?: StringNullableFilter<"ContactService"> | string | null - docLost?: StringNullableFilter<"ContactService"> | string | null - docSurrender?: StringNullableFilter<"ContactService"> | string | null - admin?: XOR - contacts?: ContactServiceContactListRelationFilter - documents?: ContactServiceDocumentListRelationFilter - } - - export type ContactServiceOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrderInput | SortOrder - targetAudience?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrderInput | SortOrder - offlineAddress?: SortOrderInput | SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - eligibilityDetails?: SortOrder - contactDetails?: SortOrder - processDetails?: SortOrder - processNew?: SortOrderInput | SortOrder - processUpdate?: SortOrderInput | SortOrder - processLost?: SortOrderInput | SortOrder - processSurrender?: SortOrderInput | SortOrder - docNew?: SortOrderInput | SortOrder - docUpdate?: SortOrderInput | SortOrder - docLost?: SortOrderInput | SortOrder - docSurrender?: SortOrderInput | SortOrder - admin?: AdminOrderByWithRelationInput - contacts?: ContactServiceContactOrderByRelationAggregateInput - documents?: ContactServiceDocumentOrderByRelationAggregateInput - } - - export type ContactServiceWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: ContactServiceWhereInput | ContactServiceWhereInput[] - OR?: ContactServiceWhereInput[] - NOT?: ContactServiceWhereInput | ContactServiceWhereInput[] - name?: StringFilter<"ContactService"> | string - summary?: StringFilter<"ContactService"> | string - type?: StringNullableFilter<"ContactService"> | string | null - targetAudience?: StringNullableListFilter<"ContactService"> - applicationMode?: StringFilter<"ContactService"> | string - onlineUrl?: StringNullableFilter<"ContactService"> | string | null - offlineAddress?: StringNullableFilter<"ContactService"> | string | null - status?: StringFilter<"ContactService"> | string - isActive?: BoolFilter<"ContactService"> | boolean - createdAt?: DateTimeFilter<"ContactService"> | Date | string - updatedAt?: DateTimeFilter<"ContactService"> | Date | string - adminId?: IntFilter<"ContactService"> | number - eligibilityDetails?: StringNullableListFilter<"ContactService"> - contactDetails?: StringNullableListFilter<"ContactService"> - processDetails?: StringNullableListFilter<"ContactService"> - processNew?: StringNullableFilter<"ContactService"> | string | null - processUpdate?: StringNullableFilter<"ContactService"> | string | null - processLost?: StringNullableFilter<"ContactService"> | string | null - processSurrender?: StringNullableFilter<"ContactService"> | string | null - docNew?: StringNullableFilter<"ContactService"> | string | null - docUpdate?: StringNullableFilter<"ContactService"> | string | null - docLost?: StringNullableFilter<"ContactService"> | string | null - docSurrender?: StringNullableFilter<"ContactService"> | string | null - admin?: XOR - contacts?: ContactServiceContactListRelationFilter - documents?: ContactServiceDocumentListRelationFilter - }, "id"> - - export type ContactServiceOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrderInput | SortOrder - targetAudience?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrderInput | SortOrder - offlineAddress?: SortOrderInput | SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - eligibilityDetails?: SortOrder - contactDetails?: SortOrder - processDetails?: SortOrder - processNew?: SortOrderInput | SortOrder - processUpdate?: SortOrderInput | SortOrder - processLost?: SortOrderInput | SortOrder - processSurrender?: SortOrderInput | SortOrder - docNew?: SortOrderInput | SortOrder - docUpdate?: SortOrderInput | SortOrder - docLost?: SortOrderInput | SortOrder - docSurrender?: SortOrderInput | SortOrder - _count?: ContactServiceCountOrderByAggregateInput - _avg?: ContactServiceAvgOrderByAggregateInput - _max?: ContactServiceMaxOrderByAggregateInput - _min?: ContactServiceMinOrderByAggregateInput - _sum?: ContactServiceSumOrderByAggregateInput - } - - export type ContactServiceScalarWhereWithAggregatesInput = { - AND?: ContactServiceScalarWhereWithAggregatesInput | ContactServiceScalarWhereWithAggregatesInput[] - OR?: ContactServiceScalarWhereWithAggregatesInput[] - NOT?: ContactServiceScalarWhereWithAggregatesInput | ContactServiceScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"ContactService"> | number - name?: StringWithAggregatesFilter<"ContactService"> | string - summary?: StringWithAggregatesFilter<"ContactService"> | string - type?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - targetAudience?: StringNullableListFilter<"ContactService"> - applicationMode?: StringWithAggregatesFilter<"ContactService"> | string - onlineUrl?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - offlineAddress?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - status?: StringWithAggregatesFilter<"ContactService"> | string - isActive?: BoolWithAggregatesFilter<"ContactService"> | boolean - createdAt?: DateTimeWithAggregatesFilter<"ContactService"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"ContactService"> | Date | string - adminId?: IntWithAggregatesFilter<"ContactService"> | number - eligibilityDetails?: StringNullableListFilter<"ContactService"> - contactDetails?: StringNullableListFilter<"ContactService"> - processDetails?: StringNullableListFilter<"ContactService"> - processNew?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - processUpdate?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - processLost?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - processSurrender?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - docNew?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - docUpdate?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - docLost?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - docSurrender?: StringNullableWithAggregatesFilter<"ContactService"> | string | null - } - - export type ContactServiceContactWhereInput = { - AND?: ContactServiceContactWhereInput | ContactServiceContactWhereInput[] - OR?: ContactServiceContactWhereInput[] - NOT?: ContactServiceContactWhereInput | ContactServiceContactWhereInput[] - id?: IntFilter<"ContactServiceContact"> | number - serviceName?: StringFilter<"ContactServiceContact"> | string - district?: StringFilter<"ContactServiceContact"> | string - subDistrict?: StringFilter<"ContactServiceContact"> | string - block?: StringFilter<"ContactServiceContact"> | string - name?: StringFilter<"ContactServiceContact"> | string - designation?: StringFilter<"ContactServiceContact"> | string - contact?: StringFilter<"ContactServiceContact"> | string - email?: StringFilter<"ContactServiceContact"> | string - contactServiceId?: IntFilter<"ContactServiceContact"> | number - contactService?: XOR - posts?: PostListRelationFilter - } - - export type ContactServiceContactOrderByWithRelationInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - contactServiceId?: SortOrder - contactService?: ContactServiceOrderByWithRelationInput - posts?: PostOrderByRelationAggregateInput - } - - export type ContactServiceContactWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: ContactServiceContactWhereInput | ContactServiceContactWhereInput[] - OR?: ContactServiceContactWhereInput[] - NOT?: ContactServiceContactWhereInput | ContactServiceContactWhereInput[] - serviceName?: StringFilter<"ContactServiceContact"> | string - district?: StringFilter<"ContactServiceContact"> | string - subDistrict?: StringFilter<"ContactServiceContact"> | string - block?: StringFilter<"ContactServiceContact"> | string - name?: StringFilter<"ContactServiceContact"> | string - designation?: StringFilter<"ContactServiceContact"> | string - contact?: StringFilter<"ContactServiceContact"> | string - email?: StringFilter<"ContactServiceContact"> | string - contactServiceId?: IntFilter<"ContactServiceContact"> | number - contactService?: XOR - posts?: PostListRelationFilter - }, "id"> - - export type ContactServiceContactOrderByWithAggregationInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - contactServiceId?: SortOrder - _count?: ContactServiceContactCountOrderByAggregateInput - _avg?: ContactServiceContactAvgOrderByAggregateInput - _max?: ContactServiceContactMaxOrderByAggregateInput - _min?: ContactServiceContactMinOrderByAggregateInput - _sum?: ContactServiceContactSumOrderByAggregateInput - } - - export type ContactServiceContactScalarWhereWithAggregatesInput = { - AND?: ContactServiceContactScalarWhereWithAggregatesInput | ContactServiceContactScalarWhereWithAggregatesInput[] - OR?: ContactServiceContactScalarWhereWithAggregatesInput[] - NOT?: ContactServiceContactScalarWhereWithAggregatesInput | ContactServiceContactScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"ContactServiceContact"> | number - serviceName?: StringWithAggregatesFilter<"ContactServiceContact"> | string - district?: StringWithAggregatesFilter<"ContactServiceContact"> | string - subDistrict?: StringWithAggregatesFilter<"ContactServiceContact"> | string - block?: StringWithAggregatesFilter<"ContactServiceContact"> | string - name?: StringWithAggregatesFilter<"ContactServiceContact"> | string - designation?: StringWithAggregatesFilter<"ContactServiceContact"> | string - contact?: StringWithAggregatesFilter<"ContactServiceContact"> | string - email?: StringWithAggregatesFilter<"ContactServiceContact"> | string - contactServiceId?: IntWithAggregatesFilter<"ContactServiceContact"> | number - } - - export type ContactServiceDocumentWhereInput = { - AND?: ContactServiceDocumentWhereInput | ContactServiceDocumentWhereInput[] - OR?: ContactServiceDocumentWhereInput[] - NOT?: ContactServiceDocumentWhereInput | ContactServiceDocumentWhereInput[] - id?: IntFilter<"ContactServiceDocument"> | number - slNo?: IntFilter<"ContactServiceDocument"> | number - documentType?: StringFilter<"ContactServiceDocument"> | string - validProof?: StringFilter<"ContactServiceDocument"> | string - isRequired?: BoolFilter<"ContactServiceDocument"> | boolean - contactServiceId?: IntFilter<"ContactServiceDocument"> | number - contactService?: XOR - } - - export type ContactServiceDocumentOrderByWithRelationInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - contactServiceId?: SortOrder - contactService?: ContactServiceOrderByWithRelationInput - } - - export type ContactServiceDocumentWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: ContactServiceDocumentWhereInput | ContactServiceDocumentWhereInput[] - OR?: ContactServiceDocumentWhereInput[] - NOT?: ContactServiceDocumentWhereInput | ContactServiceDocumentWhereInput[] - slNo?: IntFilter<"ContactServiceDocument"> | number - documentType?: StringFilter<"ContactServiceDocument"> | string - validProof?: StringFilter<"ContactServiceDocument"> | string - isRequired?: BoolFilter<"ContactServiceDocument"> | boolean - contactServiceId?: IntFilter<"ContactServiceDocument"> | number - contactService?: XOR - }, "id"> - - export type ContactServiceDocumentOrderByWithAggregationInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - contactServiceId?: SortOrder - _count?: ContactServiceDocumentCountOrderByAggregateInput - _avg?: ContactServiceDocumentAvgOrderByAggregateInput - _max?: ContactServiceDocumentMaxOrderByAggregateInput - _min?: ContactServiceDocumentMinOrderByAggregateInput - _sum?: ContactServiceDocumentSumOrderByAggregateInput - } - - export type ContactServiceDocumentScalarWhereWithAggregatesInput = { - AND?: ContactServiceDocumentScalarWhereWithAggregatesInput | ContactServiceDocumentScalarWhereWithAggregatesInput[] - OR?: ContactServiceDocumentScalarWhereWithAggregatesInput[] - NOT?: ContactServiceDocumentScalarWhereWithAggregatesInput | ContactServiceDocumentScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"ContactServiceDocument"> | number - slNo?: IntWithAggregatesFilter<"ContactServiceDocument"> | number - documentType?: StringWithAggregatesFilter<"ContactServiceDocument"> | string - validProof?: StringWithAggregatesFilter<"ContactServiceDocument"> | string - isRequired?: BoolWithAggregatesFilter<"ContactServiceDocument"> | boolean - contactServiceId?: IntWithAggregatesFilter<"ContactServiceDocument"> | number - } - - export type PostWhereInput = { - AND?: PostWhereInput | PostWhereInput[] - OR?: PostWhereInput[] - NOT?: PostWhereInput | PostWhereInput[] - id?: IntFilter<"Post"> | number - postName?: StringFilter<"Post"> | string - rank?: StringFilter<"Post"> | string - description?: StringNullableFilter<"Post"> | string | null - department?: StringNullableFilter<"Post"> | string | null - status?: StringFilter<"Post"> | string - createdAt?: DateTimeFilter<"Post"> | Date | string - updatedAt?: DateTimeFilter<"Post"> | Date | string - officeId?: IntFilter<"Post"> | number - office?: XOR - employees?: EmployeeListRelationFilter - } - - export type PostOrderByWithRelationInput = { - id?: SortOrder - postName?: SortOrder - rank?: SortOrder - description?: SortOrderInput | SortOrder - department?: SortOrderInput | SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - officeId?: SortOrder - office?: ContactServiceContactOrderByWithRelationInput - employees?: EmployeeOrderByRelationAggregateInput - } - - export type PostWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: PostWhereInput | PostWhereInput[] - OR?: PostWhereInput[] - NOT?: PostWhereInput | PostWhereInput[] - postName?: StringFilter<"Post"> | string - rank?: StringFilter<"Post"> | string - description?: StringNullableFilter<"Post"> | string | null - department?: StringNullableFilter<"Post"> | string | null - status?: StringFilter<"Post"> | string - createdAt?: DateTimeFilter<"Post"> | Date | string - updatedAt?: DateTimeFilter<"Post"> | Date | string - officeId?: IntFilter<"Post"> | number - office?: XOR - employees?: EmployeeListRelationFilter - }, "id"> - - export type PostOrderByWithAggregationInput = { - id?: SortOrder - postName?: SortOrder - rank?: SortOrder - description?: SortOrderInput | SortOrder - department?: SortOrderInput | SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - officeId?: SortOrder - _count?: PostCountOrderByAggregateInput - _avg?: PostAvgOrderByAggregateInput - _max?: PostMaxOrderByAggregateInput - _min?: PostMinOrderByAggregateInput - _sum?: PostSumOrderByAggregateInput - } - - export type PostScalarWhereWithAggregatesInput = { - AND?: PostScalarWhereWithAggregatesInput | PostScalarWhereWithAggregatesInput[] - OR?: PostScalarWhereWithAggregatesInput[] - NOT?: PostScalarWhereWithAggregatesInput | PostScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"Post"> | number - postName?: StringWithAggregatesFilter<"Post"> | string - rank?: StringWithAggregatesFilter<"Post"> | string - description?: StringNullableWithAggregatesFilter<"Post"> | string | null - department?: StringNullableWithAggregatesFilter<"Post"> | string | null - status?: StringWithAggregatesFilter<"Post"> | string - createdAt?: DateTimeWithAggregatesFilter<"Post"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Post"> | Date | string - officeId?: IntWithAggregatesFilter<"Post"> | number - } - - export type EmployeeWhereInput = { - AND?: EmployeeWhereInput | EmployeeWhereInput[] - OR?: EmployeeWhereInput[] - NOT?: EmployeeWhereInput | EmployeeWhereInput[] - id?: IntFilter<"Employee"> | number - name?: StringFilter<"Employee"> | string - email?: StringFilter<"Employee"> | string - phone?: StringFilter<"Employee"> | string - designation?: StringFilter<"Employee"> | string - employeeId?: StringNullableFilter<"Employee"> | string | null - joiningDate?: DateTimeNullableFilter<"Employee"> | Date | string | null - salary?: FloatNullableFilter<"Employee"> | number | null - status?: StringFilter<"Employee"> | string - createdAt?: DateTimeFilter<"Employee"> | Date | string - updatedAt?: DateTimeFilter<"Employee"> | Date | string - postId?: IntFilter<"Employee"> | number - post?: XOR - } - - export type EmployeeOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - designation?: SortOrder - employeeId?: SortOrderInput | SortOrder - joiningDate?: SortOrderInput | SortOrder - salary?: SortOrderInput | SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - postId?: SortOrder - post?: PostOrderByWithRelationInput - } - - export type EmployeeWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: EmployeeWhereInput | EmployeeWhereInput[] - OR?: EmployeeWhereInput[] - NOT?: EmployeeWhereInput | EmployeeWhereInput[] - name?: StringFilter<"Employee"> | string - email?: StringFilter<"Employee"> | string - phone?: StringFilter<"Employee"> | string - designation?: StringFilter<"Employee"> | string - employeeId?: StringNullableFilter<"Employee"> | string | null - joiningDate?: DateTimeNullableFilter<"Employee"> | Date | string | null - salary?: FloatNullableFilter<"Employee"> | number | null - status?: StringFilter<"Employee"> | string - createdAt?: DateTimeFilter<"Employee"> | Date | string - updatedAt?: DateTimeFilter<"Employee"> | Date | string - postId?: IntFilter<"Employee"> | number - post?: XOR - }, "id"> - - export type EmployeeOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - designation?: SortOrder - employeeId?: SortOrderInput | SortOrder - joiningDate?: SortOrderInput | SortOrder - salary?: SortOrderInput | SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - postId?: SortOrder - _count?: EmployeeCountOrderByAggregateInput - _avg?: EmployeeAvgOrderByAggregateInput - _max?: EmployeeMaxOrderByAggregateInput - _min?: EmployeeMinOrderByAggregateInput - _sum?: EmployeeSumOrderByAggregateInput - } - - export type EmployeeScalarWhereWithAggregatesInput = { - AND?: EmployeeScalarWhereWithAggregatesInput | EmployeeScalarWhereWithAggregatesInput[] - OR?: EmployeeScalarWhereWithAggregatesInput[] - NOT?: EmployeeScalarWhereWithAggregatesInput | EmployeeScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"Employee"> | number - name?: StringWithAggregatesFilter<"Employee"> | string - email?: StringWithAggregatesFilter<"Employee"> | string - phone?: StringWithAggregatesFilter<"Employee"> | string - designation?: StringWithAggregatesFilter<"Employee"> | string - employeeId?: StringNullableWithAggregatesFilter<"Employee"> | string | null - joiningDate?: DateTimeNullableWithAggregatesFilter<"Employee"> | Date | string | null - salary?: FloatNullableWithAggregatesFilter<"Employee"> | number | null - status?: StringWithAggregatesFilter<"Employee"> | string - createdAt?: DateTimeWithAggregatesFilter<"Employee"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Employee"> | Date | string - postId?: IntWithAggregatesFilter<"Employee"> | number - } - - export type FeedbackWhereInput = { - AND?: FeedbackWhereInput | FeedbackWhereInput[] - OR?: FeedbackWhereInput[] - NOT?: FeedbackWhereInput | FeedbackWhereInput[] - id?: IntFilter<"Feedback"> | number - name?: StringFilter<"Feedback"> | string - email?: StringFilter<"Feedback"> | string - phone?: StringNullableFilter<"Feedback"> | string | null - subject?: StringFilter<"Feedback"> | string - message?: StringFilter<"Feedback"> | string - rating?: IntNullableFilter<"Feedback"> | number | null - category?: StringNullableFilter<"Feedback"> | string | null - status?: StringFilter<"Feedback"> | string - createdAt?: DateTimeFilter<"Feedback"> | Date | string - updatedAt?: DateTimeFilter<"Feedback"> | Date | string - resolvedAt?: DateTimeNullableFilter<"Feedback"> | Date | string | null - resolvedBy?: StringNullableFilter<"Feedback"> | string | null - adminNotes?: StringNullableFilter<"Feedback"> | string | null - } - - export type FeedbackOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrderInput | SortOrder - subject?: SortOrder - message?: SortOrder - rating?: SortOrderInput | SortOrder - category?: SortOrderInput | SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - resolvedAt?: SortOrderInput | SortOrder - resolvedBy?: SortOrderInput | SortOrder - adminNotes?: SortOrderInput | SortOrder - } - - export type FeedbackWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: FeedbackWhereInput | FeedbackWhereInput[] - OR?: FeedbackWhereInput[] - NOT?: FeedbackWhereInput | FeedbackWhereInput[] - name?: StringFilter<"Feedback"> | string - email?: StringFilter<"Feedback"> | string - phone?: StringNullableFilter<"Feedback"> | string | null - subject?: StringFilter<"Feedback"> | string - message?: StringFilter<"Feedback"> | string - rating?: IntNullableFilter<"Feedback"> | number | null - category?: StringNullableFilter<"Feedback"> | string | null - status?: StringFilter<"Feedback"> | string - createdAt?: DateTimeFilter<"Feedback"> | Date | string - updatedAt?: DateTimeFilter<"Feedback"> | Date | string - resolvedAt?: DateTimeNullableFilter<"Feedback"> | Date | string | null - resolvedBy?: StringNullableFilter<"Feedback"> | string | null - adminNotes?: StringNullableFilter<"Feedback"> | string | null - }, "id"> - - export type FeedbackOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrderInput | SortOrder - subject?: SortOrder - message?: SortOrder - rating?: SortOrderInput | SortOrder - category?: SortOrderInput | SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - resolvedAt?: SortOrderInput | SortOrder - resolvedBy?: SortOrderInput | SortOrder - adminNotes?: SortOrderInput | SortOrder - _count?: FeedbackCountOrderByAggregateInput - _avg?: FeedbackAvgOrderByAggregateInput - _max?: FeedbackMaxOrderByAggregateInput - _min?: FeedbackMinOrderByAggregateInput - _sum?: FeedbackSumOrderByAggregateInput - } - - export type FeedbackScalarWhereWithAggregatesInput = { - AND?: FeedbackScalarWhereWithAggregatesInput | FeedbackScalarWhereWithAggregatesInput[] - OR?: FeedbackScalarWhereWithAggregatesInput[] - NOT?: FeedbackScalarWhereWithAggregatesInput | FeedbackScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"Feedback"> | number - name?: StringWithAggregatesFilter<"Feedback"> | string - email?: StringWithAggregatesFilter<"Feedback"> | string - phone?: StringNullableWithAggregatesFilter<"Feedback"> | string | null - subject?: StringWithAggregatesFilter<"Feedback"> | string - message?: StringWithAggregatesFilter<"Feedback"> | string - rating?: IntNullableWithAggregatesFilter<"Feedback"> | number | null - category?: StringNullableWithAggregatesFilter<"Feedback"> | string | null - status?: StringWithAggregatesFilter<"Feedback"> | string - createdAt?: DateTimeWithAggregatesFilter<"Feedback"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Feedback"> | Date | string - resolvedAt?: DateTimeNullableWithAggregatesFilter<"Feedback"> | Date | string | null - resolvedBy?: StringNullableWithAggregatesFilter<"Feedback"> | string | null - adminNotes?: StringNullableWithAggregatesFilter<"Feedback"> | string | null - } - - export type GrievanceWhereInput = { - AND?: GrievanceWhereInput | GrievanceWhereInput[] - OR?: GrievanceWhereInput[] - NOT?: GrievanceWhereInput | GrievanceWhereInput[] - id?: IntFilter<"Grievance"> | number - name?: StringFilter<"Grievance"> | string - email?: StringFilter<"Grievance"> | string - phone?: StringFilter<"Grievance"> | string - address?: StringFilter<"Grievance"> | string - subject?: StringFilter<"Grievance"> | string - description?: StringFilter<"Grievance"> | string - category?: StringNullableFilter<"Grievance"> | string | null - priority?: StringFilter<"Grievance"> | string - status?: StringFilter<"Grievance"> | string - attachments?: StringNullableListFilter<"Grievance"> - createdAt?: DateTimeFilter<"Grievance"> | Date | string - updatedAt?: DateTimeFilter<"Grievance"> | Date | string - assignedTo?: StringNullableFilter<"Grievance"> | string | null - adminNotes?: StringNullableFilter<"Grievance"> | string | null - resolvedAt?: DateTimeNullableFilter<"Grievance"> | Date | string | null - trackingId?: StringFilter<"Grievance"> | string - } - - export type GrievanceOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - address?: SortOrder - subject?: SortOrder - description?: SortOrder - category?: SortOrderInput | SortOrder - priority?: SortOrder - status?: SortOrder - attachments?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - assignedTo?: SortOrderInput | SortOrder - adminNotes?: SortOrderInput | SortOrder - resolvedAt?: SortOrderInput | SortOrder - trackingId?: SortOrder - } - - export type GrievanceWhereUniqueInput = Prisma.AtLeast<{ - id?: number - trackingId?: string - AND?: GrievanceWhereInput | GrievanceWhereInput[] - OR?: GrievanceWhereInput[] - NOT?: GrievanceWhereInput | GrievanceWhereInput[] - name?: StringFilter<"Grievance"> | string - email?: StringFilter<"Grievance"> | string - phone?: StringFilter<"Grievance"> | string - address?: StringFilter<"Grievance"> | string - subject?: StringFilter<"Grievance"> | string - description?: StringFilter<"Grievance"> | string - category?: StringNullableFilter<"Grievance"> | string | null - priority?: StringFilter<"Grievance"> | string - status?: StringFilter<"Grievance"> | string - attachments?: StringNullableListFilter<"Grievance"> - createdAt?: DateTimeFilter<"Grievance"> | Date | string - updatedAt?: DateTimeFilter<"Grievance"> | Date | string - assignedTo?: StringNullableFilter<"Grievance"> | string | null - adminNotes?: StringNullableFilter<"Grievance"> | string | null - resolvedAt?: DateTimeNullableFilter<"Grievance"> | Date | string | null - }, "id" | "trackingId"> - - export type GrievanceOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - address?: SortOrder - subject?: SortOrder - description?: SortOrder - category?: SortOrderInput | SortOrder - priority?: SortOrder - status?: SortOrder - attachments?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - assignedTo?: SortOrderInput | SortOrder - adminNotes?: SortOrderInput | SortOrder - resolvedAt?: SortOrderInput | SortOrder - trackingId?: SortOrder - _count?: GrievanceCountOrderByAggregateInput - _avg?: GrievanceAvgOrderByAggregateInput - _max?: GrievanceMaxOrderByAggregateInput - _min?: GrievanceMinOrderByAggregateInput - _sum?: GrievanceSumOrderByAggregateInput - } - - export type GrievanceScalarWhereWithAggregatesInput = { - AND?: GrievanceScalarWhereWithAggregatesInput | GrievanceScalarWhereWithAggregatesInput[] - OR?: GrievanceScalarWhereWithAggregatesInput[] - NOT?: GrievanceScalarWhereWithAggregatesInput | GrievanceScalarWhereWithAggregatesInput[] - id?: IntWithAggregatesFilter<"Grievance"> | number - name?: StringWithAggregatesFilter<"Grievance"> | string - email?: StringWithAggregatesFilter<"Grievance"> | string - phone?: StringWithAggregatesFilter<"Grievance"> | string - address?: StringWithAggregatesFilter<"Grievance"> | string - subject?: StringWithAggregatesFilter<"Grievance"> | string - description?: StringWithAggregatesFilter<"Grievance"> | string - category?: StringNullableWithAggregatesFilter<"Grievance"> | string | null - priority?: StringWithAggregatesFilter<"Grievance"> | string - status?: StringWithAggregatesFilter<"Grievance"> | string - attachments?: StringNullableListFilter<"Grievance"> - createdAt?: DateTimeWithAggregatesFilter<"Grievance"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Grievance"> | Date | string - assignedTo?: StringNullableWithAggregatesFilter<"Grievance"> | string | null - adminNotes?: StringNullableWithAggregatesFilter<"Grievance"> | string | null - resolvedAt?: DateTimeNullableWithAggregatesFilter<"Grievance"> | Date | string | null - trackingId?: StringWithAggregatesFilter<"Grievance"> | string - } - - export type AdminCreateInput = { - email: string - password: string - name: string - role?: string - createdAt?: Date | string - updatedAt?: Date | string - schemeServices?: SchemeServiceCreateNestedManyWithoutAdminInput - certificateServices?: CertificateServiceCreateNestedManyWithoutAdminInput - contactServices?: ContactServiceCreateNestedManyWithoutAdminInput - } - - export type AdminUncheckedCreateInput = { - id?: number - email: string - password: string - name: string - role?: string - createdAt?: Date | string - updatedAt?: Date | string - schemeServices?: SchemeServiceUncheckedCreateNestedManyWithoutAdminInput - certificateServices?: CertificateServiceUncheckedCreateNestedManyWithoutAdminInput - contactServices?: ContactServiceUncheckedCreateNestedManyWithoutAdminInput - } - - export type AdminUpdateInput = { - email?: StringFieldUpdateOperationsInput | string - password?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - role?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - schemeServices?: SchemeServiceUpdateManyWithoutAdminNestedInput - certificateServices?: CertificateServiceUpdateManyWithoutAdminNestedInput - contactServices?: ContactServiceUpdateManyWithoutAdminNestedInput - } - - export type AdminUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - email?: StringFieldUpdateOperationsInput | string - password?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - role?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - schemeServices?: SchemeServiceUncheckedUpdateManyWithoutAdminNestedInput - certificateServices?: CertificateServiceUncheckedUpdateManyWithoutAdminNestedInput - contactServices?: ContactServiceUncheckedUpdateManyWithoutAdminNestedInput - } - - export type AdminCreateManyInput = { - id?: number - email: string - password: string - name: string - role?: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AdminUpdateManyMutationInput = { - email?: StringFieldUpdateOperationsInput | string - password?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - role?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AdminUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - email?: StringFieldUpdateOperationsInput | string - password?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - role?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type SchemeServiceCreateInput = { - name: string - summary: string - type?: string | null - targetAudience?: SchemeServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: SchemeServiceCreateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceCreateschemeDetailsInput | string[] - processDetails?: SchemeServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutSchemeServicesInput - contacts?: ContactPersonCreateNestedManyWithoutSchemeServiceInput - documents?: SupportiveDocumentCreateNestedManyWithoutSchemeServiceInput - } - - export type SchemeServiceUncheckedCreateInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: SchemeServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: SchemeServiceCreateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceCreateschemeDetailsInput | string[] - processDetails?: SchemeServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: ContactPersonUncheckedCreateNestedManyWithoutSchemeServiceInput - documents?: SupportiveDocumentUncheckedCreateNestedManyWithoutSchemeServiceInput - } - - export type SchemeServiceUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutSchemeServicesNestedInput - contacts?: ContactPersonUpdateManyWithoutSchemeServiceNestedInput - documents?: SupportiveDocumentUpdateManyWithoutSchemeServiceNestedInput - } - - export type SchemeServiceUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: ContactPersonUncheckedUpdateManyWithoutSchemeServiceNestedInput - documents?: SupportiveDocumentUncheckedUpdateManyWithoutSchemeServiceNestedInput - } - - export type SchemeServiceCreateManyInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: SchemeServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: SchemeServiceCreateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceCreateschemeDetailsInput | string[] - processDetails?: SchemeServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - } - - export type SchemeServiceUpdateManyMutationInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type SchemeServiceUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type ContactPersonCreateInput = { - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - schemeService: SchemeServiceCreateNestedOneWithoutContactsInput - } - - export type ContactPersonUncheckedCreateInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - schemeServiceId: number - } - - export type ContactPersonUpdateInput = { - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - schemeService?: SchemeServiceUpdateOneRequiredWithoutContactsNestedInput - } - - export type ContactPersonUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - schemeServiceId?: IntFieldUpdateOperationsInput | number - } - - export type ContactPersonCreateManyInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - schemeServiceId: number - } - - export type ContactPersonUpdateManyMutationInput = { - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - } - - export type ContactPersonUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - schemeServiceId?: IntFieldUpdateOperationsInput | number - } - - export type SupportiveDocumentCreateInput = { - slNo: number - documentType: string - validProof: string - isRequired?: boolean - schemeService: SchemeServiceCreateNestedOneWithoutDocumentsInput - } - - export type SupportiveDocumentUncheckedCreateInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - schemeServiceId: number - } - - export type SupportiveDocumentUpdateInput = { - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - schemeService?: SchemeServiceUpdateOneRequiredWithoutDocumentsNestedInput - } - - export type SupportiveDocumentUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - schemeServiceId?: IntFieldUpdateOperationsInput | number - } - - export type SupportiveDocumentCreateManyInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - schemeServiceId: number - } - - export type SupportiveDocumentUpdateManyMutationInput = { - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - } - - export type SupportiveDocumentUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - schemeServiceId?: IntFieldUpdateOperationsInput | number - } - - export type CertificateServiceCreateInput = { - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutCertificateServicesInput - contacts?: CertificateContactCreateNestedManyWithoutCertificateServiceInput - documents?: CertificateDocumentCreateNestedManyWithoutCertificateServiceInput - processSteps?: CertificateProcessStepCreateNestedManyWithoutCertificateServiceInput - eligibilityItems?: CertificateEligibilityCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceUncheckedCreateInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: CertificateContactUncheckedCreateNestedManyWithoutCertificateServiceInput - documents?: CertificateDocumentUncheckedCreateNestedManyWithoutCertificateServiceInput - processSteps?: CertificateProcessStepUncheckedCreateNestedManyWithoutCertificateServiceInput - eligibilityItems?: CertificateEligibilityUncheckedCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutCertificateServicesNestedInput - contacts?: CertificateContactUpdateManyWithoutCertificateServiceNestedInput - documents?: CertificateDocumentUpdateManyWithoutCertificateServiceNestedInput - processSteps?: CertificateProcessStepUpdateManyWithoutCertificateServiceNestedInput - eligibilityItems?: CertificateEligibilityUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: CertificateContactUncheckedUpdateManyWithoutCertificateServiceNestedInput - documents?: CertificateDocumentUncheckedUpdateManyWithoutCertificateServiceNestedInput - processSteps?: CertificateProcessStepUncheckedUpdateManyWithoutCertificateServiceNestedInput - eligibilityItems?: CertificateEligibilityUncheckedUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceCreateManyInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - } - - export type CertificateServiceUpdateManyMutationInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type CertificateServiceUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type CertificateContactCreateInput = { - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - applicationType?: string - certificateService: CertificateServiceCreateNestedOneWithoutContactsInput - } - - export type CertificateContactUncheckedCreateInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - applicationType?: string - certificateServiceId: number - } - - export type CertificateContactUpdateInput = { - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - certificateService?: CertificateServiceUpdateOneRequiredWithoutContactsNestedInput - } - - export type CertificateContactUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - certificateServiceId?: IntFieldUpdateOperationsInput | number - } - - export type CertificateContactCreateManyInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - applicationType?: string - certificateServiceId: number - } - - export type CertificateContactUpdateManyMutationInput = { - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateContactUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - certificateServiceId?: IntFieldUpdateOperationsInput | number - } - - export type CertificateDocumentCreateInput = { - slNo: number - documentType: string - validProof: string - isRequired?: boolean - applicationType?: string - certificateService: CertificateServiceCreateNestedOneWithoutDocumentsInput - } - - export type CertificateDocumentUncheckedCreateInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - applicationType?: string - certificateServiceId: number - } - - export type CertificateDocumentUpdateInput = { - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - applicationType?: StringFieldUpdateOperationsInput | string - certificateService?: CertificateServiceUpdateOneRequiredWithoutDocumentsNestedInput - } - - export type CertificateDocumentUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - applicationType?: StringFieldUpdateOperationsInput | string - certificateServiceId?: IntFieldUpdateOperationsInput | number - } - - export type CertificateDocumentCreateManyInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - applicationType?: string - certificateServiceId: number - } - - export type CertificateDocumentUpdateManyMutationInput = { - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateDocumentUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - applicationType?: StringFieldUpdateOperationsInput | string - certificateServiceId?: IntFieldUpdateOperationsInput | number - } - - export type CertificateProcessStepCreateInput = { - slNo: number - stepDetails: string - applicationType?: string - certificateService: CertificateServiceCreateNestedOneWithoutProcessStepsInput - } - - export type CertificateProcessStepUncheckedCreateInput = { - id?: number - slNo: number - stepDetails: string - applicationType?: string - certificateServiceId: number - } - - export type CertificateProcessStepUpdateInput = { - slNo?: IntFieldUpdateOperationsInput | number - stepDetails?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - certificateService?: CertificateServiceUpdateOneRequiredWithoutProcessStepsNestedInput - } - - export type CertificateProcessStepUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - stepDetails?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - certificateServiceId?: IntFieldUpdateOperationsInput | number - } - - export type CertificateProcessStepCreateManyInput = { - id?: number - slNo: number - stepDetails: string - applicationType?: string - certificateServiceId: number - } - - export type CertificateProcessStepUpdateManyMutationInput = { - slNo?: IntFieldUpdateOperationsInput | number - stepDetails?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateProcessStepUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - stepDetails?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - certificateServiceId?: IntFieldUpdateOperationsInput | number - } - - export type CertificateEligibilityCreateInput = { - eligibilityDetail: string - applicationType?: string - certificateService: CertificateServiceCreateNestedOneWithoutEligibilityItemsInput - } - - export type CertificateEligibilityUncheckedCreateInput = { - id?: number - eligibilityDetail: string - applicationType?: string - certificateServiceId: number - } - - export type CertificateEligibilityUpdateInput = { - eligibilityDetail?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - certificateService?: CertificateServiceUpdateOneRequiredWithoutEligibilityItemsNestedInput - } - - export type CertificateEligibilityUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - eligibilityDetail?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - certificateServiceId?: IntFieldUpdateOperationsInput | number - } - - export type CertificateEligibilityCreateManyInput = { - id?: number - eligibilityDetail: string - applicationType?: string - certificateServiceId: number - } - - export type CertificateEligibilityUpdateManyMutationInput = { - eligibilityDetail?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateEligibilityUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - eligibilityDetail?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - certificateServiceId?: IntFieldUpdateOperationsInput | number - } - - export type ContactServiceCreateInput = { - name: string - summary: string - type?: string | null - targetAudience?: ContactServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: ContactServiceCreateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceCreatecontactDetailsInput | string[] - processDetails?: ContactServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutContactServicesInput - contacts?: ContactServiceContactCreateNestedManyWithoutContactServiceInput - documents?: ContactServiceDocumentCreateNestedManyWithoutContactServiceInput - } - - export type ContactServiceUncheckedCreateInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: ContactServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: ContactServiceCreateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceCreatecontactDetailsInput | string[] - processDetails?: ContactServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: ContactServiceContactUncheckedCreateNestedManyWithoutContactServiceInput - documents?: ContactServiceDocumentUncheckedCreateNestedManyWithoutContactServiceInput - } - - export type ContactServiceUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutContactServicesNestedInput - contacts?: ContactServiceContactUpdateManyWithoutContactServiceNestedInput - documents?: ContactServiceDocumentUpdateManyWithoutContactServiceNestedInput - } - - export type ContactServiceUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: ContactServiceContactUncheckedUpdateManyWithoutContactServiceNestedInput - documents?: ContactServiceDocumentUncheckedUpdateManyWithoutContactServiceNestedInput - } - - export type ContactServiceCreateManyInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: ContactServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: ContactServiceCreateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceCreatecontactDetailsInput | string[] - processDetails?: ContactServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - } - - export type ContactServiceUpdateManyMutationInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type ContactServiceUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type ContactServiceContactCreateInput = { - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - contactService: ContactServiceCreateNestedOneWithoutContactsInput - posts?: PostCreateNestedManyWithoutOfficeInput - } - - export type ContactServiceContactUncheckedCreateInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - contactServiceId: number - posts?: PostUncheckedCreateNestedManyWithoutOfficeInput - } - - export type ContactServiceContactUpdateInput = { - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - contactService?: ContactServiceUpdateOneRequiredWithoutContactsNestedInput - posts?: PostUpdateManyWithoutOfficeNestedInput - } - - export type ContactServiceContactUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - contactServiceId?: IntFieldUpdateOperationsInput | number - posts?: PostUncheckedUpdateManyWithoutOfficeNestedInput - } - - export type ContactServiceContactCreateManyInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - contactServiceId: number - } - - export type ContactServiceContactUpdateManyMutationInput = { - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - } - - export type ContactServiceContactUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - contactServiceId?: IntFieldUpdateOperationsInput | number - } - - export type ContactServiceDocumentCreateInput = { - slNo: number - documentType: string - validProof: string - isRequired?: boolean - contactService: ContactServiceCreateNestedOneWithoutDocumentsInput - } - - export type ContactServiceDocumentUncheckedCreateInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - contactServiceId: number - } - - export type ContactServiceDocumentUpdateInput = { - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - contactService?: ContactServiceUpdateOneRequiredWithoutDocumentsNestedInput - } - - export type ContactServiceDocumentUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - contactServiceId?: IntFieldUpdateOperationsInput | number - } - - export type ContactServiceDocumentCreateManyInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - contactServiceId: number - } - - export type ContactServiceDocumentUpdateManyMutationInput = { - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - } - - export type ContactServiceDocumentUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - contactServiceId?: IntFieldUpdateOperationsInput | number - } - - export type PostCreateInput = { - postName: string - rank: string - description?: string | null - department?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - office: ContactServiceContactCreateNestedOneWithoutPostsInput - employees?: EmployeeCreateNestedManyWithoutPostInput - } - - export type PostUncheckedCreateInput = { - id?: number - postName: string - rank: string - description?: string | null - department?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - officeId: number - employees?: EmployeeUncheckedCreateNestedManyWithoutPostInput - } - - export type PostUpdateInput = { - postName?: StringFieldUpdateOperationsInput | string - rank?: StringFieldUpdateOperationsInput | string - description?: NullableStringFieldUpdateOperationsInput | string | null - department?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - office?: ContactServiceContactUpdateOneRequiredWithoutPostsNestedInput - employees?: EmployeeUpdateManyWithoutPostNestedInput - } - - export type PostUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - postName?: StringFieldUpdateOperationsInput | string - rank?: StringFieldUpdateOperationsInput | string - description?: NullableStringFieldUpdateOperationsInput | string | null - department?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - officeId?: IntFieldUpdateOperationsInput | number - employees?: EmployeeUncheckedUpdateManyWithoutPostNestedInput - } - - export type PostCreateManyInput = { - id?: number - postName: string - rank: string - description?: string | null - department?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - officeId: number - } - - export type PostUpdateManyMutationInput = { - postName?: StringFieldUpdateOperationsInput | string - rank?: StringFieldUpdateOperationsInput | string - description?: NullableStringFieldUpdateOperationsInput | string | null - department?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type PostUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - postName?: StringFieldUpdateOperationsInput | string - rank?: StringFieldUpdateOperationsInput | string - description?: NullableStringFieldUpdateOperationsInput | string | null - department?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - officeId?: IntFieldUpdateOperationsInput | number - } - - export type EmployeeCreateInput = { - name: string - email: string - phone: string - designation: string - employeeId?: string | null - joiningDate?: Date | string | null - salary?: number | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - post: PostCreateNestedOneWithoutEmployeesInput - } - - export type EmployeeUncheckedCreateInput = { - id?: number - name: string - email: string - phone: string - designation: string - employeeId?: string | null - joiningDate?: Date | string | null - salary?: number | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - postId: number - } - - export type EmployeeUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - employeeId?: NullableStringFieldUpdateOperationsInput | string | null - joiningDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salary?: NullableFloatFieldUpdateOperationsInput | number | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - post?: PostUpdateOneRequiredWithoutEmployeesNestedInput - } - - export type EmployeeUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - employeeId?: NullableStringFieldUpdateOperationsInput | string | null - joiningDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salary?: NullableFloatFieldUpdateOperationsInput | number | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - postId?: IntFieldUpdateOperationsInput | number - } - - export type EmployeeCreateManyInput = { - id?: number - name: string - email: string - phone: string - designation: string - employeeId?: string | null - joiningDate?: Date | string | null - salary?: number | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - postId: number - } - - export type EmployeeUpdateManyMutationInput = { - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - employeeId?: NullableStringFieldUpdateOperationsInput | string | null - joiningDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salary?: NullableFloatFieldUpdateOperationsInput | number | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type EmployeeUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - employeeId?: NullableStringFieldUpdateOperationsInput | string | null - joiningDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salary?: NullableFloatFieldUpdateOperationsInput | number | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - postId?: IntFieldUpdateOperationsInput | number - } - - export type FeedbackCreateInput = { - name: string - email: string - phone?: string | null - subject: string - message: string - rating?: number | null - category?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - resolvedAt?: Date | string | null - resolvedBy?: string | null - adminNotes?: string | null - } - - export type FeedbackUncheckedCreateInput = { - id?: number - name: string - email: string - phone?: string | null - subject: string - message: string - rating?: number | null - category?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - resolvedAt?: Date | string | null - resolvedBy?: string | null - adminNotes?: string | null - } - - export type FeedbackUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: NullableStringFieldUpdateOperationsInput | string | null - subject?: StringFieldUpdateOperationsInput | string - message?: StringFieldUpdateOperationsInput | string - rating?: NullableIntFieldUpdateOperationsInput | number | null - category?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - resolvedBy?: NullableStringFieldUpdateOperationsInput | string | null - adminNotes?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type FeedbackUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: NullableStringFieldUpdateOperationsInput | string | null - subject?: StringFieldUpdateOperationsInput | string - message?: StringFieldUpdateOperationsInput | string - rating?: NullableIntFieldUpdateOperationsInput | number | null - category?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - resolvedBy?: NullableStringFieldUpdateOperationsInput | string | null - adminNotes?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type FeedbackCreateManyInput = { - id?: number - name: string - email: string - phone?: string | null - subject: string - message: string - rating?: number | null - category?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - resolvedAt?: Date | string | null - resolvedBy?: string | null - adminNotes?: string | null - } - - export type FeedbackUpdateManyMutationInput = { - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: NullableStringFieldUpdateOperationsInput | string | null - subject?: StringFieldUpdateOperationsInput | string - message?: StringFieldUpdateOperationsInput | string - rating?: NullableIntFieldUpdateOperationsInput | number | null - category?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - resolvedBy?: NullableStringFieldUpdateOperationsInput | string | null - adminNotes?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type FeedbackUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: NullableStringFieldUpdateOperationsInput | string | null - subject?: StringFieldUpdateOperationsInput | string - message?: StringFieldUpdateOperationsInput | string - rating?: NullableIntFieldUpdateOperationsInput | number | null - category?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - resolvedBy?: NullableStringFieldUpdateOperationsInput | string | null - adminNotes?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type GrievanceCreateInput = { - name: string - email: string - phone: string - address: string - subject: string - description: string - category?: string | null - priority?: string - status?: string - attachments?: GrievanceCreateattachmentsInput | string[] - createdAt?: Date | string - updatedAt?: Date | string - assignedTo?: string | null - adminNotes?: string | null - resolvedAt?: Date | string | null - trackingId: string - } - - export type GrievanceUncheckedCreateInput = { - id?: number - name: string - email: string - phone: string - address: string - subject: string - description: string - category?: string | null - priority?: string - status?: string - attachments?: GrievanceCreateattachmentsInput | string[] - createdAt?: Date | string - updatedAt?: Date | string - assignedTo?: string | null - adminNotes?: string | null - resolvedAt?: Date | string | null - trackingId: string - } - - export type GrievanceUpdateInput = { - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - address?: StringFieldUpdateOperationsInput | string - subject?: StringFieldUpdateOperationsInput | string - description?: StringFieldUpdateOperationsInput | string - category?: NullableStringFieldUpdateOperationsInput | string | null - priority?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - attachments?: GrievanceUpdateattachmentsInput | string[] - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - assignedTo?: NullableStringFieldUpdateOperationsInput | string | null - adminNotes?: NullableStringFieldUpdateOperationsInput | string | null - resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - trackingId?: StringFieldUpdateOperationsInput | string - } - - export type GrievanceUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - address?: StringFieldUpdateOperationsInput | string - subject?: StringFieldUpdateOperationsInput | string - description?: StringFieldUpdateOperationsInput | string - category?: NullableStringFieldUpdateOperationsInput | string | null - priority?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - attachments?: GrievanceUpdateattachmentsInput | string[] - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - assignedTo?: NullableStringFieldUpdateOperationsInput | string | null - adminNotes?: NullableStringFieldUpdateOperationsInput | string | null - resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - trackingId?: StringFieldUpdateOperationsInput | string - } - - export type GrievanceCreateManyInput = { - id?: number - name: string - email: string - phone: string - address: string - subject: string - description: string - category?: string | null - priority?: string - status?: string - attachments?: GrievanceCreateattachmentsInput | string[] - createdAt?: Date | string - updatedAt?: Date | string - assignedTo?: string | null - adminNotes?: string | null - resolvedAt?: Date | string | null - trackingId: string - } - - export type GrievanceUpdateManyMutationInput = { - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - address?: StringFieldUpdateOperationsInput | string - subject?: StringFieldUpdateOperationsInput | string - description?: StringFieldUpdateOperationsInput | string - category?: NullableStringFieldUpdateOperationsInput | string | null - priority?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - attachments?: GrievanceUpdateattachmentsInput | string[] - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - assignedTo?: NullableStringFieldUpdateOperationsInput | string | null - adminNotes?: NullableStringFieldUpdateOperationsInput | string | null - resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - trackingId?: StringFieldUpdateOperationsInput | string - } - - export type GrievanceUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - address?: StringFieldUpdateOperationsInput | string - subject?: StringFieldUpdateOperationsInput | string - description?: StringFieldUpdateOperationsInput | string - category?: NullableStringFieldUpdateOperationsInput | string | null - priority?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - attachments?: GrievanceUpdateattachmentsInput | string[] - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - assignedTo?: NullableStringFieldUpdateOperationsInput | string | null - adminNotes?: NullableStringFieldUpdateOperationsInput | string | null - resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - trackingId?: StringFieldUpdateOperationsInput | string - } - - export type IntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - - export type StringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringFilter<$PrismaModel> | string - } - - export type DateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeFilter<$PrismaModel> | Date | string - } - - export type SchemeServiceListRelationFilter = { - every?: SchemeServiceWhereInput - some?: SchemeServiceWhereInput - none?: SchemeServiceWhereInput - } - - export type CertificateServiceListRelationFilter = { - every?: CertificateServiceWhereInput - some?: CertificateServiceWhereInput - none?: CertificateServiceWhereInput - } - - export type ContactServiceListRelationFilter = { - every?: ContactServiceWhereInput - some?: ContactServiceWhereInput - none?: ContactServiceWhereInput - } - - export type SchemeServiceOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type CertificateServiceOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type ContactServiceOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type AdminCountOrderByAggregateInput = { - id?: SortOrder - email?: SortOrder - password?: SortOrder - name?: SortOrder - role?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AdminAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type AdminMaxOrderByAggregateInput = { - id?: SortOrder - email?: SortOrder - password?: SortOrder - name?: SortOrder - role?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AdminMinOrderByAggregateInput = { - id?: SortOrder - email?: SortOrder - password?: SortOrder - name?: SortOrder - role?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AdminSumOrderByAggregateInput = { - id?: SortOrder - } - - export type IntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedIntFilter<$PrismaModel> - _min?: NestedIntFilter<$PrismaModel> - _max?: NestedIntFilter<$PrismaModel> - } - - export type StringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedStringFilter<$PrismaModel> - _max?: NestedStringFilter<$PrismaModel> - } - - export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> - } - - export type StringNullableFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringNullableFilter<$PrismaModel> | string | null - } - - export type StringNullableListFilter<$PrismaModel = never> = { - equals?: string[] | ListStringFieldRefInput<$PrismaModel> | null - has?: string | StringFieldRefInput<$PrismaModel> | null - hasEvery?: string[] | ListStringFieldRefInput<$PrismaModel> - hasSome?: string[] | ListStringFieldRefInput<$PrismaModel> - isEmpty?: boolean - } - - export type BoolFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolFilter<$PrismaModel> | boolean - } - - export type AdminScalarRelationFilter = { - is?: AdminWhereInput - isNot?: AdminWhereInput - } - - export type ContactPersonListRelationFilter = { - every?: ContactPersonWhereInput - some?: ContactPersonWhereInput - none?: ContactPersonWhereInput - } - - export type SupportiveDocumentListRelationFilter = { - every?: SupportiveDocumentWhereInput - some?: SupportiveDocumentWhereInput - none?: SupportiveDocumentWhereInput - } - - export type SortOrderInput = { - sort: SortOrder - nulls?: NullsOrder - } - - export type ContactPersonOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type SupportiveDocumentOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type SchemeServiceCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrder - targetAudience?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrder - offlineAddress?: SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - eligibilityDetails?: SortOrder - schemeDetails?: SortOrder - processDetails?: SortOrder - processNew?: SortOrder - processUpdate?: SortOrder - processLost?: SortOrder - processSurrender?: SortOrder - docNew?: SortOrder - docUpdate?: SortOrder - docLost?: SortOrder - docSurrender?: SortOrder - } - - export type SchemeServiceAvgOrderByAggregateInput = { - id?: SortOrder - adminId?: SortOrder - } - - export type SchemeServiceMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrder - offlineAddress?: SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - processNew?: SortOrder - processUpdate?: SortOrder - processLost?: SortOrder - processSurrender?: SortOrder - docNew?: SortOrder - docUpdate?: SortOrder - docLost?: SortOrder - docSurrender?: SortOrder - } - - export type SchemeServiceMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrder - offlineAddress?: SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - processNew?: SortOrder - processUpdate?: SortOrder - processLost?: SortOrder - processSurrender?: SortOrder - docNew?: SortOrder - docUpdate?: SortOrder - docLost?: SortOrder - docSurrender?: SortOrder - } - - export type SchemeServiceSumOrderByAggregateInput = { - id?: SortOrder - adminId?: SortOrder - } - - export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - mode?: QueryMode - not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedStringNullableFilter<$PrismaModel> - _max?: NestedStringNullableFilter<$PrismaModel> - } - - export type BoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedBoolFilter<$PrismaModel> - _max?: NestedBoolFilter<$PrismaModel> - } - - export type SchemeServiceScalarRelationFilter = { - is?: SchemeServiceWhereInput - isNot?: SchemeServiceWhereInput - } - - export type ContactPersonCountOrderByAggregateInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - schemeServiceId?: SortOrder - } - - export type ContactPersonAvgOrderByAggregateInput = { - id?: SortOrder - schemeServiceId?: SortOrder - } - - export type ContactPersonMaxOrderByAggregateInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - schemeServiceId?: SortOrder - } - - export type ContactPersonMinOrderByAggregateInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - schemeServiceId?: SortOrder - } - - export type ContactPersonSumOrderByAggregateInput = { - id?: SortOrder - schemeServiceId?: SortOrder - } - - export type SupportiveDocumentCountOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - schemeServiceId?: SortOrder - } - - export type SupportiveDocumentAvgOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - schemeServiceId?: SortOrder - } - - export type SupportiveDocumentMaxOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - schemeServiceId?: SortOrder - } - - export type SupportiveDocumentMinOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - schemeServiceId?: SortOrder - } - - export type SupportiveDocumentSumOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - schemeServiceId?: SortOrder - } - - export type CertificateContactListRelationFilter = { - every?: CertificateContactWhereInput - some?: CertificateContactWhereInput - none?: CertificateContactWhereInput - } - - export type CertificateDocumentListRelationFilter = { - every?: CertificateDocumentWhereInput - some?: CertificateDocumentWhereInput - none?: CertificateDocumentWhereInput - } - - export type CertificateProcessStepListRelationFilter = { - every?: CertificateProcessStepWhereInput - some?: CertificateProcessStepWhereInput - none?: CertificateProcessStepWhereInput - } - - export type CertificateEligibilityListRelationFilter = { - every?: CertificateEligibilityWhereInput - some?: CertificateEligibilityWhereInput - none?: CertificateEligibilityWhereInput - } - - export type CertificateContactOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type CertificateDocumentOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type CertificateProcessStepOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type CertificateEligibilityOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type CertificateServiceCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrder - targetAudience?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrder - offlineAddress?: SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - eligibilityDetails?: SortOrder - certificateDetails?: SortOrder - processDetails?: SortOrder - processNew?: SortOrder - processUpdate?: SortOrder - processLost?: SortOrder - processSurrender?: SortOrder - docNew?: SortOrder - docUpdate?: SortOrder - docLost?: SortOrder - docSurrender?: SortOrder - } - - export type CertificateServiceAvgOrderByAggregateInput = { - id?: SortOrder - adminId?: SortOrder - } - - export type CertificateServiceMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrder - offlineAddress?: SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - processNew?: SortOrder - processUpdate?: SortOrder - processLost?: SortOrder - processSurrender?: SortOrder - docNew?: SortOrder - docUpdate?: SortOrder - docLost?: SortOrder - docSurrender?: SortOrder - } - - export type CertificateServiceMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrder - offlineAddress?: SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - processNew?: SortOrder - processUpdate?: SortOrder - processLost?: SortOrder - processSurrender?: SortOrder - docNew?: SortOrder - docUpdate?: SortOrder - docLost?: SortOrder - docSurrender?: SortOrder - } - - export type CertificateServiceSumOrderByAggregateInput = { - id?: SortOrder - adminId?: SortOrder - } - - export type CertificateServiceScalarRelationFilter = { - is?: CertificateServiceWhereInput - isNot?: CertificateServiceWhereInput - } - - export type CertificateContactCountOrderByAggregateInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateContactAvgOrderByAggregateInput = { - id?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateContactMaxOrderByAggregateInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateContactMinOrderByAggregateInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateContactSumOrderByAggregateInput = { - id?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateDocumentCountOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateDocumentAvgOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateDocumentMaxOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateDocumentMinOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateDocumentSumOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateProcessStepCountOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - stepDetails?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateProcessStepAvgOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateProcessStepMaxOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - stepDetails?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateProcessStepMinOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - stepDetails?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateProcessStepSumOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateEligibilityCountOrderByAggregateInput = { - id?: SortOrder - eligibilityDetail?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateEligibilityAvgOrderByAggregateInput = { - id?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateEligibilityMaxOrderByAggregateInput = { - id?: SortOrder - eligibilityDetail?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateEligibilityMinOrderByAggregateInput = { - id?: SortOrder - eligibilityDetail?: SortOrder - applicationType?: SortOrder - certificateServiceId?: SortOrder - } - - export type CertificateEligibilitySumOrderByAggregateInput = { - id?: SortOrder - certificateServiceId?: SortOrder - } - - export type ContactServiceContactListRelationFilter = { - every?: ContactServiceContactWhereInput - some?: ContactServiceContactWhereInput - none?: ContactServiceContactWhereInput - } - - export type ContactServiceDocumentListRelationFilter = { - every?: ContactServiceDocumentWhereInput - some?: ContactServiceDocumentWhereInput - none?: ContactServiceDocumentWhereInput - } - - export type ContactServiceContactOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type ContactServiceDocumentOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type ContactServiceCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrder - targetAudience?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrder - offlineAddress?: SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - eligibilityDetails?: SortOrder - contactDetails?: SortOrder - processDetails?: SortOrder - processNew?: SortOrder - processUpdate?: SortOrder - processLost?: SortOrder - processSurrender?: SortOrder - docNew?: SortOrder - docUpdate?: SortOrder - docLost?: SortOrder - docSurrender?: SortOrder - } - - export type ContactServiceAvgOrderByAggregateInput = { - id?: SortOrder - adminId?: SortOrder - } - - export type ContactServiceMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrder - offlineAddress?: SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - processNew?: SortOrder - processUpdate?: SortOrder - processLost?: SortOrder - processSurrender?: SortOrder - docNew?: SortOrder - docUpdate?: SortOrder - docLost?: SortOrder - docSurrender?: SortOrder - } - - export type ContactServiceMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - summary?: SortOrder - type?: SortOrder - applicationMode?: SortOrder - onlineUrl?: SortOrder - offlineAddress?: SortOrder - status?: SortOrder - isActive?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - adminId?: SortOrder - processNew?: SortOrder - processUpdate?: SortOrder - processLost?: SortOrder - processSurrender?: SortOrder - docNew?: SortOrder - docUpdate?: SortOrder - docLost?: SortOrder - docSurrender?: SortOrder - } - - export type ContactServiceSumOrderByAggregateInput = { - id?: SortOrder - adminId?: SortOrder - } - - export type ContactServiceScalarRelationFilter = { - is?: ContactServiceWhereInput - isNot?: ContactServiceWhereInput - } - - export type PostListRelationFilter = { - every?: PostWhereInput - some?: PostWhereInput - none?: PostWhereInput - } - - export type PostOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type ContactServiceContactCountOrderByAggregateInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - contactServiceId?: SortOrder - } - - export type ContactServiceContactAvgOrderByAggregateInput = { - id?: SortOrder - contactServiceId?: SortOrder - } - - export type ContactServiceContactMaxOrderByAggregateInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - contactServiceId?: SortOrder - } - - export type ContactServiceContactMinOrderByAggregateInput = { - id?: SortOrder - serviceName?: SortOrder - district?: SortOrder - subDistrict?: SortOrder - block?: SortOrder - name?: SortOrder - designation?: SortOrder - contact?: SortOrder - email?: SortOrder - contactServiceId?: SortOrder - } - - export type ContactServiceContactSumOrderByAggregateInput = { - id?: SortOrder - contactServiceId?: SortOrder - } - - export type ContactServiceDocumentCountOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - contactServiceId?: SortOrder - } - - export type ContactServiceDocumentAvgOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - contactServiceId?: SortOrder - } - - export type ContactServiceDocumentMaxOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - contactServiceId?: SortOrder - } - - export type ContactServiceDocumentMinOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - documentType?: SortOrder - validProof?: SortOrder - isRequired?: SortOrder - contactServiceId?: SortOrder - } - - export type ContactServiceDocumentSumOrderByAggregateInput = { - id?: SortOrder - slNo?: SortOrder - contactServiceId?: SortOrder - } - - export type ContactServiceContactScalarRelationFilter = { - is?: ContactServiceContactWhereInput - isNot?: ContactServiceContactWhereInput - } - - export type EmployeeListRelationFilter = { - every?: EmployeeWhereInput - some?: EmployeeWhereInput - none?: EmployeeWhereInput - } - - export type EmployeeOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type PostCountOrderByAggregateInput = { - id?: SortOrder - postName?: SortOrder - rank?: SortOrder - description?: SortOrder - department?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - officeId?: SortOrder - } - - export type PostAvgOrderByAggregateInput = { - id?: SortOrder - officeId?: SortOrder - } - - export type PostMaxOrderByAggregateInput = { - id?: SortOrder - postName?: SortOrder - rank?: SortOrder - description?: SortOrder - department?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - officeId?: SortOrder - } - - export type PostMinOrderByAggregateInput = { - id?: SortOrder - postName?: SortOrder - rank?: SortOrder - description?: SortOrder - department?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - officeId?: SortOrder - } - - export type PostSumOrderByAggregateInput = { - id?: SortOrder - officeId?: SortOrder - } - - export type DateTimeNullableFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null - } - - export type FloatNullableFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableFilter<$PrismaModel> | number | null - } - - export type PostScalarRelationFilter = { - is?: PostWhereInput - isNot?: PostWhereInput - } - - export type EmployeeCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - designation?: SortOrder - employeeId?: SortOrder - joiningDate?: SortOrder - salary?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - postId?: SortOrder - } - - export type EmployeeAvgOrderByAggregateInput = { - id?: SortOrder - salary?: SortOrder - postId?: SortOrder - } - - export type EmployeeMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - designation?: SortOrder - employeeId?: SortOrder - joiningDate?: SortOrder - salary?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - postId?: SortOrder - } - - export type EmployeeMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - designation?: SortOrder - employeeId?: SortOrder - joiningDate?: SortOrder - salary?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - postId?: SortOrder - } - - export type EmployeeSumOrderByAggregateInput = { - id?: SortOrder - salary?: SortOrder - postId?: SortOrder - } - - export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedDateTimeNullableFilter<$PrismaModel> - _max?: NestedDateTimeNullableFilter<$PrismaModel> - } - - export type FloatNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: NestedIntNullableFilter<$PrismaModel> - _avg?: NestedFloatNullableFilter<$PrismaModel> - _sum?: NestedFloatNullableFilter<$PrismaModel> - _min?: NestedFloatNullableFilter<$PrismaModel> - _max?: NestedFloatNullableFilter<$PrismaModel> - } - - export type IntNullableFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | ListIntFieldRefInput<$PrismaModel> | null - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableFilter<$PrismaModel> | number | null - } - - export type FeedbackCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - subject?: SortOrder - message?: SortOrder - rating?: SortOrder - category?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - resolvedAt?: SortOrder - resolvedBy?: SortOrder - adminNotes?: SortOrder - } - - export type FeedbackAvgOrderByAggregateInput = { - id?: SortOrder - rating?: SortOrder - } - - export type FeedbackMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - subject?: SortOrder - message?: SortOrder - rating?: SortOrder - category?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - resolvedAt?: SortOrder - resolvedBy?: SortOrder - adminNotes?: SortOrder - } - - export type FeedbackMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - subject?: SortOrder - message?: SortOrder - rating?: SortOrder - category?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - resolvedAt?: SortOrder - resolvedBy?: SortOrder - adminNotes?: SortOrder - } - - export type FeedbackSumOrderByAggregateInput = { - id?: SortOrder - rating?: SortOrder - } - - export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | ListIntFieldRefInput<$PrismaModel> | null - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: NestedIntNullableFilter<$PrismaModel> - _avg?: NestedFloatNullableFilter<$PrismaModel> - _sum?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedIntNullableFilter<$PrismaModel> - _max?: NestedIntNullableFilter<$PrismaModel> - } - - export type GrievanceCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - address?: SortOrder - subject?: SortOrder - description?: SortOrder - category?: SortOrder - priority?: SortOrder - status?: SortOrder - attachments?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - assignedTo?: SortOrder - adminNotes?: SortOrder - resolvedAt?: SortOrder - trackingId?: SortOrder - } - - export type GrievanceAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type GrievanceMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - address?: SortOrder - subject?: SortOrder - description?: SortOrder - category?: SortOrder - priority?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - assignedTo?: SortOrder - adminNotes?: SortOrder - resolvedAt?: SortOrder - trackingId?: SortOrder - } - - export type GrievanceMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - phone?: SortOrder - address?: SortOrder - subject?: SortOrder - description?: SortOrder - category?: SortOrder - priority?: SortOrder - status?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - assignedTo?: SortOrder - adminNotes?: SortOrder - resolvedAt?: SortOrder - trackingId?: SortOrder - } - - export type GrievanceSumOrderByAggregateInput = { - id?: SortOrder - } - - export type SchemeServiceCreateNestedManyWithoutAdminInput = { - create?: XOR | SchemeServiceCreateWithoutAdminInput[] | SchemeServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: SchemeServiceCreateOrConnectWithoutAdminInput | SchemeServiceCreateOrConnectWithoutAdminInput[] - createMany?: SchemeServiceCreateManyAdminInputEnvelope - connect?: SchemeServiceWhereUniqueInput | SchemeServiceWhereUniqueInput[] - } - - export type CertificateServiceCreateNestedManyWithoutAdminInput = { - create?: XOR | CertificateServiceCreateWithoutAdminInput[] | CertificateServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: CertificateServiceCreateOrConnectWithoutAdminInput | CertificateServiceCreateOrConnectWithoutAdminInput[] - createMany?: CertificateServiceCreateManyAdminInputEnvelope - connect?: CertificateServiceWhereUniqueInput | CertificateServiceWhereUniqueInput[] - } - - export type ContactServiceCreateNestedManyWithoutAdminInput = { - create?: XOR | ContactServiceCreateWithoutAdminInput[] | ContactServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: ContactServiceCreateOrConnectWithoutAdminInput | ContactServiceCreateOrConnectWithoutAdminInput[] - createMany?: ContactServiceCreateManyAdminInputEnvelope - connect?: ContactServiceWhereUniqueInput | ContactServiceWhereUniqueInput[] - } - - export type SchemeServiceUncheckedCreateNestedManyWithoutAdminInput = { - create?: XOR | SchemeServiceCreateWithoutAdminInput[] | SchemeServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: SchemeServiceCreateOrConnectWithoutAdminInput | SchemeServiceCreateOrConnectWithoutAdminInput[] - createMany?: SchemeServiceCreateManyAdminInputEnvelope - connect?: SchemeServiceWhereUniqueInput | SchemeServiceWhereUniqueInput[] - } - - export type CertificateServiceUncheckedCreateNestedManyWithoutAdminInput = { - create?: XOR | CertificateServiceCreateWithoutAdminInput[] | CertificateServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: CertificateServiceCreateOrConnectWithoutAdminInput | CertificateServiceCreateOrConnectWithoutAdminInput[] - createMany?: CertificateServiceCreateManyAdminInputEnvelope - connect?: CertificateServiceWhereUniqueInput | CertificateServiceWhereUniqueInput[] - } - - export type ContactServiceUncheckedCreateNestedManyWithoutAdminInput = { - create?: XOR | ContactServiceCreateWithoutAdminInput[] | ContactServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: ContactServiceCreateOrConnectWithoutAdminInput | ContactServiceCreateOrConnectWithoutAdminInput[] - createMany?: ContactServiceCreateManyAdminInputEnvelope - connect?: ContactServiceWhereUniqueInput | ContactServiceWhereUniqueInput[] - } - - export type StringFieldUpdateOperationsInput = { - set?: string - } - - export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string - } - - export type SchemeServiceUpdateManyWithoutAdminNestedInput = { - create?: XOR | SchemeServiceCreateWithoutAdminInput[] | SchemeServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: SchemeServiceCreateOrConnectWithoutAdminInput | SchemeServiceCreateOrConnectWithoutAdminInput[] - upsert?: SchemeServiceUpsertWithWhereUniqueWithoutAdminInput | SchemeServiceUpsertWithWhereUniqueWithoutAdminInput[] - createMany?: SchemeServiceCreateManyAdminInputEnvelope - set?: SchemeServiceWhereUniqueInput | SchemeServiceWhereUniqueInput[] - disconnect?: SchemeServiceWhereUniqueInput | SchemeServiceWhereUniqueInput[] - delete?: SchemeServiceWhereUniqueInput | SchemeServiceWhereUniqueInput[] - connect?: SchemeServiceWhereUniqueInput | SchemeServiceWhereUniqueInput[] - update?: SchemeServiceUpdateWithWhereUniqueWithoutAdminInput | SchemeServiceUpdateWithWhereUniqueWithoutAdminInput[] - updateMany?: SchemeServiceUpdateManyWithWhereWithoutAdminInput | SchemeServiceUpdateManyWithWhereWithoutAdminInput[] - deleteMany?: SchemeServiceScalarWhereInput | SchemeServiceScalarWhereInput[] - } - - export type CertificateServiceUpdateManyWithoutAdminNestedInput = { - create?: XOR | CertificateServiceCreateWithoutAdminInput[] | CertificateServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: CertificateServiceCreateOrConnectWithoutAdminInput | CertificateServiceCreateOrConnectWithoutAdminInput[] - upsert?: CertificateServiceUpsertWithWhereUniqueWithoutAdminInput | CertificateServiceUpsertWithWhereUniqueWithoutAdminInput[] - createMany?: CertificateServiceCreateManyAdminInputEnvelope - set?: CertificateServiceWhereUniqueInput | CertificateServiceWhereUniqueInput[] - disconnect?: CertificateServiceWhereUniqueInput | CertificateServiceWhereUniqueInput[] - delete?: CertificateServiceWhereUniqueInput | CertificateServiceWhereUniqueInput[] - connect?: CertificateServiceWhereUniqueInput | CertificateServiceWhereUniqueInput[] - update?: CertificateServiceUpdateWithWhereUniqueWithoutAdminInput | CertificateServiceUpdateWithWhereUniqueWithoutAdminInput[] - updateMany?: CertificateServiceUpdateManyWithWhereWithoutAdminInput | CertificateServiceUpdateManyWithWhereWithoutAdminInput[] - deleteMany?: CertificateServiceScalarWhereInput | CertificateServiceScalarWhereInput[] - } - - export type ContactServiceUpdateManyWithoutAdminNestedInput = { - create?: XOR | ContactServiceCreateWithoutAdminInput[] | ContactServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: ContactServiceCreateOrConnectWithoutAdminInput | ContactServiceCreateOrConnectWithoutAdminInput[] - upsert?: ContactServiceUpsertWithWhereUniqueWithoutAdminInput | ContactServiceUpsertWithWhereUniqueWithoutAdminInput[] - createMany?: ContactServiceCreateManyAdminInputEnvelope - set?: ContactServiceWhereUniqueInput | ContactServiceWhereUniqueInput[] - disconnect?: ContactServiceWhereUniqueInput | ContactServiceWhereUniqueInput[] - delete?: ContactServiceWhereUniqueInput | ContactServiceWhereUniqueInput[] - connect?: ContactServiceWhereUniqueInput | ContactServiceWhereUniqueInput[] - update?: ContactServiceUpdateWithWhereUniqueWithoutAdminInput | ContactServiceUpdateWithWhereUniqueWithoutAdminInput[] - updateMany?: ContactServiceUpdateManyWithWhereWithoutAdminInput | ContactServiceUpdateManyWithWhereWithoutAdminInput[] - deleteMany?: ContactServiceScalarWhereInput | ContactServiceScalarWhereInput[] - } - - export type IntFieldUpdateOperationsInput = { - set?: number - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type SchemeServiceUncheckedUpdateManyWithoutAdminNestedInput = { - create?: XOR | SchemeServiceCreateWithoutAdminInput[] | SchemeServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: SchemeServiceCreateOrConnectWithoutAdminInput | SchemeServiceCreateOrConnectWithoutAdminInput[] - upsert?: SchemeServiceUpsertWithWhereUniqueWithoutAdminInput | SchemeServiceUpsertWithWhereUniqueWithoutAdminInput[] - createMany?: SchemeServiceCreateManyAdminInputEnvelope - set?: SchemeServiceWhereUniqueInput | SchemeServiceWhereUniqueInput[] - disconnect?: SchemeServiceWhereUniqueInput | SchemeServiceWhereUniqueInput[] - delete?: SchemeServiceWhereUniqueInput | SchemeServiceWhereUniqueInput[] - connect?: SchemeServiceWhereUniqueInput | SchemeServiceWhereUniqueInput[] - update?: SchemeServiceUpdateWithWhereUniqueWithoutAdminInput | SchemeServiceUpdateWithWhereUniqueWithoutAdminInput[] - updateMany?: SchemeServiceUpdateManyWithWhereWithoutAdminInput | SchemeServiceUpdateManyWithWhereWithoutAdminInput[] - deleteMany?: SchemeServiceScalarWhereInput | SchemeServiceScalarWhereInput[] - } - - export type CertificateServiceUncheckedUpdateManyWithoutAdminNestedInput = { - create?: XOR | CertificateServiceCreateWithoutAdminInput[] | CertificateServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: CertificateServiceCreateOrConnectWithoutAdminInput | CertificateServiceCreateOrConnectWithoutAdminInput[] - upsert?: CertificateServiceUpsertWithWhereUniqueWithoutAdminInput | CertificateServiceUpsertWithWhereUniqueWithoutAdminInput[] - createMany?: CertificateServiceCreateManyAdminInputEnvelope - set?: CertificateServiceWhereUniqueInput | CertificateServiceWhereUniqueInput[] - disconnect?: CertificateServiceWhereUniqueInput | CertificateServiceWhereUniqueInput[] - delete?: CertificateServiceWhereUniqueInput | CertificateServiceWhereUniqueInput[] - connect?: CertificateServiceWhereUniqueInput | CertificateServiceWhereUniqueInput[] - update?: CertificateServiceUpdateWithWhereUniqueWithoutAdminInput | CertificateServiceUpdateWithWhereUniqueWithoutAdminInput[] - updateMany?: CertificateServiceUpdateManyWithWhereWithoutAdminInput | CertificateServiceUpdateManyWithWhereWithoutAdminInput[] - deleteMany?: CertificateServiceScalarWhereInput | CertificateServiceScalarWhereInput[] - } - - export type ContactServiceUncheckedUpdateManyWithoutAdminNestedInput = { - create?: XOR | ContactServiceCreateWithoutAdminInput[] | ContactServiceUncheckedCreateWithoutAdminInput[] - connectOrCreate?: ContactServiceCreateOrConnectWithoutAdminInput | ContactServiceCreateOrConnectWithoutAdminInput[] - upsert?: ContactServiceUpsertWithWhereUniqueWithoutAdminInput | ContactServiceUpsertWithWhereUniqueWithoutAdminInput[] - createMany?: ContactServiceCreateManyAdminInputEnvelope - set?: ContactServiceWhereUniqueInput | ContactServiceWhereUniqueInput[] - disconnect?: ContactServiceWhereUniqueInput | ContactServiceWhereUniqueInput[] - delete?: ContactServiceWhereUniqueInput | ContactServiceWhereUniqueInput[] - connect?: ContactServiceWhereUniqueInput | ContactServiceWhereUniqueInput[] - update?: ContactServiceUpdateWithWhereUniqueWithoutAdminInput | ContactServiceUpdateWithWhereUniqueWithoutAdminInput[] - updateMany?: ContactServiceUpdateManyWithWhereWithoutAdminInput | ContactServiceUpdateManyWithWhereWithoutAdminInput[] - deleteMany?: ContactServiceScalarWhereInput | ContactServiceScalarWhereInput[] - } - - export type SchemeServiceCreatetargetAudienceInput = { - set: string[] - } - - export type SchemeServiceCreateeligibilityDetailsInput = { - set: string[] - } - - export type SchemeServiceCreateschemeDetailsInput = { - set: string[] - } - - export type SchemeServiceCreateprocessDetailsInput = { - set: string[] - } - - export type AdminCreateNestedOneWithoutSchemeServicesInput = { - create?: XOR - connectOrCreate?: AdminCreateOrConnectWithoutSchemeServicesInput - connect?: AdminWhereUniqueInput - } - - export type ContactPersonCreateNestedManyWithoutSchemeServiceInput = { - create?: XOR | ContactPersonCreateWithoutSchemeServiceInput[] | ContactPersonUncheckedCreateWithoutSchemeServiceInput[] - connectOrCreate?: ContactPersonCreateOrConnectWithoutSchemeServiceInput | ContactPersonCreateOrConnectWithoutSchemeServiceInput[] - createMany?: ContactPersonCreateManySchemeServiceInputEnvelope - connect?: ContactPersonWhereUniqueInput | ContactPersonWhereUniqueInput[] - } - - export type SupportiveDocumentCreateNestedManyWithoutSchemeServiceInput = { - create?: XOR | SupportiveDocumentCreateWithoutSchemeServiceInput[] | SupportiveDocumentUncheckedCreateWithoutSchemeServiceInput[] - connectOrCreate?: SupportiveDocumentCreateOrConnectWithoutSchemeServiceInput | SupportiveDocumentCreateOrConnectWithoutSchemeServiceInput[] - createMany?: SupportiveDocumentCreateManySchemeServiceInputEnvelope - connect?: SupportiveDocumentWhereUniqueInput | SupportiveDocumentWhereUniqueInput[] - } - - export type ContactPersonUncheckedCreateNestedManyWithoutSchemeServiceInput = { - create?: XOR | ContactPersonCreateWithoutSchemeServiceInput[] | ContactPersonUncheckedCreateWithoutSchemeServiceInput[] - connectOrCreate?: ContactPersonCreateOrConnectWithoutSchemeServiceInput | ContactPersonCreateOrConnectWithoutSchemeServiceInput[] - createMany?: ContactPersonCreateManySchemeServiceInputEnvelope - connect?: ContactPersonWhereUniqueInput | ContactPersonWhereUniqueInput[] - } - - export type SupportiveDocumentUncheckedCreateNestedManyWithoutSchemeServiceInput = { - create?: XOR | SupportiveDocumentCreateWithoutSchemeServiceInput[] | SupportiveDocumentUncheckedCreateWithoutSchemeServiceInput[] - connectOrCreate?: SupportiveDocumentCreateOrConnectWithoutSchemeServiceInput | SupportiveDocumentCreateOrConnectWithoutSchemeServiceInput[] - createMany?: SupportiveDocumentCreateManySchemeServiceInputEnvelope - connect?: SupportiveDocumentWhereUniqueInput | SupportiveDocumentWhereUniqueInput[] - } - - export type NullableStringFieldUpdateOperationsInput = { - set?: string | null - } - - export type SchemeServiceUpdatetargetAudienceInput = { - set?: string[] - push?: string | string[] - } - - export type BoolFieldUpdateOperationsInput = { - set?: boolean - } - - export type SchemeServiceUpdateeligibilityDetailsInput = { - set?: string[] - push?: string | string[] - } - - export type SchemeServiceUpdateschemeDetailsInput = { - set?: string[] - push?: string | string[] - } - - export type SchemeServiceUpdateprocessDetailsInput = { - set?: string[] - push?: string | string[] - } - - export type AdminUpdateOneRequiredWithoutSchemeServicesNestedInput = { - create?: XOR - connectOrCreate?: AdminCreateOrConnectWithoutSchemeServicesInput - upsert?: AdminUpsertWithoutSchemeServicesInput - connect?: AdminWhereUniqueInput - update?: XOR, AdminUncheckedUpdateWithoutSchemeServicesInput> - } - - export type ContactPersonUpdateManyWithoutSchemeServiceNestedInput = { - create?: XOR | ContactPersonCreateWithoutSchemeServiceInput[] | ContactPersonUncheckedCreateWithoutSchemeServiceInput[] - connectOrCreate?: ContactPersonCreateOrConnectWithoutSchemeServiceInput | ContactPersonCreateOrConnectWithoutSchemeServiceInput[] - upsert?: ContactPersonUpsertWithWhereUniqueWithoutSchemeServiceInput | ContactPersonUpsertWithWhereUniqueWithoutSchemeServiceInput[] - createMany?: ContactPersonCreateManySchemeServiceInputEnvelope - set?: ContactPersonWhereUniqueInput | ContactPersonWhereUniqueInput[] - disconnect?: ContactPersonWhereUniqueInput | ContactPersonWhereUniqueInput[] - delete?: ContactPersonWhereUniqueInput | ContactPersonWhereUniqueInput[] - connect?: ContactPersonWhereUniqueInput | ContactPersonWhereUniqueInput[] - update?: ContactPersonUpdateWithWhereUniqueWithoutSchemeServiceInput | ContactPersonUpdateWithWhereUniqueWithoutSchemeServiceInput[] - updateMany?: ContactPersonUpdateManyWithWhereWithoutSchemeServiceInput | ContactPersonUpdateManyWithWhereWithoutSchemeServiceInput[] - deleteMany?: ContactPersonScalarWhereInput | ContactPersonScalarWhereInput[] - } - - export type SupportiveDocumentUpdateManyWithoutSchemeServiceNestedInput = { - create?: XOR | SupportiveDocumentCreateWithoutSchemeServiceInput[] | SupportiveDocumentUncheckedCreateWithoutSchemeServiceInput[] - connectOrCreate?: SupportiveDocumentCreateOrConnectWithoutSchemeServiceInput | SupportiveDocumentCreateOrConnectWithoutSchemeServiceInput[] - upsert?: SupportiveDocumentUpsertWithWhereUniqueWithoutSchemeServiceInput | SupportiveDocumentUpsertWithWhereUniqueWithoutSchemeServiceInput[] - createMany?: SupportiveDocumentCreateManySchemeServiceInputEnvelope - set?: SupportiveDocumentWhereUniqueInput | SupportiveDocumentWhereUniqueInput[] - disconnect?: SupportiveDocumentWhereUniqueInput | SupportiveDocumentWhereUniqueInput[] - delete?: SupportiveDocumentWhereUniqueInput | SupportiveDocumentWhereUniqueInput[] - connect?: SupportiveDocumentWhereUniqueInput | SupportiveDocumentWhereUniqueInput[] - update?: SupportiveDocumentUpdateWithWhereUniqueWithoutSchemeServiceInput | SupportiveDocumentUpdateWithWhereUniqueWithoutSchemeServiceInput[] - updateMany?: SupportiveDocumentUpdateManyWithWhereWithoutSchemeServiceInput | SupportiveDocumentUpdateManyWithWhereWithoutSchemeServiceInput[] - deleteMany?: SupportiveDocumentScalarWhereInput | SupportiveDocumentScalarWhereInput[] - } - - export type ContactPersonUncheckedUpdateManyWithoutSchemeServiceNestedInput = { - create?: XOR | ContactPersonCreateWithoutSchemeServiceInput[] | ContactPersonUncheckedCreateWithoutSchemeServiceInput[] - connectOrCreate?: ContactPersonCreateOrConnectWithoutSchemeServiceInput | ContactPersonCreateOrConnectWithoutSchemeServiceInput[] - upsert?: ContactPersonUpsertWithWhereUniqueWithoutSchemeServiceInput | ContactPersonUpsertWithWhereUniqueWithoutSchemeServiceInput[] - createMany?: ContactPersonCreateManySchemeServiceInputEnvelope - set?: ContactPersonWhereUniqueInput | ContactPersonWhereUniqueInput[] - disconnect?: ContactPersonWhereUniqueInput | ContactPersonWhereUniqueInput[] - delete?: ContactPersonWhereUniqueInput | ContactPersonWhereUniqueInput[] - connect?: ContactPersonWhereUniqueInput | ContactPersonWhereUniqueInput[] - update?: ContactPersonUpdateWithWhereUniqueWithoutSchemeServiceInput | ContactPersonUpdateWithWhereUniqueWithoutSchemeServiceInput[] - updateMany?: ContactPersonUpdateManyWithWhereWithoutSchemeServiceInput | ContactPersonUpdateManyWithWhereWithoutSchemeServiceInput[] - deleteMany?: ContactPersonScalarWhereInput | ContactPersonScalarWhereInput[] - } - - export type SupportiveDocumentUncheckedUpdateManyWithoutSchemeServiceNestedInput = { - create?: XOR | SupportiveDocumentCreateWithoutSchemeServiceInput[] | SupportiveDocumentUncheckedCreateWithoutSchemeServiceInput[] - connectOrCreate?: SupportiveDocumentCreateOrConnectWithoutSchemeServiceInput | SupportiveDocumentCreateOrConnectWithoutSchemeServiceInput[] - upsert?: SupportiveDocumentUpsertWithWhereUniqueWithoutSchemeServiceInput | SupportiveDocumentUpsertWithWhereUniqueWithoutSchemeServiceInput[] - createMany?: SupportiveDocumentCreateManySchemeServiceInputEnvelope - set?: SupportiveDocumentWhereUniqueInput | SupportiveDocumentWhereUniqueInput[] - disconnect?: SupportiveDocumentWhereUniqueInput | SupportiveDocumentWhereUniqueInput[] - delete?: SupportiveDocumentWhereUniqueInput | SupportiveDocumentWhereUniqueInput[] - connect?: SupportiveDocumentWhereUniqueInput | SupportiveDocumentWhereUniqueInput[] - update?: SupportiveDocumentUpdateWithWhereUniqueWithoutSchemeServiceInput | SupportiveDocumentUpdateWithWhereUniqueWithoutSchemeServiceInput[] - updateMany?: SupportiveDocumentUpdateManyWithWhereWithoutSchemeServiceInput | SupportiveDocumentUpdateManyWithWhereWithoutSchemeServiceInput[] - deleteMany?: SupportiveDocumentScalarWhereInput | SupportiveDocumentScalarWhereInput[] - } - - export type SchemeServiceCreateNestedOneWithoutContactsInput = { - create?: XOR - connectOrCreate?: SchemeServiceCreateOrConnectWithoutContactsInput - connect?: SchemeServiceWhereUniqueInput - } - - export type SchemeServiceUpdateOneRequiredWithoutContactsNestedInput = { - create?: XOR - connectOrCreate?: SchemeServiceCreateOrConnectWithoutContactsInput - upsert?: SchemeServiceUpsertWithoutContactsInput - connect?: SchemeServiceWhereUniqueInput - update?: XOR, SchemeServiceUncheckedUpdateWithoutContactsInput> - } - - export type SchemeServiceCreateNestedOneWithoutDocumentsInput = { - create?: XOR - connectOrCreate?: SchemeServiceCreateOrConnectWithoutDocumentsInput - connect?: SchemeServiceWhereUniqueInput - } - - export type SchemeServiceUpdateOneRequiredWithoutDocumentsNestedInput = { - create?: XOR - connectOrCreate?: SchemeServiceCreateOrConnectWithoutDocumentsInput - upsert?: SchemeServiceUpsertWithoutDocumentsInput - connect?: SchemeServiceWhereUniqueInput - update?: XOR, SchemeServiceUncheckedUpdateWithoutDocumentsInput> - } - - export type CertificateServiceCreatetargetAudienceInput = { - set: string[] - } - - export type CertificateServiceCreateeligibilityDetailsInput = { - set: string[] - } - - export type CertificateServiceCreatecertificateDetailsInput = { - set: string[] - } - - export type CertificateServiceCreateprocessDetailsInput = { - set: string[] - } - - export type AdminCreateNestedOneWithoutCertificateServicesInput = { - create?: XOR - connectOrCreate?: AdminCreateOrConnectWithoutCertificateServicesInput - connect?: AdminWhereUniqueInput - } - - export type CertificateContactCreateNestedManyWithoutCertificateServiceInput = { - create?: XOR | CertificateContactCreateWithoutCertificateServiceInput[] | CertificateContactUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateContactCreateOrConnectWithoutCertificateServiceInput | CertificateContactCreateOrConnectWithoutCertificateServiceInput[] - createMany?: CertificateContactCreateManyCertificateServiceInputEnvelope - connect?: CertificateContactWhereUniqueInput | CertificateContactWhereUniqueInput[] - } - - export type CertificateDocumentCreateNestedManyWithoutCertificateServiceInput = { - create?: XOR | CertificateDocumentCreateWithoutCertificateServiceInput[] | CertificateDocumentUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateDocumentCreateOrConnectWithoutCertificateServiceInput | CertificateDocumentCreateOrConnectWithoutCertificateServiceInput[] - createMany?: CertificateDocumentCreateManyCertificateServiceInputEnvelope - connect?: CertificateDocumentWhereUniqueInput | CertificateDocumentWhereUniqueInput[] - } - - export type CertificateProcessStepCreateNestedManyWithoutCertificateServiceInput = { - create?: XOR | CertificateProcessStepCreateWithoutCertificateServiceInput[] | CertificateProcessStepUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateProcessStepCreateOrConnectWithoutCertificateServiceInput | CertificateProcessStepCreateOrConnectWithoutCertificateServiceInput[] - createMany?: CertificateProcessStepCreateManyCertificateServiceInputEnvelope - connect?: CertificateProcessStepWhereUniqueInput | CertificateProcessStepWhereUniqueInput[] - } - - export type CertificateEligibilityCreateNestedManyWithoutCertificateServiceInput = { - create?: XOR | CertificateEligibilityCreateWithoutCertificateServiceInput[] | CertificateEligibilityUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateEligibilityCreateOrConnectWithoutCertificateServiceInput | CertificateEligibilityCreateOrConnectWithoutCertificateServiceInput[] - createMany?: CertificateEligibilityCreateManyCertificateServiceInputEnvelope - connect?: CertificateEligibilityWhereUniqueInput | CertificateEligibilityWhereUniqueInput[] - } - - export type CertificateContactUncheckedCreateNestedManyWithoutCertificateServiceInput = { - create?: XOR | CertificateContactCreateWithoutCertificateServiceInput[] | CertificateContactUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateContactCreateOrConnectWithoutCertificateServiceInput | CertificateContactCreateOrConnectWithoutCertificateServiceInput[] - createMany?: CertificateContactCreateManyCertificateServiceInputEnvelope - connect?: CertificateContactWhereUniqueInput | CertificateContactWhereUniqueInput[] - } - - export type CertificateDocumentUncheckedCreateNestedManyWithoutCertificateServiceInput = { - create?: XOR | CertificateDocumentCreateWithoutCertificateServiceInput[] | CertificateDocumentUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateDocumentCreateOrConnectWithoutCertificateServiceInput | CertificateDocumentCreateOrConnectWithoutCertificateServiceInput[] - createMany?: CertificateDocumentCreateManyCertificateServiceInputEnvelope - connect?: CertificateDocumentWhereUniqueInput | CertificateDocumentWhereUniqueInput[] - } - - export type CertificateProcessStepUncheckedCreateNestedManyWithoutCertificateServiceInput = { - create?: XOR | CertificateProcessStepCreateWithoutCertificateServiceInput[] | CertificateProcessStepUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateProcessStepCreateOrConnectWithoutCertificateServiceInput | CertificateProcessStepCreateOrConnectWithoutCertificateServiceInput[] - createMany?: CertificateProcessStepCreateManyCertificateServiceInputEnvelope - connect?: CertificateProcessStepWhereUniqueInput | CertificateProcessStepWhereUniqueInput[] - } - - export type CertificateEligibilityUncheckedCreateNestedManyWithoutCertificateServiceInput = { - create?: XOR | CertificateEligibilityCreateWithoutCertificateServiceInput[] | CertificateEligibilityUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateEligibilityCreateOrConnectWithoutCertificateServiceInput | CertificateEligibilityCreateOrConnectWithoutCertificateServiceInput[] - createMany?: CertificateEligibilityCreateManyCertificateServiceInputEnvelope - connect?: CertificateEligibilityWhereUniqueInput | CertificateEligibilityWhereUniqueInput[] - } - - export type CertificateServiceUpdatetargetAudienceInput = { - set?: string[] - push?: string | string[] - } - - export type CertificateServiceUpdateeligibilityDetailsInput = { - set?: string[] - push?: string | string[] - } - - export type CertificateServiceUpdatecertificateDetailsInput = { - set?: string[] - push?: string | string[] - } - - export type CertificateServiceUpdateprocessDetailsInput = { - set?: string[] - push?: string | string[] - } - - export type AdminUpdateOneRequiredWithoutCertificateServicesNestedInput = { - create?: XOR - connectOrCreate?: AdminCreateOrConnectWithoutCertificateServicesInput - upsert?: AdminUpsertWithoutCertificateServicesInput - connect?: AdminWhereUniqueInput - update?: XOR, AdminUncheckedUpdateWithoutCertificateServicesInput> - } - - export type CertificateContactUpdateManyWithoutCertificateServiceNestedInput = { - create?: XOR | CertificateContactCreateWithoutCertificateServiceInput[] | CertificateContactUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateContactCreateOrConnectWithoutCertificateServiceInput | CertificateContactCreateOrConnectWithoutCertificateServiceInput[] - upsert?: CertificateContactUpsertWithWhereUniqueWithoutCertificateServiceInput | CertificateContactUpsertWithWhereUniqueWithoutCertificateServiceInput[] - createMany?: CertificateContactCreateManyCertificateServiceInputEnvelope - set?: CertificateContactWhereUniqueInput | CertificateContactWhereUniqueInput[] - disconnect?: CertificateContactWhereUniqueInput | CertificateContactWhereUniqueInput[] - delete?: CertificateContactWhereUniqueInput | CertificateContactWhereUniqueInput[] - connect?: CertificateContactWhereUniqueInput | CertificateContactWhereUniqueInput[] - update?: CertificateContactUpdateWithWhereUniqueWithoutCertificateServiceInput | CertificateContactUpdateWithWhereUniqueWithoutCertificateServiceInput[] - updateMany?: CertificateContactUpdateManyWithWhereWithoutCertificateServiceInput | CertificateContactUpdateManyWithWhereWithoutCertificateServiceInput[] - deleteMany?: CertificateContactScalarWhereInput | CertificateContactScalarWhereInput[] - } - - export type CertificateDocumentUpdateManyWithoutCertificateServiceNestedInput = { - create?: XOR | CertificateDocumentCreateWithoutCertificateServiceInput[] | CertificateDocumentUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateDocumentCreateOrConnectWithoutCertificateServiceInput | CertificateDocumentCreateOrConnectWithoutCertificateServiceInput[] - upsert?: CertificateDocumentUpsertWithWhereUniqueWithoutCertificateServiceInput | CertificateDocumentUpsertWithWhereUniqueWithoutCertificateServiceInput[] - createMany?: CertificateDocumentCreateManyCertificateServiceInputEnvelope - set?: CertificateDocumentWhereUniqueInput | CertificateDocumentWhereUniqueInput[] - disconnect?: CertificateDocumentWhereUniqueInput | CertificateDocumentWhereUniqueInput[] - delete?: CertificateDocumentWhereUniqueInput | CertificateDocumentWhereUniqueInput[] - connect?: CertificateDocumentWhereUniqueInput | CertificateDocumentWhereUniqueInput[] - update?: CertificateDocumentUpdateWithWhereUniqueWithoutCertificateServiceInput | CertificateDocumentUpdateWithWhereUniqueWithoutCertificateServiceInput[] - updateMany?: CertificateDocumentUpdateManyWithWhereWithoutCertificateServiceInput | CertificateDocumentUpdateManyWithWhereWithoutCertificateServiceInput[] - deleteMany?: CertificateDocumentScalarWhereInput | CertificateDocumentScalarWhereInput[] - } - - export type CertificateProcessStepUpdateManyWithoutCertificateServiceNestedInput = { - create?: XOR | CertificateProcessStepCreateWithoutCertificateServiceInput[] | CertificateProcessStepUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateProcessStepCreateOrConnectWithoutCertificateServiceInput | CertificateProcessStepCreateOrConnectWithoutCertificateServiceInput[] - upsert?: CertificateProcessStepUpsertWithWhereUniqueWithoutCertificateServiceInput | CertificateProcessStepUpsertWithWhereUniqueWithoutCertificateServiceInput[] - createMany?: CertificateProcessStepCreateManyCertificateServiceInputEnvelope - set?: CertificateProcessStepWhereUniqueInput | CertificateProcessStepWhereUniqueInput[] - disconnect?: CertificateProcessStepWhereUniqueInput | CertificateProcessStepWhereUniqueInput[] - delete?: CertificateProcessStepWhereUniqueInput | CertificateProcessStepWhereUniqueInput[] - connect?: CertificateProcessStepWhereUniqueInput | CertificateProcessStepWhereUniqueInput[] - update?: CertificateProcessStepUpdateWithWhereUniqueWithoutCertificateServiceInput | CertificateProcessStepUpdateWithWhereUniqueWithoutCertificateServiceInput[] - updateMany?: CertificateProcessStepUpdateManyWithWhereWithoutCertificateServiceInput | CertificateProcessStepUpdateManyWithWhereWithoutCertificateServiceInput[] - deleteMany?: CertificateProcessStepScalarWhereInput | CertificateProcessStepScalarWhereInput[] - } - - export type CertificateEligibilityUpdateManyWithoutCertificateServiceNestedInput = { - create?: XOR | CertificateEligibilityCreateWithoutCertificateServiceInput[] | CertificateEligibilityUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateEligibilityCreateOrConnectWithoutCertificateServiceInput | CertificateEligibilityCreateOrConnectWithoutCertificateServiceInput[] - upsert?: CertificateEligibilityUpsertWithWhereUniqueWithoutCertificateServiceInput | CertificateEligibilityUpsertWithWhereUniqueWithoutCertificateServiceInput[] - createMany?: CertificateEligibilityCreateManyCertificateServiceInputEnvelope - set?: CertificateEligibilityWhereUniqueInput | CertificateEligibilityWhereUniqueInput[] - disconnect?: CertificateEligibilityWhereUniqueInput | CertificateEligibilityWhereUniqueInput[] - delete?: CertificateEligibilityWhereUniqueInput | CertificateEligibilityWhereUniqueInput[] - connect?: CertificateEligibilityWhereUniqueInput | CertificateEligibilityWhereUniqueInput[] - update?: CertificateEligibilityUpdateWithWhereUniqueWithoutCertificateServiceInput | CertificateEligibilityUpdateWithWhereUniqueWithoutCertificateServiceInput[] - updateMany?: CertificateEligibilityUpdateManyWithWhereWithoutCertificateServiceInput | CertificateEligibilityUpdateManyWithWhereWithoutCertificateServiceInput[] - deleteMany?: CertificateEligibilityScalarWhereInput | CertificateEligibilityScalarWhereInput[] - } - - export type CertificateContactUncheckedUpdateManyWithoutCertificateServiceNestedInput = { - create?: XOR | CertificateContactCreateWithoutCertificateServiceInput[] | CertificateContactUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateContactCreateOrConnectWithoutCertificateServiceInput | CertificateContactCreateOrConnectWithoutCertificateServiceInput[] - upsert?: CertificateContactUpsertWithWhereUniqueWithoutCertificateServiceInput | CertificateContactUpsertWithWhereUniqueWithoutCertificateServiceInput[] - createMany?: CertificateContactCreateManyCertificateServiceInputEnvelope - set?: CertificateContactWhereUniqueInput | CertificateContactWhereUniqueInput[] - disconnect?: CertificateContactWhereUniqueInput | CertificateContactWhereUniqueInput[] - delete?: CertificateContactWhereUniqueInput | CertificateContactWhereUniqueInput[] - connect?: CertificateContactWhereUniqueInput | CertificateContactWhereUniqueInput[] - update?: CertificateContactUpdateWithWhereUniqueWithoutCertificateServiceInput | CertificateContactUpdateWithWhereUniqueWithoutCertificateServiceInput[] - updateMany?: CertificateContactUpdateManyWithWhereWithoutCertificateServiceInput | CertificateContactUpdateManyWithWhereWithoutCertificateServiceInput[] - deleteMany?: CertificateContactScalarWhereInput | CertificateContactScalarWhereInput[] - } - - export type CertificateDocumentUncheckedUpdateManyWithoutCertificateServiceNestedInput = { - create?: XOR | CertificateDocumentCreateWithoutCertificateServiceInput[] | CertificateDocumentUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateDocumentCreateOrConnectWithoutCertificateServiceInput | CertificateDocumentCreateOrConnectWithoutCertificateServiceInput[] - upsert?: CertificateDocumentUpsertWithWhereUniqueWithoutCertificateServiceInput | CertificateDocumentUpsertWithWhereUniqueWithoutCertificateServiceInput[] - createMany?: CertificateDocumentCreateManyCertificateServiceInputEnvelope - set?: CertificateDocumentWhereUniqueInput | CertificateDocumentWhereUniqueInput[] - disconnect?: CertificateDocumentWhereUniqueInput | CertificateDocumentWhereUniqueInput[] - delete?: CertificateDocumentWhereUniqueInput | CertificateDocumentWhereUniqueInput[] - connect?: CertificateDocumentWhereUniqueInput | CertificateDocumentWhereUniqueInput[] - update?: CertificateDocumentUpdateWithWhereUniqueWithoutCertificateServiceInput | CertificateDocumentUpdateWithWhereUniqueWithoutCertificateServiceInput[] - updateMany?: CertificateDocumentUpdateManyWithWhereWithoutCertificateServiceInput | CertificateDocumentUpdateManyWithWhereWithoutCertificateServiceInput[] - deleteMany?: CertificateDocumentScalarWhereInput | CertificateDocumentScalarWhereInput[] - } - - export type CertificateProcessStepUncheckedUpdateManyWithoutCertificateServiceNestedInput = { - create?: XOR | CertificateProcessStepCreateWithoutCertificateServiceInput[] | CertificateProcessStepUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateProcessStepCreateOrConnectWithoutCertificateServiceInput | CertificateProcessStepCreateOrConnectWithoutCertificateServiceInput[] - upsert?: CertificateProcessStepUpsertWithWhereUniqueWithoutCertificateServiceInput | CertificateProcessStepUpsertWithWhereUniqueWithoutCertificateServiceInput[] - createMany?: CertificateProcessStepCreateManyCertificateServiceInputEnvelope - set?: CertificateProcessStepWhereUniqueInput | CertificateProcessStepWhereUniqueInput[] - disconnect?: CertificateProcessStepWhereUniqueInput | CertificateProcessStepWhereUniqueInput[] - delete?: CertificateProcessStepWhereUniqueInput | CertificateProcessStepWhereUniqueInput[] - connect?: CertificateProcessStepWhereUniqueInput | CertificateProcessStepWhereUniqueInput[] - update?: CertificateProcessStepUpdateWithWhereUniqueWithoutCertificateServiceInput | CertificateProcessStepUpdateWithWhereUniqueWithoutCertificateServiceInput[] - updateMany?: CertificateProcessStepUpdateManyWithWhereWithoutCertificateServiceInput | CertificateProcessStepUpdateManyWithWhereWithoutCertificateServiceInput[] - deleteMany?: CertificateProcessStepScalarWhereInput | CertificateProcessStepScalarWhereInput[] - } - - export type CertificateEligibilityUncheckedUpdateManyWithoutCertificateServiceNestedInput = { - create?: XOR | CertificateEligibilityCreateWithoutCertificateServiceInput[] | CertificateEligibilityUncheckedCreateWithoutCertificateServiceInput[] - connectOrCreate?: CertificateEligibilityCreateOrConnectWithoutCertificateServiceInput | CertificateEligibilityCreateOrConnectWithoutCertificateServiceInput[] - upsert?: CertificateEligibilityUpsertWithWhereUniqueWithoutCertificateServiceInput | CertificateEligibilityUpsertWithWhereUniqueWithoutCertificateServiceInput[] - createMany?: CertificateEligibilityCreateManyCertificateServiceInputEnvelope - set?: CertificateEligibilityWhereUniqueInput | CertificateEligibilityWhereUniqueInput[] - disconnect?: CertificateEligibilityWhereUniqueInput | CertificateEligibilityWhereUniqueInput[] - delete?: CertificateEligibilityWhereUniqueInput | CertificateEligibilityWhereUniqueInput[] - connect?: CertificateEligibilityWhereUniqueInput | CertificateEligibilityWhereUniqueInput[] - update?: CertificateEligibilityUpdateWithWhereUniqueWithoutCertificateServiceInput | CertificateEligibilityUpdateWithWhereUniqueWithoutCertificateServiceInput[] - updateMany?: CertificateEligibilityUpdateManyWithWhereWithoutCertificateServiceInput | CertificateEligibilityUpdateManyWithWhereWithoutCertificateServiceInput[] - deleteMany?: CertificateEligibilityScalarWhereInput | CertificateEligibilityScalarWhereInput[] - } - - export type CertificateServiceCreateNestedOneWithoutContactsInput = { - create?: XOR - connectOrCreate?: CertificateServiceCreateOrConnectWithoutContactsInput - connect?: CertificateServiceWhereUniqueInput - } - - export type CertificateServiceUpdateOneRequiredWithoutContactsNestedInput = { - create?: XOR - connectOrCreate?: CertificateServiceCreateOrConnectWithoutContactsInput - upsert?: CertificateServiceUpsertWithoutContactsInput - connect?: CertificateServiceWhereUniqueInput - update?: XOR, CertificateServiceUncheckedUpdateWithoutContactsInput> - } - - export type CertificateServiceCreateNestedOneWithoutDocumentsInput = { - create?: XOR - connectOrCreate?: CertificateServiceCreateOrConnectWithoutDocumentsInput - connect?: CertificateServiceWhereUniqueInput - } - - export type CertificateServiceUpdateOneRequiredWithoutDocumentsNestedInput = { - create?: XOR - connectOrCreate?: CertificateServiceCreateOrConnectWithoutDocumentsInput - upsert?: CertificateServiceUpsertWithoutDocumentsInput - connect?: CertificateServiceWhereUniqueInput - update?: XOR, CertificateServiceUncheckedUpdateWithoutDocumentsInput> - } - - export type CertificateServiceCreateNestedOneWithoutProcessStepsInput = { - create?: XOR - connectOrCreate?: CertificateServiceCreateOrConnectWithoutProcessStepsInput - connect?: CertificateServiceWhereUniqueInput - } - - export type CertificateServiceUpdateOneRequiredWithoutProcessStepsNestedInput = { - create?: XOR - connectOrCreate?: CertificateServiceCreateOrConnectWithoutProcessStepsInput - upsert?: CertificateServiceUpsertWithoutProcessStepsInput - connect?: CertificateServiceWhereUniqueInput - update?: XOR, CertificateServiceUncheckedUpdateWithoutProcessStepsInput> - } - - export type CertificateServiceCreateNestedOneWithoutEligibilityItemsInput = { - create?: XOR - connectOrCreate?: CertificateServiceCreateOrConnectWithoutEligibilityItemsInput - connect?: CertificateServiceWhereUniqueInput - } - - export type CertificateServiceUpdateOneRequiredWithoutEligibilityItemsNestedInput = { - create?: XOR - connectOrCreate?: CertificateServiceCreateOrConnectWithoutEligibilityItemsInput - upsert?: CertificateServiceUpsertWithoutEligibilityItemsInput - connect?: CertificateServiceWhereUniqueInput - update?: XOR, CertificateServiceUncheckedUpdateWithoutEligibilityItemsInput> - } - - export type ContactServiceCreatetargetAudienceInput = { - set: string[] - } - - export type ContactServiceCreateeligibilityDetailsInput = { - set: string[] - } - - export type ContactServiceCreatecontactDetailsInput = { - set: string[] - } - - export type ContactServiceCreateprocessDetailsInput = { - set: string[] - } - - export type AdminCreateNestedOneWithoutContactServicesInput = { - create?: XOR - connectOrCreate?: AdminCreateOrConnectWithoutContactServicesInput - connect?: AdminWhereUniqueInput - } - - export type ContactServiceContactCreateNestedManyWithoutContactServiceInput = { - create?: XOR | ContactServiceContactCreateWithoutContactServiceInput[] | ContactServiceContactUncheckedCreateWithoutContactServiceInput[] - connectOrCreate?: ContactServiceContactCreateOrConnectWithoutContactServiceInput | ContactServiceContactCreateOrConnectWithoutContactServiceInput[] - createMany?: ContactServiceContactCreateManyContactServiceInputEnvelope - connect?: ContactServiceContactWhereUniqueInput | ContactServiceContactWhereUniqueInput[] - } - - export type ContactServiceDocumentCreateNestedManyWithoutContactServiceInput = { - create?: XOR | ContactServiceDocumentCreateWithoutContactServiceInput[] | ContactServiceDocumentUncheckedCreateWithoutContactServiceInput[] - connectOrCreate?: ContactServiceDocumentCreateOrConnectWithoutContactServiceInput | ContactServiceDocumentCreateOrConnectWithoutContactServiceInput[] - createMany?: ContactServiceDocumentCreateManyContactServiceInputEnvelope - connect?: ContactServiceDocumentWhereUniqueInput | ContactServiceDocumentWhereUniqueInput[] - } - - export type ContactServiceContactUncheckedCreateNestedManyWithoutContactServiceInput = { - create?: XOR | ContactServiceContactCreateWithoutContactServiceInput[] | ContactServiceContactUncheckedCreateWithoutContactServiceInput[] - connectOrCreate?: ContactServiceContactCreateOrConnectWithoutContactServiceInput | ContactServiceContactCreateOrConnectWithoutContactServiceInput[] - createMany?: ContactServiceContactCreateManyContactServiceInputEnvelope - connect?: ContactServiceContactWhereUniqueInput | ContactServiceContactWhereUniqueInput[] - } - - export type ContactServiceDocumentUncheckedCreateNestedManyWithoutContactServiceInput = { - create?: XOR | ContactServiceDocumentCreateWithoutContactServiceInput[] | ContactServiceDocumentUncheckedCreateWithoutContactServiceInput[] - connectOrCreate?: ContactServiceDocumentCreateOrConnectWithoutContactServiceInput | ContactServiceDocumentCreateOrConnectWithoutContactServiceInput[] - createMany?: ContactServiceDocumentCreateManyContactServiceInputEnvelope - connect?: ContactServiceDocumentWhereUniqueInput | ContactServiceDocumentWhereUniqueInput[] - } - - export type ContactServiceUpdatetargetAudienceInput = { - set?: string[] - push?: string | string[] - } - - export type ContactServiceUpdateeligibilityDetailsInput = { - set?: string[] - push?: string | string[] - } - - export type ContactServiceUpdatecontactDetailsInput = { - set?: string[] - push?: string | string[] - } - - export type ContactServiceUpdateprocessDetailsInput = { - set?: string[] - push?: string | string[] - } - - export type AdminUpdateOneRequiredWithoutContactServicesNestedInput = { - create?: XOR - connectOrCreate?: AdminCreateOrConnectWithoutContactServicesInput - upsert?: AdminUpsertWithoutContactServicesInput - connect?: AdminWhereUniqueInput - update?: XOR, AdminUncheckedUpdateWithoutContactServicesInput> - } - - export type ContactServiceContactUpdateManyWithoutContactServiceNestedInput = { - create?: XOR | ContactServiceContactCreateWithoutContactServiceInput[] | ContactServiceContactUncheckedCreateWithoutContactServiceInput[] - connectOrCreate?: ContactServiceContactCreateOrConnectWithoutContactServiceInput | ContactServiceContactCreateOrConnectWithoutContactServiceInput[] - upsert?: ContactServiceContactUpsertWithWhereUniqueWithoutContactServiceInput | ContactServiceContactUpsertWithWhereUniqueWithoutContactServiceInput[] - createMany?: ContactServiceContactCreateManyContactServiceInputEnvelope - set?: ContactServiceContactWhereUniqueInput | ContactServiceContactWhereUniqueInput[] - disconnect?: ContactServiceContactWhereUniqueInput | ContactServiceContactWhereUniqueInput[] - delete?: ContactServiceContactWhereUniqueInput | ContactServiceContactWhereUniqueInput[] - connect?: ContactServiceContactWhereUniqueInput | ContactServiceContactWhereUniqueInput[] - update?: ContactServiceContactUpdateWithWhereUniqueWithoutContactServiceInput | ContactServiceContactUpdateWithWhereUniqueWithoutContactServiceInput[] - updateMany?: ContactServiceContactUpdateManyWithWhereWithoutContactServiceInput | ContactServiceContactUpdateManyWithWhereWithoutContactServiceInput[] - deleteMany?: ContactServiceContactScalarWhereInput | ContactServiceContactScalarWhereInput[] - } - - export type ContactServiceDocumentUpdateManyWithoutContactServiceNestedInput = { - create?: XOR | ContactServiceDocumentCreateWithoutContactServiceInput[] | ContactServiceDocumentUncheckedCreateWithoutContactServiceInput[] - connectOrCreate?: ContactServiceDocumentCreateOrConnectWithoutContactServiceInput | ContactServiceDocumentCreateOrConnectWithoutContactServiceInput[] - upsert?: ContactServiceDocumentUpsertWithWhereUniqueWithoutContactServiceInput | ContactServiceDocumentUpsertWithWhereUniqueWithoutContactServiceInput[] - createMany?: ContactServiceDocumentCreateManyContactServiceInputEnvelope - set?: ContactServiceDocumentWhereUniqueInput | ContactServiceDocumentWhereUniqueInput[] - disconnect?: ContactServiceDocumentWhereUniqueInput | ContactServiceDocumentWhereUniqueInput[] - delete?: ContactServiceDocumentWhereUniqueInput | ContactServiceDocumentWhereUniqueInput[] - connect?: ContactServiceDocumentWhereUniqueInput | ContactServiceDocumentWhereUniqueInput[] - update?: ContactServiceDocumentUpdateWithWhereUniqueWithoutContactServiceInput | ContactServiceDocumentUpdateWithWhereUniqueWithoutContactServiceInput[] - updateMany?: ContactServiceDocumentUpdateManyWithWhereWithoutContactServiceInput | ContactServiceDocumentUpdateManyWithWhereWithoutContactServiceInput[] - deleteMany?: ContactServiceDocumentScalarWhereInput | ContactServiceDocumentScalarWhereInput[] - } - - export type ContactServiceContactUncheckedUpdateManyWithoutContactServiceNestedInput = { - create?: XOR | ContactServiceContactCreateWithoutContactServiceInput[] | ContactServiceContactUncheckedCreateWithoutContactServiceInput[] - connectOrCreate?: ContactServiceContactCreateOrConnectWithoutContactServiceInput | ContactServiceContactCreateOrConnectWithoutContactServiceInput[] - upsert?: ContactServiceContactUpsertWithWhereUniqueWithoutContactServiceInput | ContactServiceContactUpsertWithWhereUniqueWithoutContactServiceInput[] - createMany?: ContactServiceContactCreateManyContactServiceInputEnvelope - set?: ContactServiceContactWhereUniqueInput | ContactServiceContactWhereUniqueInput[] - disconnect?: ContactServiceContactWhereUniqueInput | ContactServiceContactWhereUniqueInput[] - delete?: ContactServiceContactWhereUniqueInput | ContactServiceContactWhereUniqueInput[] - connect?: ContactServiceContactWhereUniqueInput | ContactServiceContactWhereUniqueInput[] - update?: ContactServiceContactUpdateWithWhereUniqueWithoutContactServiceInput | ContactServiceContactUpdateWithWhereUniqueWithoutContactServiceInput[] - updateMany?: ContactServiceContactUpdateManyWithWhereWithoutContactServiceInput | ContactServiceContactUpdateManyWithWhereWithoutContactServiceInput[] - deleteMany?: ContactServiceContactScalarWhereInput | ContactServiceContactScalarWhereInput[] - } - - export type ContactServiceDocumentUncheckedUpdateManyWithoutContactServiceNestedInput = { - create?: XOR | ContactServiceDocumentCreateWithoutContactServiceInput[] | ContactServiceDocumentUncheckedCreateWithoutContactServiceInput[] - connectOrCreate?: ContactServiceDocumentCreateOrConnectWithoutContactServiceInput | ContactServiceDocumentCreateOrConnectWithoutContactServiceInput[] - upsert?: ContactServiceDocumentUpsertWithWhereUniqueWithoutContactServiceInput | ContactServiceDocumentUpsertWithWhereUniqueWithoutContactServiceInput[] - createMany?: ContactServiceDocumentCreateManyContactServiceInputEnvelope - set?: ContactServiceDocumentWhereUniqueInput | ContactServiceDocumentWhereUniqueInput[] - disconnect?: ContactServiceDocumentWhereUniqueInput | ContactServiceDocumentWhereUniqueInput[] - delete?: ContactServiceDocumentWhereUniqueInput | ContactServiceDocumentWhereUniqueInput[] - connect?: ContactServiceDocumentWhereUniqueInput | ContactServiceDocumentWhereUniqueInput[] - update?: ContactServiceDocumentUpdateWithWhereUniqueWithoutContactServiceInput | ContactServiceDocumentUpdateWithWhereUniqueWithoutContactServiceInput[] - updateMany?: ContactServiceDocumentUpdateManyWithWhereWithoutContactServiceInput | ContactServiceDocumentUpdateManyWithWhereWithoutContactServiceInput[] - deleteMany?: ContactServiceDocumentScalarWhereInput | ContactServiceDocumentScalarWhereInput[] - } - - export type ContactServiceCreateNestedOneWithoutContactsInput = { - create?: XOR - connectOrCreate?: ContactServiceCreateOrConnectWithoutContactsInput - connect?: ContactServiceWhereUniqueInput - } - - export type PostCreateNestedManyWithoutOfficeInput = { - create?: XOR | PostCreateWithoutOfficeInput[] | PostUncheckedCreateWithoutOfficeInput[] - connectOrCreate?: PostCreateOrConnectWithoutOfficeInput | PostCreateOrConnectWithoutOfficeInput[] - createMany?: PostCreateManyOfficeInputEnvelope - connect?: PostWhereUniqueInput | PostWhereUniqueInput[] - } - - export type PostUncheckedCreateNestedManyWithoutOfficeInput = { - create?: XOR | PostCreateWithoutOfficeInput[] | PostUncheckedCreateWithoutOfficeInput[] - connectOrCreate?: PostCreateOrConnectWithoutOfficeInput | PostCreateOrConnectWithoutOfficeInput[] - createMany?: PostCreateManyOfficeInputEnvelope - connect?: PostWhereUniqueInput | PostWhereUniqueInput[] - } - - export type ContactServiceUpdateOneRequiredWithoutContactsNestedInput = { - create?: XOR - connectOrCreate?: ContactServiceCreateOrConnectWithoutContactsInput - upsert?: ContactServiceUpsertWithoutContactsInput - connect?: ContactServiceWhereUniqueInput - update?: XOR, ContactServiceUncheckedUpdateWithoutContactsInput> - } - - export type PostUpdateManyWithoutOfficeNestedInput = { - create?: XOR | PostCreateWithoutOfficeInput[] | PostUncheckedCreateWithoutOfficeInput[] - connectOrCreate?: PostCreateOrConnectWithoutOfficeInput | PostCreateOrConnectWithoutOfficeInput[] - upsert?: PostUpsertWithWhereUniqueWithoutOfficeInput | PostUpsertWithWhereUniqueWithoutOfficeInput[] - createMany?: PostCreateManyOfficeInputEnvelope - set?: PostWhereUniqueInput | PostWhereUniqueInput[] - disconnect?: PostWhereUniqueInput | PostWhereUniqueInput[] - delete?: PostWhereUniqueInput | PostWhereUniqueInput[] - connect?: PostWhereUniqueInput | PostWhereUniqueInput[] - update?: PostUpdateWithWhereUniqueWithoutOfficeInput | PostUpdateWithWhereUniqueWithoutOfficeInput[] - updateMany?: PostUpdateManyWithWhereWithoutOfficeInput | PostUpdateManyWithWhereWithoutOfficeInput[] - deleteMany?: PostScalarWhereInput | PostScalarWhereInput[] - } - - export type PostUncheckedUpdateManyWithoutOfficeNestedInput = { - create?: XOR | PostCreateWithoutOfficeInput[] | PostUncheckedCreateWithoutOfficeInput[] - connectOrCreate?: PostCreateOrConnectWithoutOfficeInput | PostCreateOrConnectWithoutOfficeInput[] - upsert?: PostUpsertWithWhereUniqueWithoutOfficeInput | PostUpsertWithWhereUniqueWithoutOfficeInput[] - createMany?: PostCreateManyOfficeInputEnvelope - set?: PostWhereUniqueInput | PostWhereUniqueInput[] - disconnect?: PostWhereUniqueInput | PostWhereUniqueInput[] - delete?: PostWhereUniqueInput | PostWhereUniqueInput[] - connect?: PostWhereUniqueInput | PostWhereUniqueInput[] - update?: PostUpdateWithWhereUniqueWithoutOfficeInput | PostUpdateWithWhereUniqueWithoutOfficeInput[] - updateMany?: PostUpdateManyWithWhereWithoutOfficeInput | PostUpdateManyWithWhereWithoutOfficeInput[] - deleteMany?: PostScalarWhereInput | PostScalarWhereInput[] - } - - export type ContactServiceCreateNestedOneWithoutDocumentsInput = { - create?: XOR - connectOrCreate?: ContactServiceCreateOrConnectWithoutDocumentsInput - connect?: ContactServiceWhereUniqueInput - } - - export type ContactServiceUpdateOneRequiredWithoutDocumentsNestedInput = { - create?: XOR - connectOrCreate?: ContactServiceCreateOrConnectWithoutDocumentsInput - upsert?: ContactServiceUpsertWithoutDocumentsInput - connect?: ContactServiceWhereUniqueInput - update?: XOR, ContactServiceUncheckedUpdateWithoutDocumentsInput> - } - - export type ContactServiceContactCreateNestedOneWithoutPostsInput = { - create?: XOR - connectOrCreate?: ContactServiceContactCreateOrConnectWithoutPostsInput - connect?: ContactServiceContactWhereUniqueInput - } - - export type EmployeeCreateNestedManyWithoutPostInput = { - create?: XOR | EmployeeCreateWithoutPostInput[] | EmployeeUncheckedCreateWithoutPostInput[] - connectOrCreate?: EmployeeCreateOrConnectWithoutPostInput | EmployeeCreateOrConnectWithoutPostInput[] - createMany?: EmployeeCreateManyPostInputEnvelope - connect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[] - } - - export type EmployeeUncheckedCreateNestedManyWithoutPostInput = { - create?: XOR | EmployeeCreateWithoutPostInput[] | EmployeeUncheckedCreateWithoutPostInput[] - connectOrCreate?: EmployeeCreateOrConnectWithoutPostInput | EmployeeCreateOrConnectWithoutPostInput[] - createMany?: EmployeeCreateManyPostInputEnvelope - connect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[] - } - - export type ContactServiceContactUpdateOneRequiredWithoutPostsNestedInput = { - create?: XOR - connectOrCreate?: ContactServiceContactCreateOrConnectWithoutPostsInput - upsert?: ContactServiceContactUpsertWithoutPostsInput - connect?: ContactServiceContactWhereUniqueInput - update?: XOR, ContactServiceContactUncheckedUpdateWithoutPostsInput> - } - - export type EmployeeUpdateManyWithoutPostNestedInput = { - create?: XOR | EmployeeCreateWithoutPostInput[] | EmployeeUncheckedCreateWithoutPostInput[] - connectOrCreate?: EmployeeCreateOrConnectWithoutPostInput | EmployeeCreateOrConnectWithoutPostInput[] - upsert?: EmployeeUpsertWithWhereUniqueWithoutPostInput | EmployeeUpsertWithWhereUniqueWithoutPostInput[] - createMany?: EmployeeCreateManyPostInputEnvelope - set?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[] - disconnect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[] - delete?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[] - connect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[] - update?: EmployeeUpdateWithWhereUniqueWithoutPostInput | EmployeeUpdateWithWhereUniqueWithoutPostInput[] - updateMany?: EmployeeUpdateManyWithWhereWithoutPostInput | EmployeeUpdateManyWithWhereWithoutPostInput[] - deleteMany?: EmployeeScalarWhereInput | EmployeeScalarWhereInput[] - } - - export type EmployeeUncheckedUpdateManyWithoutPostNestedInput = { - create?: XOR | EmployeeCreateWithoutPostInput[] | EmployeeUncheckedCreateWithoutPostInput[] - connectOrCreate?: EmployeeCreateOrConnectWithoutPostInput | EmployeeCreateOrConnectWithoutPostInput[] - upsert?: EmployeeUpsertWithWhereUniqueWithoutPostInput | EmployeeUpsertWithWhereUniqueWithoutPostInput[] - createMany?: EmployeeCreateManyPostInputEnvelope - set?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[] - disconnect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[] - delete?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[] - connect?: EmployeeWhereUniqueInput | EmployeeWhereUniqueInput[] - update?: EmployeeUpdateWithWhereUniqueWithoutPostInput | EmployeeUpdateWithWhereUniqueWithoutPostInput[] - updateMany?: EmployeeUpdateManyWithWhereWithoutPostInput | EmployeeUpdateManyWithWhereWithoutPostInput[] - deleteMany?: EmployeeScalarWhereInput | EmployeeScalarWhereInput[] - } - - export type PostCreateNestedOneWithoutEmployeesInput = { - create?: XOR - connectOrCreate?: PostCreateOrConnectWithoutEmployeesInput - connect?: PostWhereUniqueInput - } - - export type NullableDateTimeFieldUpdateOperationsInput = { - set?: Date | string | null - } - - export type NullableFloatFieldUpdateOperationsInput = { - set?: number | null - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type PostUpdateOneRequiredWithoutEmployeesNestedInput = { - create?: XOR - connectOrCreate?: PostCreateOrConnectWithoutEmployeesInput - upsert?: PostUpsertWithoutEmployeesInput - connect?: PostWhereUniqueInput - update?: XOR, PostUncheckedUpdateWithoutEmployeesInput> - } - - export type NullableIntFieldUpdateOperationsInput = { - set?: number | null - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type GrievanceCreateattachmentsInput = { - set: string[] - } - - export type GrievanceUpdateattachmentsInput = { - set?: string[] - push?: string | string[] - } - - export type NestedIntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - - export type NestedStringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringFilter<$PrismaModel> | string - } - - export type NestedDateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeFilter<$PrismaModel> | Date | string - } - - export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] | ListIntFieldRefInput<$PrismaModel> - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedIntFilter<$PrismaModel> - _min?: NestedIntFilter<$PrismaModel> - _max?: NestedIntFilter<$PrismaModel> - } - - export type NestedFloatFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] | ListFloatFieldRefInput<$PrismaModel> - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatFilter<$PrismaModel> | number - } - - export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] | ListStringFieldRefInput<$PrismaModel> - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedStringFilter<$PrismaModel> - _max?: NestedStringFilter<$PrismaModel> - } - - export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> - } - - export type NestedStringNullableFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringNullableFilter<$PrismaModel> | string | null - } - - export type NestedBoolFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolFilter<$PrismaModel> | boolean - } - - export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedStringNullableFilter<$PrismaModel> - _max?: NestedStringNullableFilter<$PrismaModel> - } - - export type NestedIntNullableFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | ListIntFieldRefInput<$PrismaModel> | null - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableFilter<$PrismaModel> | number | null - } - - export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedBoolFilter<$PrismaModel> - _max?: NestedBoolFilter<$PrismaModel> - } - - export type NestedDateTimeNullableFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null - } - - export type NestedFloatNullableFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableFilter<$PrismaModel> | number | null - } - - export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedDateTimeNullableFilter<$PrismaModel> - _max?: NestedDateTimeNullableFilter<$PrismaModel> - } - - export type NestedFloatNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: NestedIntNullableFilter<$PrismaModel> - _avg?: NestedFloatNullableFilter<$PrismaModel> - _sum?: NestedFloatNullableFilter<$PrismaModel> - _min?: NestedFloatNullableFilter<$PrismaModel> - _max?: NestedFloatNullableFilter<$PrismaModel> - } - - export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | ListIntFieldRefInput<$PrismaModel> | null - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: NestedIntNullableFilter<$PrismaModel> - _avg?: NestedFloatNullableFilter<$PrismaModel> - _sum?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedIntNullableFilter<$PrismaModel> - _max?: NestedIntNullableFilter<$PrismaModel> - } - - export type SchemeServiceCreateWithoutAdminInput = { - name: string - summary: string - type?: string | null - targetAudience?: SchemeServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: SchemeServiceCreateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceCreateschemeDetailsInput | string[] - processDetails?: SchemeServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: ContactPersonCreateNestedManyWithoutSchemeServiceInput - documents?: SupportiveDocumentCreateNestedManyWithoutSchemeServiceInput - } - - export type SchemeServiceUncheckedCreateWithoutAdminInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: SchemeServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: SchemeServiceCreateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceCreateschemeDetailsInput | string[] - processDetails?: SchemeServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: ContactPersonUncheckedCreateNestedManyWithoutSchemeServiceInput - documents?: SupportiveDocumentUncheckedCreateNestedManyWithoutSchemeServiceInput - } - - export type SchemeServiceCreateOrConnectWithoutAdminInput = { - where: SchemeServiceWhereUniqueInput - create: XOR - } - - export type SchemeServiceCreateManyAdminInputEnvelope = { - data: SchemeServiceCreateManyAdminInput | SchemeServiceCreateManyAdminInput[] - skipDuplicates?: boolean - } - - export type CertificateServiceCreateWithoutAdminInput = { - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: CertificateContactCreateNestedManyWithoutCertificateServiceInput - documents?: CertificateDocumentCreateNestedManyWithoutCertificateServiceInput - processSteps?: CertificateProcessStepCreateNestedManyWithoutCertificateServiceInput - eligibilityItems?: CertificateEligibilityCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceUncheckedCreateWithoutAdminInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: CertificateContactUncheckedCreateNestedManyWithoutCertificateServiceInput - documents?: CertificateDocumentUncheckedCreateNestedManyWithoutCertificateServiceInput - processSteps?: CertificateProcessStepUncheckedCreateNestedManyWithoutCertificateServiceInput - eligibilityItems?: CertificateEligibilityUncheckedCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceCreateOrConnectWithoutAdminInput = { - where: CertificateServiceWhereUniqueInput - create: XOR - } - - export type CertificateServiceCreateManyAdminInputEnvelope = { - data: CertificateServiceCreateManyAdminInput | CertificateServiceCreateManyAdminInput[] - skipDuplicates?: boolean - } - - export type ContactServiceCreateWithoutAdminInput = { - name: string - summary: string - type?: string | null - targetAudience?: ContactServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: ContactServiceCreateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceCreatecontactDetailsInput | string[] - processDetails?: ContactServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: ContactServiceContactCreateNestedManyWithoutContactServiceInput - documents?: ContactServiceDocumentCreateNestedManyWithoutContactServiceInput - } - - export type ContactServiceUncheckedCreateWithoutAdminInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: ContactServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: ContactServiceCreateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceCreatecontactDetailsInput | string[] - processDetails?: ContactServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: ContactServiceContactUncheckedCreateNestedManyWithoutContactServiceInput - documents?: ContactServiceDocumentUncheckedCreateNestedManyWithoutContactServiceInput - } - - export type ContactServiceCreateOrConnectWithoutAdminInput = { - where: ContactServiceWhereUniqueInput - create: XOR - } - - export type ContactServiceCreateManyAdminInputEnvelope = { - data: ContactServiceCreateManyAdminInput | ContactServiceCreateManyAdminInput[] - skipDuplicates?: boolean - } - - export type SchemeServiceUpsertWithWhereUniqueWithoutAdminInput = { - where: SchemeServiceWhereUniqueInput - update: XOR - create: XOR - } - - export type SchemeServiceUpdateWithWhereUniqueWithoutAdminInput = { - where: SchemeServiceWhereUniqueInput - data: XOR - } - - export type SchemeServiceUpdateManyWithWhereWithoutAdminInput = { - where: SchemeServiceScalarWhereInput - data: XOR - } - - export type SchemeServiceScalarWhereInput = { - AND?: SchemeServiceScalarWhereInput | SchemeServiceScalarWhereInput[] - OR?: SchemeServiceScalarWhereInput[] - NOT?: SchemeServiceScalarWhereInput | SchemeServiceScalarWhereInput[] - id?: IntFilter<"SchemeService"> | number - name?: StringFilter<"SchemeService"> | string - summary?: StringFilter<"SchemeService"> | string - type?: StringNullableFilter<"SchemeService"> | string | null - targetAudience?: StringNullableListFilter<"SchemeService"> - applicationMode?: StringFilter<"SchemeService"> | string - onlineUrl?: StringNullableFilter<"SchemeService"> | string | null - offlineAddress?: StringNullableFilter<"SchemeService"> | string | null - status?: StringFilter<"SchemeService"> | string - isActive?: BoolFilter<"SchemeService"> | boolean - createdAt?: DateTimeFilter<"SchemeService"> | Date | string - updatedAt?: DateTimeFilter<"SchemeService"> | Date | string - adminId?: IntFilter<"SchemeService"> | number - eligibilityDetails?: StringNullableListFilter<"SchemeService"> - schemeDetails?: StringNullableListFilter<"SchemeService"> - processDetails?: StringNullableListFilter<"SchemeService"> - processNew?: StringNullableFilter<"SchemeService"> | string | null - processUpdate?: StringNullableFilter<"SchemeService"> | string | null - processLost?: StringNullableFilter<"SchemeService"> | string | null - processSurrender?: StringNullableFilter<"SchemeService"> | string | null - docNew?: StringNullableFilter<"SchemeService"> | string | null - docUpdate?: StringNullableFilter<"SchemeService"> | string | null - docLost?: StringNullableFilter<"SchemeService"> | string | null - docSurrender?: StringNullableFilter<"SchemeService"> | string | null - } - - export type CertificateServiceUpsertWithWhereUniqueWithoutAdminInput = { - where: CertificateServiceWhereUniqueInput - update: XOR - create: XOR - } - - export type CertificateServiceUpdateWithWhereUniqueWithoutAdminInput = { - where: CertificateServiceWhereUniqueInput - data: XOR - } - - export type CertificateServiceUpdateManyWithWhereWithoutAdminInput = { - where: CertificateServiceScalarWhereInput - data: XOR - } - - export type CertificateServiceScalarWhereInput = { - AND?: CertificateServiceScalarWhereInput | CertificateServiceScalarWhereInput[] - OR?: CertificateServiceScalarWhereInput[] - NOT?: CertificateServiceScalarWhereInput | CertificateServiceScalarWhereInput[] - id?: IntFilter<"CertificateService"> | number - name?: StringFilter<"CertificateService"> | string - summary?: StringFilter<"CertificateService"> | string - type?: StringNullableFilter<"CertificateService"> | string | null - targetAudience?: StringNullableListFilter<"CertificateService"> - applicationMode?: StringFilter<"CertificateService"> | string - onlineUrl?: StringNullableFilter<"CertificateService"> | string | null - offlineAddress?: StringNullableFilter<"CertificateService"> | string | null - status?: StringFilter<"CertificateService"> | string - isActive?: BoolFilter<"CertificateService"> | boolean - createdAt?: DateTimeFilter<"CertificateService"> | Date | string - updatedAt?: DateTimeFilter<"CertificateService"> | Date | string - adminId?: IntFilter<"CertificateService"> | number - eligibilityDetails?: StringNullableListFilter<"CertificateService"> - certificateDetails?: StringNullableListFilter<"CertificateService"> - processDetails?: StringNullableListFilter<"CertificateService"> - processNew?: StringNullableFilter<"CertificateService"> | string | null - processUpdate?: StringNullableFilter<"CertificateService"> | string | null - processLost?: StringNullableFilter<"CertificateService"> | string | null - processSurrender?: StringNullableFilter<"CertificateService"> | string | null - docNew?: StringNullableFilter<"CertificateService"> | string | null - docUpdate?: StringNullableFilter<"CertificateService"> | string | null - docLost?: StringNullableFilter<"CertificateService"> | string | null - docSurrender?: StringNullableFilter<"CertificateService"> | string | null - } - - export type ContactServiceUpsertWithWhereUniqueWithoutAdminInput = { - where: ContactServiceWhereUniqueInput - update: XOR - create: XOR - } - - export type ContactServiceUpdateWithWhereUniqueWithoutAdminInput = { - where: ContactServiceWhereUniqueInput - data: XOR - } - - export type ContactServiceUpdateManyWithWhereWithoutAdminInput = { - where: ContactServiceScalarWhereInput - data: XOR - } - - export type ContactServiceScalarWhereInput = { - AND?: ContactServiceScalarWhereInput | ContactServiceScalarWhereInput[] - OR?: ContactServiceScalarWhereInput[] - NOT?: ContactServiceScalarWhereInput | ContactServiceScalarWhereInput[] - id?: IntFilter<"ContactService"> | number - name?: StringFilter<"ContactService"> | string - summary?: StringFilter<"ContactService"> | string - type?: StringNullableFilter<"ContactService"> | string | null - targetAudience?: StringNullableListFilter<"ContactService"> - applicationMode?: StringFilter<"ContactService"> | string - onlineUrl?: StringNullableFilter<"ContactService"> | string | null - offlineAddress?: StringNullableFilter<"ContactService"> | string | null - status?: StringFilter<"ContactService"> | string - isActive?: BoolFilter<"ContactService"> | boolean - createdAt?: DateTimeFilter<"ContactService"> | Date | string - updatedAt?: DateTimeFilter<"ContactService"> | Date | string - adminId?: IntFilter<"ContactService"> | number - eligibilityDetails?: StringNullableListFilter<"ContactService"> - contactDetails?: StringNullableListFilter<"ContactService"> - processDetails?: StringNullableListFilter<"ContactService"> - processNew?: StringNullableFilter<"ContactService"> | string | null - processUpdate?: StringNullableFilter<"ContactService"> | string | null - processLost?: StringNullableFilter<"ContactService"> | string | null - processSurrender?: StringNullableFilter<"ContactService"> | string | null - docNew?: StringNullableFilter<"ContactService"> | string | null - docUpdate?: StringNullableFilter<"ContactService"> | string | null - docLost?: StringNullableFilter<"ContactService"> | string | null - docSurrender?: StringNullableFilter<"ContactService"> | string | null - } - - export type AdminCreateWithoutSchemeServicesInput = { - email: string - password: string - name: string - role?: string - createdAt?: Date | string - updatedAt?: Date | string - certificateServices?: CertificateServiceCreateNestedManyWithoutAdminInput - contactServices?: ContactServiceCreateNestedManyWithoutAdminInput - } - - export type AdminUncheckedCreateWithoutSchemeServicesInput = { - id?: number - email: string - password: string - name: string - role?: string - createdAt?: Date | string - updatedAt?: Date | string - certificateServices?: CertificateServiceUncheckedCreateNestedManyWithoutAdminInput - contactServices?: ContactServiceUncheckedCreateNestedManyWithoutAdminInput - } - - export type AdminCreateOrConnectWithoutSchemeServicesInput = { - where: AdminWhereUniqueInput - create: XOR - } - - export type ContactPersonCreateWithoutSchemeServiceInput = { - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - } - - export type ContactPersonUncheckedCreateWithoutSchemeServiceInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - } - - export type ContactPersonCreateOrConnectWithoutSchemeServiceInput = { - where: ContactPersonWhereUniqueInput - create: XOR - } - - export type ContactPersonCreateManySchemeServiceInputEnvelope = { - data: ContactPersonCreateManySchemeServiceInput | ContactPersonCreateManySchemeServiceInput[] - skipDuplicates?: boolean - } - - export type SupportiveDocumentCreateWithoutSchemeServiceInput = { - slNo: number - documentType: string - validProof: string - isRequired?: boolean - } - - export type SupportiveDocumentUncheckedCreateWithoutSchemeServiceInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - } - - export type SupportiveDocumentCreateOrConnectWithoutSchemeServiceInput = { - where: SupportiveDocumentWhereUniqueInput - create: XOR - } - - export type SupportiveDocumentCreateManySchemeServiceInputEnvelope = { - data: SupportiveDocumentCreateManySchemeServiceInput | SupportiveDocumentCreateManySchemeServiceInput[] - skipDuplicates?: boolean - } - - export type AdminUpsertWithoutSchemeServicesInput = { - update: XOR - create: XOR - where?: AdminWhereInput - } - - export type AdminUpdateToOneWithWhereWithoutSchemeServicesInput = { - where?: AdminWhereInput - data: XOR - } - - export type AdminUpdateWithoutSchemeServicesInput = { - email?: StringFieldUpdateOperationsInput | string - password?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - role?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - certificateServices?: CertificateServiceUpdateManyWithoutAdminNestedInput - contactServices?: ContactServiceUpdateManyWithoutAdminNestedInput - } - - export type AdminUncheckedUpdateWithoutSchemeServicesInput = { - id?: IntFieldUpdateOperationsInput | number - email?: StringFieldUpdateOperationsInput | string - password?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - role?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - certificateServices?: CertificateServiceUncheckedUpdateManyWithoutAdminNestedInput - contactServices?: ContactServiceUncheckedUpdateManyWithoutAdminNestedInput - } - - export type ContactPersonUpsertWithWhereUniqueWithoutSchemeServiceInput = { - where: ContactPersonWhereUniqueInput - update: XOR - create: XOR - } - - export type ContactPersonUpdateWithWhereUniqueWithoutSchemeServiceInput = { - where: ContactPersonWhereUniqueInput - data: XOR - } - - export type ContactPersonUpdateManyWithWhereWithoutSchemeServiceInput = { - where: ContactPersonScalarWhereInput - data: XOR - } - - export type ContactPersonScalarWhereInput = { - AND?: ContactPersonScalarWhereInput | ContactPersonScalarWhereInput[] - OR?: ContactPersonScalarWhereInput[] - NOT?: ContactPersonScalarWhereInput | ContactPersonScalarWhereInput[] - id?: IntFilter<"ContactPerson"> | number - serviceName?: StringFilter<"ContactPerson"> | string - district?: StringFilter<"ContactPerson"> | string - subDistrict?: StringFilter<"ContactPerson"> | string - block?: StringFilter<"ContactPerson"> | string - name?: StringFilter<"ContactPerson"> | string - designation?: StringFilter<"ContactPerson"> | string - contact?: StringFilter<"ContactPerson"> | string - email?: StringFilter<"ContactPerson"> | string - schemeServiceId?: IntFilter<"ContactPerson"> | number - } - - export type SupportiveDocumentUpsertWithWhereUniqueWithoutSchemeServiceInput = { - where: SupportiveDocumentWhereUniqueInput - update: XOR - create: XOR - } - - export type SupportiveDocumentUpdateWithWhereUniqueWithoutSchemeServiceInput = { - where: SupportiveDocumentWhereUniqueInput - data: XOR - } - - export type SupportiveDocumentUpdateManyWithWhereWithoutSchemeServiceInput = { - where: SupportiveDocumentScalarWhereInput - data: XOR - } - - export type SupportiveDocumentScalarWhereInput = { - AND?: SupportiveDocumentScalarWhereInput | SupportiveDocumentScalarWhereInput[] - OR?: SupportiveDocumentScalarWhereInput[] - NOT?: SupportiveDocumentScalarWhereInput | SupportiveDocumentScalarWhereInput[] - id?: IntFilter<"SupportiveDocument"> | number - slNo?: IntFilter<"SupportiveDocument"> | number - documentType?: StringFilter<"SupportiveDocument"> | string - validProof?: StringFilter<"SupportiveDocument"> | string - isRequired?: BoolFilter<"SupportiveDocument"> | boolean - schemeServiceId?: IntFilter<"SupportiveDocument"> | number - } - - export type SchemeServiceCreateWithoutContactsInput = { - name: string - summary: string - type?: string | null - targetAudience?: SchemeServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: SchemeServiceCreateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceCreateschemeDetailsInput | string[] - processDetails?: SchemeServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutSchemeServicesInput - documents?: SupportiveDocumentCreateNestedManyWithoutSchemeServiceInput - } - - export type SchemeServiceUncheckedCreateWithoutContactsInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: SchemeServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: SchemeServiceCreateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceCreateschemeDetailsInput | string[] - processDetails?: SchemeServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - documents?: SupportiveDocumentUncheckedCreateNestedManyWithoutSchemeServiceInput - } - - export type SchemeServiceCreateOrConnectWithoutContactsInput = { - where: SchemeServiceWhereUniqueInput - create: XOR - } - - export type SchemeServiceUpsertWithoutContactsInput = { - update: XOR - create: XOR - where?: SchemeServiceWhereInput - } - - export type SchemeServiceUpdateToOneWithWhereWithoutContactsInput = { - where?: SchemeServiceWhereInput - data: XOR - } - - export type SchemeServiceUpdateWithoutContactsInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutSchemeServicesNestedInput - documents?: SupportiveDocumentUpdateManyWithoutSchemeServiceNestedInput - } - - export type SchemeServiceUncheckedUpdateWithoutContactsInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - documents?: SupportiveDocumentUncheckedUpdateManyWithoutSchemeServiceNestedInput - } - - export type SchemeServiceCreateWithoutDocumentsInput = { - name: string - summary: string - type?: string | null - targetAudience?: SchemeServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: SchemeServiceCreateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceCreateschemeDetailsInput | string[] - processDetails?: SchemeServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutSchemeServicesInput - contacts?: ContactPersonCreateNestedManyWithoutSchemeServiceInput - } - - export type SchemeServiceUncheckedCreateWithoutDocumentsInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: SchemeServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: SchemeServiceCreateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceCreateschemeDetailsInput | string[] - processDetails?: SchemeServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: ContactPersonUncheckedCreateNestedManyWithoutSchemeServiceInput - } - - export type SchemeServiceCreateOrConnectWithoutDocumentsInput = { - where: SchemeServiceWhereUniqueInput - create: XOR - } - - export type SchemeServiceUpsertWithoutDocumentsInput = { - update: XOR - create: XOR - where?: SchemeServiceWhereInput - } - - export type SchemeServiceUpdateToOneWithWhereWithoutDocumentsInput = { - where?: SchemeServiceWhereInput - data: XOR - } - - export type SchemeServiceUpdateWithoutDocumentsInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutSchemeServicesNestedInput - contacts?: ContactPersonUpdateManyWithoutSchemeServiceNestedInput - } - - export type SchemeServiceUncheckedUpdateWithoutDocumentsInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: ContactPersonUncheckedUpdateManyWithoutSchemeServiceNestedInput - } - - export type AdminCreateWithoutCertificateServicesInput = { - email: string - password: string - name: string - role?: string - createdAt?: Date | string - updatedAt?: Date | string - schemeServices?: SchemeServiceCreateNestedManyWithoutAdminInput - contactServices?: ContactServiceCreateNestedManyWithoutAdminInput - } - - export type AdminUncheckedCreateWithoutCertificateServicesInput = { - id?: number - email: string - password: string - name: string - role?: string - createdAt?: Date | string - updatedAt?: Date | string - schemeServices?: SchemeServiceUncheckedCreateNestedManyWithoutAdminInput - contactServices?: ContactServiceUncheckedCreateNestedManyWithoutAdminInput - } - - export type AdminCreateOrConnectWithoutCertificateServicesInput = { - where: AdminWhereUniqueInput - create: XOR - } - - export type CertificateContactCreateWithoutCertificateServiceInput = { - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - applicationType?: string - } - - export type CertificateContactUncheckedCreateWithoutCertificateServiceInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - applicationType?: string - } - - export type CertificateContactCreateOrConnectWithoutCertificateServiceInput = { - where: CertificateContactWhereUniqueInput - create: XOR - } - - export type CertificateContactCreateManyCertificateServiceInputEnvelope = { - data: CertificateContactCreateManyCertificateServiceInput | CertificateContactCreateManyCertificateServiceInput[] - skipDuplicates?: boolean - } - - export type CertificateDocumentCreateWithoutCertificateServiceInput = { - slNo: number - documentType: string - validProof: string - isRequired?: boolean - applicationType?: string - } - - export type CertificateDocumentUncheckedCreateWithoutCertificateServiceInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - applicationType?: string - } - - export type CertificateDocumentCreateOrConnectWithoutCertificateServiceInput = { - where: CertificateDocumentWhereUniqueInput - create: XOR - } - - export type CertificateDocumentCreateManyCertificateServiceInputEnvelope = { - data: CertificateDocumentCreateManyCertificateServiceInput | CertificateDocumentCreateManyCertificateServiceInput[] - skipDuplicates?: boolean - } - - export type CertificateProcessStepCreateWithoutCertificateServiceInput = { - slNo: number - stepDetails: string - applicationType?: string - } - - export type CertificateProcessStepUncheckedCreateWithoutCertificateServiceInput = { - id?: number - slNo: number - stepDetails: string - applicationType?: string - } - - export type CertificateProcessStepCreateOrConnectWithoutCertificateServiceInput = { - where: CertificateProcessStepWhereUniqueInput - create: XOR - } - - export type CertificateProcessStepCreateManyCertificateServiceInputEnvelope = { - data: CertificateProcessStepCreateManyCertificateServiceInput | CertificateProcessStepCreateManyCertificateServiceInput[] - skipDuplicates?: boolean - } - - export type CertificateEligibilityCreateWithoutCertificateServiceInput = { - eligibilityDetail: string - applicationType?: string - } - - export type CertificateEligibilityUncheckedCreateWithoutCertificateServiceInput = { - id?: number - eligibilityDetail: string - applicationType?: string - } - - export type CertificateEligibilityCreateOrConnectWithoutCertificateServiceInput = { - where: CertificateEligibilityWhereUniqueInput - create: XOR - } - - export type CertificateEligibilityCreateManyCertificateServiceInputEnvelope = { - data: CertificateEligibilityCreateManyCertificateServiceInput | CertificateEligibilityCreateManyCertificateServiceInput[] - skipDuplicates?: boolean - } - - export type AdminUpsertWithoutCertificateServicesInput = { - update: XOR - create: XOR - where?: AdminWhereInput - } - - export type AdminUpdateToOneWithWhereWithoutCertificateServicesInput = { - where?: AdminWhereInput - data: XOR - } - - export type AdminUpdateWithoutCertificateServicesInput = { - email?: StringFieldUpdateOperationsInput | string - password?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - role?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - schemeServices?: SchemeServiceUpdateManyWithoutAdminNestedInput - contactServices?: ContactServiceUpdateManyWithoutAdminNestedInput - } - - export type AdminUncheckedUpdateWithoutCertificateServicesInput = { - id?: IntFieldUpdateOperationsInput | number - email?: StringFieldUpdateOperationsInput | string - password?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - role?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - schemeServices?: SchemeServiceUncheckedUpdateManyWithoutAdminNestedInput - contactServices?: ContactServiceUncheckedUpdateManyWithoutAdminNestedInput - } - - export type CertificateContactUpsertWithWhereUniqueWithoutCertificateServiceInput = { - where: CertificateContactWhereUniqueInput - update: XOR - create: XOR - } - - export type CertificateContactUpdateWithWhereUniqueWithoutCertificateServiceInput = { - where: CertificateContactWhereUniqueInput - data: XOR - } - - export type CertificateContactUpdateManyWithWhereWithoutCertificateServiceInput = { - where: CertificateContactScalarWhereInput - data: XOR - } - - export type CertificateContactScalarWhereInput = { - AND?: CertificateContactScalarWhereInput | CertificateContactScalarWhereInput[] - OR?: CertificateContactScalarWhereInput[] - NOT?: CertificateContactScalarWhereInput | CertificateContactScalarWhereInput[] - id?: IntFilter<"CertificateContact"> | number - serviceName?: StringFilter<"CertificateContact"> | string - district?: StringFilter<"CertificateContact"> | string - subDistrict?: StringFilter<"CertificateContact"> | string - block?: StringFilter<"CertificateContact"> | string - name?: StringFilter<"CertificateContact"> | string - designation?: StringFilter<"CertificateContact"> | string - contact?: StringFilter<"CertificateContact"> | string - email?: StringFilter<"CertificateContact"> | string - applicationType?: StringFilter<"CertificateContact"> | string - certificateServiceId?: IntFilter<"CertificateContact"> | number - } - - export type CertificateDocumentUpsertWithWhereUniqueWithoutCertificateServiceInput = { - where: CertificateDocumentWhereUniqueInput - update: XOR - create: XOR - } - - export type CertificateDocumentUpdateWithWhereUniqueWithoutCertificateServiceInput = { - where: CertificateDocumentWhereUniqueInput - data: XOR - } - - export type CertificateDocumentUpdateManyWithWhereWithoutCertificateServiceInput = { - where: CertificateDocumentScalarWhereInput - data: XOR - } - - export type CertificateDocumentScalarWhereInput = { - AND?: CertificateDocumentScalarWhereInput | CertificateDocumentScalarWhereInput[] - OR?: CertificateDocumentScalarWhereInput[] - NOT?: CertificateDocumentScalarWhereInput | CertificateDocumentScalarWhereInput[] - id?: IntFilter<"CertificateDocument"> | number - slNo?: IntFilter<"CertificateDocument"> | number - documentType?: StringFilter<"CertificateDocument"> | string - validProof?: StringFilter<"CertificateDocument"> | string - isRequired?: BoolFilter<"CertificateDocument"> | boolean - applicationType?: StringFilter<"CertificateDocument"> | string - certificateServiceId?: IntFilter<"CertificateDocument"> | number - } - - export type CertificateProcessStepUpsertWithWhereUniqueWithoutCertificateServiceInput = { - where: CertificateProcessStepWhereUniqueInput - update: XOR - create: XOR - } - - export type CertificateProcessStepUpdateWithWhereUniqueWithoutCertificateServiceInput = { - where: CertificateProcessStepWhereUniqueInput - data: XOR - } - - export type CertificateProcessStepUpdateManyWithWhereWithoutCertificateServiceInput = { - where: CertificateProcessStepScalarWhereInput - data: XOR - } - - export type CertificateProcessStepScalarWhereInput = { - AND?: CertificateProcessStepScalarWhereInput | CertificateProcessStepScalarWhereInput[] - OR?: CertificateProcessStepScalarWhereInput[] - NOT?: CertificateProcessStepScalarWhereInput | CertificateProcessStepScalarWhereInput[] - id?: IntFilter<"CertificateProcessStep"> | number - slNo?: IntFilter<"CertificateProcessStep"> | number - stepDetails?: StringFilter<"CertificateProcessStep"> | string - applicationType?: StringFilter<"CertificateProcessStep"> | string - certificateServiceId?: IntFilter<"CertificateProcessStep"> | number - } - - export type CertificateEligibilityUpsertWithWhereUniqueWithoutCertificateServiceInput = { - where: CertificateEligibilityWhereUniqueInput - update: XOR - create: XOR - } - - export type CertificateEligibilityUpdateWithWhereUniqueWithoutCertificateServiceInput = { - where: CertificateEligibilityWhereUniqueInput - data: XOR - } - - export type CertificateEligibilityUpdateManyWithWhereWithoutCertificateServiceInput = { - where: CertificateEligibilityScalarWhereInput - data: XOR - } - - export type CertificateEligibilityScalarWhereInput = { - AND?: CertificateEligibilityScalarWhereInput | CertificateEligibilityScalarWhereInput[] - OR?: CertificateEligibilityScalarWhereInput[] - NOT?: CertificateEligibilityScalarWhereInput | CertificateEligibilityScalarWhereInput[] - id?: IntFilter<"CertificateEligibility"> | number - eligibilityDetail?: StringFilter<"CertificateEligibility"> | string - applicationType?: StringFilter<"CertificateEligibility"> | string - certificateServiceId?: IntFilter<"CertificateEligibility"> | number - } - - export type CertificateServiceCreateWithoutContactsInput = { - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutCertificateServicesInput - documents?: CertificateDocumentCreateNestedManyWithoutCertificateServiceInput - processSteps?: CertificateProcessStepCreateNestedManyWithoutCertificateServiceInput - eligibilityItems?: CertificateEligibilityCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceUncheckedCreateWithoutContactsInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - documents?: CertificateDocumentUncheckedCreateNestedManyWithoutCertificateServiceInput - processSteps?: CertificateProcessStepUncheckedCreateNestedManyWithoutCertificateServiceInput - eligibilityItems?: CertificateEligibilityUncheckedCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceCreateOrConnectWithoutContactsInput = { - where: CertificateServiceWhereUniqueInput - create: XOR - } - - export type CertificateServiceUpsertWithoutContactsInput = { - update: XOR - create: XOR - where?: CertificateServiceWhereInput - } - - export type CertificateServiceUpdateToOneWithWhereWithoutContactsInput = { - where?: CertificateServiceWhereInput - data: XOR - } - - export type CertificateServiceUpdateWithoutContactsInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutCertificateServicesNestedInput - documents?: CertificateDocumentUpdateManyWithoutCertificateServiceNestedInput - processSteps?: CertificateProcessStepUpdateManyWithoutCertificateServiceNestedInput - eligibilityItems?: CertificateEligibilityUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceUncheckedUpdateWithoutContactsInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - documents?: CertificateDocumentUncheckedUpdateManyWithoutCertificateServiceNestedInput - processSteps?: CertificateProcessStepUncheckedUpdateManyWithoutCertificateServiceNestedInput - eligibilityItems?: CertificateEligibilityUncheckedUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceCreateWithoutDocumentsInput = { - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutCertificateServicesInput - contacts?: CertificateContactCreateNestedManyWithoutCertificateServiceInput - processSteps?: CertificateProcessStepCreateNestedManyWithoutCertificateServiceInput - eligibilityItems?: CertificateEligibilityCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceUncheckedCreateWithoutDocumentsInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: CertificateContactUncheckedCreateNestedManyWithoutCertificateServiceInput - processSteps?: CertificateProcessStepUncheckedCreateNestedManyWithoutCertificateServiceInput - eligibilityItems?: CertificateEligibilityUncheckedCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceCreateOrConnectWithoutDocumentsInput = { - where: CertificateServiceWhereUniqueInput - create: XOR - } - - export type CertificateServiceUpsertWithoutDocumentsInput = { - update: XOR - create: XOR - where?: CertificateServiceWhereInput - } - - export type CertificateServiceUpdateToOneWithWhereWithoutDocumentsInput = { - where?: CertificateServiceWhereInput - data: XOR - } - - export type CertificateServiceUpdateWithoutDocumentsInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutCertificateServicesNestedInput - contacts?: CertificateContactUpdateManyWithoutCertificateServiceNestedInput - processSteps?: CertificateProcessStepUpdateManyWithoutCertificateServiceNestedInput - eligibilityItems?: CertificateEligibilityUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceUncheckedUpdateWithoutDocumentsInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: CertificateContactUncheckedUpdateManyWithoutCertificateServiceNestedInput - processSteps?: CertificateProcessStepUncheckedUpdateManyWithoutCertificateServiceNestedInput - eligibilityItems?: CertificateEligibilityUncheckedUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceCreateWithoutProcessStepsInput = { - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutCertificateServicesInput - contacts?: CertificateContactCreateNestedManyWithoutCertificateServiceInput - documents?: CertificateDocumentCreateNestedManyWithoutCertificateServiceInput - eligibilityItems?: CertificateEligibilityCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceUncheckedCreateWithoutProcessStepsInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: CertificateContactUncheckedCreateNestedManyWithoutCertificateServiceInput - documents?: CertificateDocumentUncheckedCreateNestedManyWithoutCertificateServiceInput - eligibilityItems?: CertificateEligibilityUncheckedCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceCreateOrConnectWithoutProcessStepsInput = { - where: CertificateServiceWhereUniqueInput - create: XOR - } - - export type CertificateServiceUpsertWithoutProcessStepsInput = { - update: XOR - create: XOR - where?: CertificateServiceWhereInput - } - - export type CertificateServiceUpdateToOneWithWhereWithoutProcessStepsInput = { - where?: CertificateServiceWhereInput - data: XOR - } - - export type CertificateServiceUpdateWithoutProcessStepsInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutCertificateServicesNestedInput - contacts?: CertificateContactUpdateManyWithoutCertificateServiceNestedInput - documents?: CertificateDocumentUpdateManyWithoutCertificateServiceNestedInput - eligibilityItems?: CertificateEligibilityUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceUncheckedUpdateWithoutProcessStepsInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: CertificateContactUncheckedUpdateManyWithoutCertificateServiceNestedInput - documents?: CertificateDocumentUncheckedUpdateManyWithoutCertificateServiceNestedInput - eligibilityItems?: CertificateEligibilityUncheckedUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceCreateWithoutEligibilityItemsInput = { - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutCertificateServicesInput - contacts?: CertificateContactCreateNestedManyWithoutCertificateServiceInput - documents?: CertificateDocumentCreateNestedManyWithoutCertificateServiceInput - processSteps?: CertificateProcessStepCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceUncheckedCreateWithoutEligibilityItemsInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: CertificateContactUncheckedCreateNestedManyWithoutCertificateServiceInput - documents?: CertificateDocumentUncheckedCreateNestedManyWithoutCertificateServiceInput - processSteps?: CertificateProcessStepUncheckedCreateNestedManyWithoutCertificateServiceInput - } - - export type CertificateServiceCreateOrConnectWithoutEligibilityItemsInput = { - where: CertificateServiceWhereUniqueInput - create: XOR - } - - export type CertificateServiceUpsertWithoutEligibilityItemsInput = { - update: XOR - create: XOR - where?: CertificateServiceWhereInput - } - - export type CertificateServiceUpdateToOneWithWhereWithoutEligibilityItemsInput = { - where?: CertificateServiceWhereInput - data: XOR - } - - export type CertificateServiceUpdateWithoutEligibilityItemsInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutCertificateServicesNestedInput - contacts?: CertificateContactUpdateManyWithoutCertificateServiceNestedInput - documents?: CertificateDocumentUpdateManyWithoutCertificateServiceNestedInput - processSteps?: CertificateProcessStepUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceUncheckedUpdateWithoutEligibilityItemsInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: CertificateContactUncheckedUpdateManyWithoutCertificateServiceNestedInput - documents?: CertificateDocumentUncheckedUpdateManyWithoutCertificateServiceNestedInput - processSteps?: CertificateProcessStepUncheckedUpdateManyWithoutCertificateServiceNestedInput - } - - export type AdminCreateWithoutContactServicesInput = { - email: string - password: string - name: string - role?: string - createdAt?: Date | string - updatedAt?: Date | string - schemeServices?: SchemeServiceCreateNestedManyWithoutAdminInput - certificateServices?: CertificateServiceCreateNestedManyWithoutAdminInput - } - - export type AdminUncheckedCreateWithoutContactServicesInput = { - id?: number - email: string - password: string - name: string - role?: string - createdAt?: Date | string - updatedAt?: Date | string - schemeServices?: SchemeServiceUncheckedCreateNestedManyWithoutAdminInput - certificateServices?: CertificateServiceUncheckedCreateNestedManyWithoutAdminInput - } - - export type AdminCreateOrConnectWithoutContactServicesInput = { - where: AdminWhereUniqueInput - create: XOR - } - - export type ContactServiceContactCreateWithoutContactServiceInput = { - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - posts?: PostCreateNestedManyWithoutOfficeInput - } - - export type ContactServiceContactUncheckedCreateWithoutContactServiceInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - posts?: PostUncheckedCreateNestedManyWithoutOfficeInput - } - - export type ContactServiceContactCreateOrConnectWithoutContactServiceInput = { - where: ContactServiceContactWhereUniqueInput - create: XOR - } - - export type ContactServiceContactCreateManyContactServiceInputEnvelope = { - data: ContactServiceContactCreateManyContactServiceInput | ContactServiceContactCreateManyContactServiceInput[] - skipDuplicates?: boolean - } - - export type ContactServiceDocumentCreateWithoutContactServiceInput = { - slNo: number - documentType: string - validProof: string - isRequired?: boolean - } - - export type ContactServiceDocumentUncheckedCreateWithoutContactServiceInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - } - - export type ContactServiceDocumentCreateOrConnectWithoutContactServiceInput = { - where: ContactServiceDocumentWhereUniqueInput - create: XOR - } - - export type ContactServiceDocumentCreateManyContactServiceInputEnvelope = { - data: ContactServiceDocumentCreateManyContactServiceInput | ContactServiceDocumentCreateManyContactServiceInput[] - skipDuplicates?: boolean - } - - export type AdminUpsertWithoutContactServicesInput = { - update: XOR - create: XOR - where?: AdminWhereInput - } - - export type AdminUpdateToOneWithWhereWithoutContactServicesInput = { - where?: AdminWhereInput - data: XOR - } - - export type AdminUpdateWithoutContactServicesInput = { - email?: StringFieldUpdateOperationsInput | string - password?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - role?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - schemeServices?: SchemeServiceUpdateManyWithoutAdminNestedInput - certificateServices?: CertificateServiceUpdateManyWithoutAdminNestedInput - } - - export type AdminUncheckedUpdateWithoutContactServicesInput = { - id?: IntFieldUpdateOperationsInput | number - email?: StringFieldUpdateOperationsInput | string - password?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - role?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - schemeServices?: SchemeServiceUncheckedUpdateManyWithoutAdminNestedInput - certificateServices?: CertificateServiceUncheckedUpdateManyWithoutAdminNestedInput - } - - export type ContactServiceContactUpsertWithWhereUniqueWithoutContactServiceInput = { - where: ContactServiceContactWhereUniqueInput - update: XOR - create: XOR - } - - export type ContactServiceContactUpdateWithWhereUniqueWithoutContactServiceInput = { - where: ContactServiceContactWhereUniqueInput - data: XOR - } - - export type ContactServiceContactUpdateManyWithWhereWithoutContactServiceInput = { - where: ContactServiceContactScalarWhereInput - data: XOR - } - - export type ContactServiceContactScalarWhereInput = { - AND?: ContactServiceContactScalarWhereInput | ContactServiceContactScalarWhereInput[] - OR?: ContactServiceContactScalarWhereInput[] - NOT?: ContactServiceContactScalarWhereInput | ContactServiceContactScalarWhereInput[] - id?: IntFilter<"ContactServiceContact"> | number - serviceName?: StringFilter<"ContactServiceContact"> | string - district?: StringFilter<"ContactServiceContact"> | string - subDistrict?: StringFilter<"ContactServiceContact"> | string - block?: StringFilter<"ContactServiceContact"> | string - name?: StringFilter<"ContactServiceContact"> | string - designation?: StringFilter<"ContactServiceContact"> | string - contact?: StringFilter<"ContactServiceContact"> | string - email?: StringFilter<"ContactServiceContact"> | string - contactServiceId?: IntFilter<"ContactServiceContact"> | number - } - - export type ContactServiceDocumentUpsertWithWhereUniqueWithoutContactServiceInput = { - where: ContactServiceDocumentWhereUniqueInput - update: XOR - create: XOR - } - - export type ContactServiceDocumentUpdateWithWhereUniqueWithoutContactServiceInput = { - where: ContactServiceDocumentWhereUniqueInput - data: XOR - } - - export type ContactServiceDocumentUpdateManyWithWhereWithoutContactServiceInput = { - where: ContactServiceDocumentScalarWhereInput - data: XOR - } - - export type ContactServiceDocumentScalarWhereInput = { - AND?: ContactServiceDocumentScalarWhereInput | ContactServiceDocumentScalarWhereInput[] - OR?: ContactServiceDocumentScalarWhereInput[] - NOT?: ContactServiceDocumentScalarWhereInput | ContactServiceDocumentScalarWhereInput[] - id?: IntFilter<"ContactServiceDocument"> | number - slNo?: IntFilter<"ContactServiceDocument"> | number - documentType?: StringFilter<"ContactServiceDocument"> | string - validProof?: StringFilter<"ContactServiceDocument"> | string - isRequired?: BoolFilter<"ContactServiceDocument"> | boolean - contactServiceId?: IntFilter<"ContactServiceDocument"> | number - } - - export type ContactServiceCreateWithoutContactsInput = { - name: string - summary: string - type?: string | null - targetAudience?: ContactServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: ContactServiceCreateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceCreatecontactDetailsInput | string[] - processDetails?: ContactServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutContactServicesInput - documents?: ContactServiceDocumentCreateNestedManyWithoutContactServiceInput - } - - export type ContactServiceUncheckedCreateWithoutContactsInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: ContactServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: ContactServiceCreateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceCreatecontactDetailsInput | string[] - processDetails?: ContactServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - documents?: ContactServiceDocumentUncheckedCreateNestedManyWithoutContactServiceInput - } - - export type ContactServiceCreateOrConnectWithoutContactsInput = { - where: ContactServiceWhereUniqueInput - create: XOR - } - - export type PostCreateWithoutOfficeInput = { - postName: string - rank: string - description?: string | null - department?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - employees?: EmployeeCreateNestedManyWithoutPostInput - } - - export type PostUncheckedCreateWithoutOfficeInput = { - id?: number - postName: string - rank: string - description?: string | null - department?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - employees?: EmployeeUncheckedCreateNestedManyWithoutPostInput - } - - export type PostCreateOrConnectWithoutOfficeInput = { - where: PostWhereUniqueInput - create: XOR - } - - export type PostCreateManyOfficeInputEnvelope = { - data: PostCreateManyOfficeInput | PostCreateManyOfficeInput[] - skipDuplicates?: boolean - } - - export type ContactServiceUpsertWithoutContactsInput = { - update: XOR - create: XOR - where?: ContactServiceWhereInput - } - - export type ContactServiceUpdateToOneWithWhereWithoutContactsInput = { - where?: ContactServiceWhereInput - data: XOR - } - - export type ContactServiceUpdateWithoutContactsInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutContactServicesNestedInput - documents?: ContactServiceDocumentUpdateManyWithoutContactServiceNestedInput - } - - export type ContactServiceUncheckedUpdateWithoutContactsInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - documents?: ContactServiceDocumentUncheckedUpdateManyWithoutContactServiceNestedInput - } - - export type PostUpsertWithWhereUniqueWithoutOfficeInput = { - where: PostWhereUniqueInput - update: XOR - create: XOR - } - - export type PostUpdateWithWhereUniqueWithoutOfficeInput = { - where: PostWhereUniqueInput - data: XOR - } - - export type PostUpdateManyWithWhereWithoutOfficeInput = { - where: PostScalarWhereInput - data: XOR - } - - export type PostScalarWhereInput = { - AND?: PostScalarWhereInput | PostScalarWhereInput[] - OR?: PostScalarWhereInput[] - NOT?: PostScalarWhereInput | PostScalarWhereInput[] - id?: IntFilter<"Post"> | number - postName?: StringFilter<"Post"> | string - rank?: StringFilter<"Post"> | string - description?: StringNullableFilter<"Post"> | string | null - department?: StringNullableFilter<"Post"> | string | null - status?: StringFilter<"Post"> | string - createdAt?: DateTimeFilter<"Post"> | Date | string - updatedAt?: DateTimeFilter<"Post"> | Date | string - officeId?: IntFilter<"Post"> | number - } - - export type ContactServiceCreateWithoutDocumentsInput = { - name: string - summary: string - type?: string | null - targetAudience?: ContactServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: ContactServiceCreateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceCreatecontactDetailsInput | string[] - processDetails?: ContactServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - admin: AdminCreateNestedOneWithoutContactServicesInput - contacts?: ContactServiceContactCreateNestedManyWithoutContactServiceInput - } - - export type ContactServiceUncheckedCreateWithoutDocumentsInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: ContactServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - adminId: number - eligibilityDetails?: ContactServiceCreateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceCreatecontactDetailsInput | string[] - processDetails?: ContactServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - contacts?: ContactServiceContactUncheckedCreateNestedManyWithoutContactServiceInput - } - - export type ContactServiceCreateOrConnectWithoutDocumentsInput = { - where: ContactServiceWhereUniqueInput - create: XOR - } - - export type ContactServiceUpsertWithoutDocumentsInput = { - update: XOR - create: XOR - where?: ContactServiceWhereInput - } - - export type ContactServiceUpdateToOneWithWhereWithoutDocumentsInput = { - where?: ContactServiceWhereInput - data: XOR - } - - export type ContactServiceUpdateWithoutDocumentsInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - admin?: AdminUpdateOneRequiredWithoutContactServicesNestedInput - contacts?: ContactServiceContactUpdateManyWithoutContactServiceNestedInput - } - - export type ContactServiceUncheckedUpdateWithoutDocumentsInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - adminId?: IntFieldUpdateOperationsInput | number - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: ContactServiceContactUncheckedUpdateManyWithoutContactServiceNestedInput - } - - export type ContactServiceContactCreateWithoutPostsInput = { - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - contactService: ContactServiceCreateNestedOneWithoutContactsInput - } - - export type ContactServiceContactUncheckedCreateWithoutPostsInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - contactServiceId: number - } - - export type ContactServiceContactCreateOrConnectWithoutPostsInput = { - where: ContactServiceContactWhereUniqueInput - create: XOR - } - - export type EmployeeCreateWithoutPostInput = { - name: string - email: string - phone: string - designation: string - employeeId?: string | null - joiningDate?: Date | string | null - salary?: number | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type EmployeeUncheckedCreateWithoutPostInput = { - id?: number - name: string - email: string - phone: string - designation: string - employeeId?: string | null - joiningDate?: Date | string | null - salary?: number | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type EmployeeCreateOrConnectWithoutPostInput = { - where: EmployeeWhereUniqueInput - create: XOR - } - - export type EmployeeCreateManyPostInputEnvelope = { - data: EmployeeCreateManyPostInput | EmployeeCreateManyPostInput[] - skipDuplicates?: boolean - } - - export type ContactServiceContactUpsertWithoutPostsInput = { - update: XOR - create: XOR - where?: ContactServiceContactWhereInput - } - - export type ContactServiceContactUpdateToOneWithWhereWithoutPostsInput = { - where?: ContactServiceContactWhereInput - data: XOR - } - - export type ContactServiceContactUpdateWithoutPostsInput = { - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - contactService?: ContactServiceUpdateOneRequiredWithoutContactsNestedInput - } - - export type ContactServiceContactUncheckedUpdateWithoutPostsInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - contactServiceId?: IntFieldUpdateOperationsInput | number - } - - export type EmployeeUpsertWithWhereUniqueWithoutPostInput = { - where: EmployeeWhereUniqueInput - update: XOR - create: XOR - } - - export type EmployeeUpdateWithWhereUniqueWithoutPostInput = { - where: EmployeeWhereUniqueInput - data: XOR - } - - export type EmployeeUpdateManyWithWhereWithoutPostInput = { - where: EmployeeScalarWhereInput - data: XOR - } - - export type EmployeeScalarWhereInput = { - AND?: EmployeeScalarWhereInput | EmployeeScalarWhereInput[] - OR?: EmployeeScalarWhereInput[] - NOT?: EmployeeScalarWhereInput | EmployeeScalarWhereInput[] - id?: IntFilter<"Employee"> | number - name?: StringFilter<"Employee"> | string - email?: StringFilter<"Employee"> | string - phone?: StringFilter<"Employee"> | string - designation?: StringFilter<"Employee"> | string - employeeId?: StringNullableFilter<"Employee"> | string | null - joiningDate?: DateTimeNullableFilter<"Employee"> | Date | string | null - salary?: FloatNullableFilter<"Employee"> | number | null - status?: StringFilter<"Employee"> | string - createdAt?: DateTimeFilter<"Employee"> | Date | string - updatedAt?: DateTimeFilter<"Employee"> | Date | string - postId?: IntFilter<"Employee"> | number - } - - export type PostCreateWithoutEmployeesInput = { - postName: string - rank: string - description?: string | null - department?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - office: ContactServiceContactCreateNestedOneWithoutPostsInput - } - - export type PostUncheckedCreateWithoutEmployeesInput = { - id?: number - postName: string - rank: string - description?: string | null - department?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - officeId: number - } - - export type PostCreateOrConnectWithoutEmployeesInput = { - where: PostWhereUniqueInput - create: XOR - } - - export type PostUpsertWithoutEmployeesInput = { - update: XOR - create: XOR - where?: PostWhereInput - } - - export type PostUpdateToOneWithWhereWithoutEmployeesInput = { - where?: PostWhereInput - data: XOR - } - - export type PostUpdateWithoutEmployeesInput = { - postName?: StringFieldUpdateOperationsInput | string - rank?: StringFieldUpdateOperationsInput | string - description?: NullableStringFieldUpdateOperationsInput | string | null - department?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - office?: ContactServiceContactUpdateOneRequiredWithoutPostsNestedInput - } - - export type PostUncheckedUpdateWithoutEmployeesInput = { - id?: IntFieldUpdateOperationsInput | number - postName?: StringFieldUpdateOperationsInput | string - rank?: StringFieldUpdateOperationsInput | string - description?: NullableStringFieldUpdateOperationsInput | string | null - department?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - officeId?: IntFieldUpdateOperationsInput | number - } - - export type SchemeServiceCreateManyAdminInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: SchemeServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: SchemeServiceCreateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceCreateschemeDetailsInput | string[] - processDetails?: SchemeServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - } - - export type CertificateServiceCreateManyAdminInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: CertificateServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: CertificateServiceCreateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceCreatecertificateDetailsInput | string[] - processDetails?: CertificateServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - } - - export type ContactServiceCreateManyAdminInput = { - id?: number - name: string - summary: string - type?: string | null - targetAudience?: ContactServiceCreatetargetAudienceInput | string[] - applicationMode: string - onlineUrl?: string | null - offlineAddress?: string | null - status?: string - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - eligibilityDetails?: ContactServiceCreateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceCreatecontactDetailsInput | string[] - processDetails?: ContactServiceCreateprocessDetailsInput | string[] - processNew?: string | null - processUpdate?: string | null - processLost?: string | null - processSurrender?: string | null - docNew?: string | null - docUpdate?: string | null - docLost?: string | null - docSurrender?: string | null - } - - export type SchemeServiceUpdateWithoutAdminInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: ContactPersonUpdateManyWithoutSchemeServiceNestedInput - documents?: SupportiveDocumentUpdateManyWithoutSchemeServiceNestedInput - } - - export type SchemeServiceUncheckedUpdateWithoutAdminInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: ContactPersonUncheckedUpdateManyWithoutSchemeServiceNestedInput - documents?: SupportiveDocumentUncheckedUpdateManyWithoutSchemeServiceNestedInput - } - - export type SchemeServiceUncheckedUpdateManyWithoutAdminInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: SchemeServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: SchemeServiceUpdateeligibilityDetailsInput | string[] - schemeDetails?: SchemeServiceUpdateschemeDetailsInput | string[] - processDetails?: SchemeServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type CertificateServiceUpdateWithoutAdminInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: CertificateContactUpdateManyWithoutCertificateServiceNestedInput - documents?: CertificateDocumentUpdateManyWithoutCertificateServiceNestedInput - processSteps?: CertificateProcessStepUpdateManyWithoutCertificateServiceNestedInput - eligibilityItems?: CertificateEligibilityUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceUncheckedUpdateWithoutAdminInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: CertificateContactUncheckedUpdateManyWithoutCertificateServiceNestedInput - documents?: CertificateDocumentUncheckedUpdateManyWithoutCertificateServiceNestedInput - processSteps?: CertificateProcessStepUncheckedUpdateManyWithoutCertificateServiceNestedInput - eligibilityItems?: CertificateEligibilityUncheckedUpdateManyWithoutCertificateServiceNestedInput - } - - export type CertificateServiceUncheckedUpdateManyWithoutAdminInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: CertificateServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: CertificateServiceUpdateeligibilityDetailsInput | string[] - certificateDetails?: CertificateServiceUpdatecertificateDetailsInput | string[] - processDetails?: CertificateServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type ContactServiceUpdateWithoutAdminInput = { - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: ContactServiceContactUpdateManyWithoutContactServiceNestedInput - documents?: ContactServiceDocumentUpdateManyWithoutContactServiceNestedInput - } - - export type ContactServiceUncheckedUpdateWithoutAdminInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: ContactServiceContactUncheckedUpdateManyWithoutContactServiceNestedInput - documents?: ContactServiceDocumentUncheckedUpdateManyWithoutContactServiceNestedInput - } - - export type ContactServiceUncheckedUpdateManyWithoutAdminInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - summary?: StringFieldUpdateOperationsInput | string - type?: NullableStringFieldUpdateOperationsInput | string | null - targetAudience?: ContactServiceUpdatetargetAudienceInput | string[] - applicationMode?: StringFieldUpdateOperationsInput | string - onlineUrl?: NullableStringFieldUpdateOperationsInput | string | null - offlineAddress?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - isActive?: BoolFieldUpdateOperationsInput | boolean - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - eligibilityDetails?: ContactServiceUpdateeligibilityDetailsInput | string[] - contactDetails?: ContactServiceUpdatecontactDetailsInput | string[] - processDetails?: ContactServiceUpdateprocessDetailsInput | string[] - processNew?: NullableStringFieldUpdateOperationsInput | string | null - processUpdate?: NullableStringFieldUpdateOperationsInput | string | null - processLost?: NullableStringFieldUpdateOperationsInput | string | null - processSurrender?: NullableStringFieldUpdateOperationsInput | string | null - docNew?: NullableStringFieldUpdateOperationsInput | string | null - docUpdate?: NullableStringFieldUpdateOperationsInput | string | null - docLost?: NullableStringFieldUpdateOperationsInput | string | null - docSurrender?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type ContactPersonCreateManySchemeServiceInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - } - - export type SupportiveDocumentCreateManySchemeServiceInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - } - - export type ContactPersonUpdateWithoutSchemeServiceInput = { - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - } - - export type ContactPersonUncheckedUpdateWithoutSchemeServiceInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - } - - export type ContactPersonUncheckedUpdateManyWithoutSchemeServiceInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - } - - export type SupportiveDocumentUpdateWithoutSchemeServiceInput = { - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - } - - export type SupportiveDocumentUncheckedUpdateWithoutSchemeServiceInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - } - - export type SupportiveDocumentUncheckedUpdateManyWithoutSchemeServiceInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - } - - export type CertificateContactCreateManyCertificateServiceInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - applicationType?: string - } - - export type CertificateDocumentCreateManyCertificateServiceInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - applicationType?: string - } - - export type CertificateProcessStepCreateManyCertificateServiceInput = { - id?: number - slNo: number - stepDetails: string - applicationType?: string - } - - export type CertificateEligibilityCreateManyCertificateServiceInput = { - id?: number - eligibilityDetail: string - applicationType?: string - } - - export type CertificateContactUpdateWithoutCertificateServiceInput = { - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateContactUncheckedUpdateWithoutCertificateServiceInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateContactUncheckedUpdateManyWithoutCertificateServiceInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateDocumentUpdateWithoutCertificateServiceInput = { - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateDocumentUncheckedUpdateWithoutCertificateServiceInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateDocumentUncheckedUpdateManyWithoutCertificateServiceInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateProcessStepUpdateWithoutCertificateServiceInput = { - slNo?: IntFieldUpdateOperationsInput | number - stepDetails?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateProcessStepUncheckedUpdateWithoutCertificateServiceInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - stepDetails?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateProcessStepUncheckedUpdateManyWithoutCertificateServiceInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - stepDetails?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateEligibilityUpdateWithoutCertificateServiceInput = { - eligibilityDetail?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateEligibilityUncheckedUpdateWithoutCertificateServiceInput = { - id?: IntFieldUpdateOperationsInput | number - eligibilityDetail?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type CertificateEligibilityUncheckedUpdateManyWithoutCertificateServiceInput = { - id?: IntFieldUpdateOperationsInput | number - eligibilityDetail?: StringFieldUpdateOperationsInput | string - applicationType?: StringFieldUpdateOperationsInput | string - } - - export type ContactServiceContactCreateManyContactServiceInput = { - id?: number - serviceName: string - district: string - subDistrict: string - block: string - name: string - designation: string - contact: string - email: string - } - - export type ContactServiceDocumentCreateManyContactServiceInput = { - id?: number - slNo: number - documentType: string - validProof: string - isRequired?: boolean - } - - export type ContactServiceContactUpdateWithoutContactServiceInput = { - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - posts?: PostUpdateManyWithoutOfficeNestedInput - } - - export type ContactServiceContactUncheckedUpdateWithoutContactServiceInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - posts?: PostUncheckedUpdateManyWithoutOfficeNestedInput - } - - export type ContactServiceContactUncheckedUpdateManyWithoutContactServiceInput = { - id?: IntFieldUpdateOperationsInput | number - serviceName?: StringFieldUpdateOperationsInput | string - district?: StringFieldUpdateOperationsInput | string - subDistrict?: StringFieldUpdateOperationsInput | string - block?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - contact?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - } - - export type ContactServiceDocumentUpdateWithoutContactServiceInput = { - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - } - - export type ContactServiceDocumentUncheckedUpdateWithoutContactServiceInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - } - - export type ContactServiceDocumentUncheckedUpdateManyWithoutContactServiceInput = { - id?: IntFieldUpdateOperationsInput | number - slNo?: IntFieldUpdateOperationsInput | number - documentType?: StringFieldUpdateOperationsInput | string - validProof?: StringFieldUpdateOperationsInput | string - isRequired?: BoolFieldUpdateOperationsInput | boolean - } - - export type PostCreateManyOfficeInput = { - id?: number - postName: string - rank: string - description?: string | null - department?: string | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type PostUpdateWithoutOfficeInput = { - postName?: StringFieldUpdateOperationsInput | string - rank?: StringFieldUpdateOperationsInput | string - description?: NullableStringFieldUpdateOperationsInput | string | null - department?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - employees?: EmployeeUpdateManyWithoutPostNestedInput - } - - export type PostUncheckedUpdateWithoutOfficeInput = { - id?: IntFieldUpdateOperationsInput | number - postName?: StringFieldUpdateOperationsInput | string - rank?: StringFieldUpdateOperationsInput | string - description?: NullableStringFieldUpdateOperationsInput | string | null - department?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - employees?: EmployeeUncheckedUpdateManyWithoutPostNestedInput - } - - export type PostUncheckedUpdateManyWithoutOfficeInput = { - id?: IntFieldUpdateOperationsInput | number - postName?: StringFieldUpdateOperationsInput | string - rank?: StringFieldUpdateOperationsInput | string - description?: NullableStringFieldUpdateOperationsInput | string | null - department?: NullableStringFieldUpdateOperationsInput | string | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type EmployeeCreateManyPostInput = { - id?: number - name: string - email: string - phone: string - designation: string - employeeId?: string | null - joiningDate?: Date | string | null - salary?: number | null - status?: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type EmployeeUpdateWithoutPostInput = { - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - employeeId?: NullableStringFieldUpdateOperationsInput | string | null - joiningDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salary?: NullableFloatFieldUpdateOperationsInput | number | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type EmployeeUncheckedUpdateWithoutPostInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - employeeId?: NullableStringFieldUpdateOperationsInput | string | null - joiningDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salary?: NullableFloatFieldUpdateOperationsInput | number | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type EmployeeUncheckedUpdateManyWithoutPostInput = { - id?: IntFieldUpdateOperationsInput | number - name?: StringFieldUpdateOperationsInput | string - email?: StringFieldUpdateOperationsInput | string - phone?: StringFieldUpdateOperationsInput | string - designation?: StringFieldUpdateOperationsInput | string - employeeId?: NullableStringFieldUpdateOperationsInput | string | null - joiningDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salary?: NullableFloatFieldUpdateOperationsInput | number | null - status?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - - - /** - * Batch Payload for updateMany & deleteMany & createMany - */ - - export type BatchPayload = { - count: number - } - - /** - * DMMF - */ - export const dmmf: runtime.BaseDMMF -} \ No newline at end of file diff --git a/backend/generated/prisma/index.js b/backend/generated/prisma/index.js deleted file mode 100644 index ecc48b6..0000000 --- a/backend/generated/prisma/index.js +++ /dev/null @@ -1,460 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - getPrismaClient, - sqltag, - empty, - join, - raw, - skip, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime, - createParam, -} = require('./runtime/library.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.13.0 - * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd - */ -Prisma.prismaVersion = { - client: "6.13.0", - engine: "361e86d0ea4987e9f53a565309b3eed797a6bcbd" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = Extensions.getExtensionContext -Prisma.defineExtension = Extensions.defineExtension - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - - - const path = require('path') - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.AdminScalarFieldEnum = { - id: 'id', - email: 'email', - password: 'password', - name: 'name', - role: 'role', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SchemeServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - schemeDetails: 'schemeDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.ContactPersonScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - schemeServiceId: 'schemeServiceId' -}; - -exports.Prisma.SupportiveDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - schemeServiceId: 'schemeServiceId' -}; - -exports.Prisma.CertificateServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - certificateDetails: 'certificateDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.CertificateContactScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateProcessStepScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - stepDetails: 'stepDetails', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateEligibilityScalarFieldEnum = { - id: 'id', - eligibilityDetail: 'eligibilityDetail', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.ContactServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - contactDetails: 'contactDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.ContactServiceContactScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - contactServiceId: 'contactServiceId' -}; - -exports.Prisma.ContactServiceDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - contactServiceId: 'contactServiceId' -}; - -exports.Prisma.PostScalarFieldEnum = { - id: 'id', - postName: 'postName', - rank: 'rank', - description: 'description', - department: 'department', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - officeId: 'officeId' -}; - -exports.Prisma.EmployeeScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - designation: 'designation', - employeeId: 'employeeId', - joiningDate: 'joiningDate', - salary: 'salary', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - postId: 'postId' -}; - -exports.Prisma.FeedbackScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - subject: 'subject', - message: 'message', - rating: 'rating', - category: 'category', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - resolvedAt: 'resolvedAt', - resolvedBy: 'resolvedBy', - adminNotes: 'adminNotes' -}; - -exports.Prisma.GrievanceScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - address: 'address', - subject: 'subject', - description: 'description', - category: 'category', - priority: 'priority', - status: 'status', - attachments: 'attachments', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - assignedTo: 'assignedTo', - adminNotes: 'adminNotes', - resolvedAt: 'resolvedAt', - trackingId: 'trackingId' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - Admin: 'Admin', - SchemeService: 'SchemeService', - ContactPerson: 'ContactPerson', - SupportiveDocument: 'SupportiveDocument', - CertificateService: 'CertificateService', - CertificateContact: 'CertificateContact', - CertificateDocument: 'CertificateDocument', - CertificateProcessStep: 'CertificateProcessStep', - CertificateEligibility: 'CertificateEligibility', - ContactService: 'ContactService', - ContactServiceContact: 'ContactServiceContact', - ContactServiceDocument: 'ContactServiceDocument', - Post: 'Post', - Employee: 'Employee', - Feedback: 'Feedback', - Grievance: 'Grievance' -}; -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "C:\\Users\\udaid\\OneDrive\\Desktop\\information services full\\backend\\generated\\prisma", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "windows", - "native": true - } - ], - "previewFeatures": [], - "sourceFilePath": "C:\\Users\\udaid\\OneDrive\\Desktop\\information services full\\backend\\prisma\\schema.prisma", - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": "../../.env", - "schemaEnvPath": "../../.env" - }, - "relativePath": "../../prisma", - "clientVersion": "6.13.0", - "engineVersion": "361e86d0ea4987e9f53a565309b3eed797a6bcbd", - "datasourceNames": [ - "db" - ], - "activeProvider": "postgresql", - "postinstall": false, - "inlineDatasources": { - "db": { - "url": { - "fromEnvVar": "DATABASE_URL", - "value": null - } - } - }, - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel Admin {\n id Int @id @default(autoincrement())\n email String @unique\n password String\n name String\n role String @default(\"admin\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n schemeServices SchemeService[]\n certificateServices CertificateService[]\n contactServices ContactService[]\n}\n\nmodel SchemeService {\n id Int @id @default(autoincrement())\n name String\n summary String\n type String?\n targetAudience String[]\n applicationMode String\n onlineUrl String?\n offlineAddress String?\n status String @default(\"draft\") // draft, pending, published\n isActive Boolean @default(true) // Admin dashboard control\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Admin relation\n adminId Int\n admin Admin @relation(fields: [adminId], references: [id])\n\n // Extended details\n eligibilityDetails String[]\n schemeDetails String[]\n processDetails String[]\n\n // Process flows\n processNew String?\n processUpdate String?\n processLost String?\n processSurrender String?\n\n // Document requirements\n docNew String?\n docUpdate String?\n docLost String?\n docSurrender String?\n\n // Related entities\n contacts ContactPerson[]\n documents SupportiveDocument[]\n}\n\nmodel ContactPerson {\n id Int @id @default(autoincrement())\n serviceName String\n district String\n subDistrict String\n block String\n name String\n designation String\n contact String\n email String\n\n schemeServiceId Int\n schemeService SchemeService @relation(fields: [schemeServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel SupportiveDocument {\n id Int @id @default(autoincrement())\n slNo Int\n documentType String\n validProof String\n isRequired Boolean @default(true)\n\n schemeServiceId Int\n schemeService SchemeService @relation(fields: [schemeServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel CertificateService {\n id Int @id @default(autoincrement())\n name String\n summary String\n type String?\n targetAudience String[]\n applicationMode String\n onlineUrl String?\n offlineAddress String?\n status String @default(\"draft\") // draft, pending, published\n isActive Boolean @default(true) // Admin dashboard control\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Admin relation\n adminId Int\n admin Admin @relation(fields: [adminId], references: [id])\n\n // Extended details\n eligibilityDetails String[]\n certificateDetails String[]\n processDetails String[]\n\n // Process flows\n processNew String?\n processUpdate String?\n processLost String?\n processSurrender String?\n\n // Document requirements\n docNew String?\n docUpdate String?\n docLost String?\n docSurrender String?\n\n // Related entities\n contacts CertificateContact[]\n documents CertificateDocument[]\n processSteps CertificateProcessStep[]\n eligibilityItems CertificateEligibility[]\n}\n\nmodel CertificateContact {\n id Int @id @default(autoincrement())\n serviceName String\n district String\n subDistrict String\n block String\n name String\n designation String\n contact String\n email String\n applicationType String @default(\"New Application\") // New Application, Lost Application, etc.\n\n certificateServiceId Int\n certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel CertificateDocument {\n id Int @id @default(autoincrement())\n slNo Int\n documentType String\n validProof String\n isRequired Boolean @default(true)\n applicationType String @default(\"New Application\") // New Application, Lost Application, etc.\n\n certificateServiceId Int\n certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel CertificateProcessStep {\n id Int @id @default(autoincrement())\n slNo Int\n stepDetails String\n applicationType String @default(\"New Application\") // New Application, Lost Application, etc.\n\n certificateServiceId Int\n certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel CertificateEligibility {\n id Int @id @default(autoincrement())\n eligibilityDetail String\n applicationType String @default(\"New Application\") // New Application, Lost Application, etc.\n\n certificateServiceId Int\n certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel ContactService {\n id Int @id @default(autoincrement())\n name String\n summary String\n type String?\n targetAudience String[]\n applicationMode String\n onlineUrl String?\n offlineAddress String?\n status String @default(\"draft\") // draft, pending, published\n isActive Boolean @default(true) // Admin dashboard control\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Admin relation\n adminId Int\n admin Admin @relation(fields: [adminId], references: [id])\n\n // Extended details\n eligibilityDetails String[]\n contactDetails String[]\n processDetails String[]\n\n // Process flows\n processNew String?\n processUpdate String?\n processLost String?\n processSurrender String?\n\n // Document requirements\n docNew String?\n docUpdate String?\n docLost String?\n docSurrender String?\n\n // Related entities\n contacts ContactServiceContact[]\n documents ContactServiceDocument[]\n}\n\nmodel ContactServiceContact {\n id Int @id @default(autoincrement())\n serviceName String\n district String\n subDistrict String\n block String\n name String\n designation String\n contact String\n email String\n\n contactServiceId Int\n contactService ContactService @relation(fields: [contactServiceId], references: [id], onDelete: Cascade)\n\n // Related entities for office management\n posts Post[]\n}\n\nmodel ContactServiceDocument {\n id Int @id @default(autoincrement())\n slNo Int\n documentType String\n validProof String\n isRequired Boolean @default(true)\n\n contactServiceId Int\n contactService ContactService @relation(fields: [contactServiceId], references: [id], onDelete: Cascade)\n}\n\nmodel Post {\n id Int @id @default(autoincrement())\n postName String // Changed from 'title' to match frontend\n rank String // Changed from 'level' to match frontend\n description String?\n department String?\n status String @default(\"active\") // active, inactive\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Office relation\n officeId Int\n office ContactServiceContact @relation(fields: [officeId], references: [id], onDelete: Cascade)\n\n // Related entities\n employees Employee[]\n}\n\nmodel Employee {\n id Int @id @default(autoincrement())\n name String\n email String\n phone String\n designation String\n employeeId String? // Employee ID/Number (optional)\n joiningDate DateTime?\n salary Float?\n status String @default(\"active\") // active, inactive, on_leave\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Post relation\n postId Int\n post Post @relation(fields: [postId], references: [id], onDelete: Cascade)\n}\n\nmodel Feedback {\n id Int @id @default(autoincrement())\n name String\n email String\n phone String?\n subject String\n message String\n rating Int? // 1-5 star rating (optional)\n category String? // General, Service, Technical, etc.\n status String @default(\"new\") // new, resolved\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n resolvedAt DateTime?\n resolvedBy String? // Admin name who resolved it\n adminNotes String? // Internal notes by admin\n}\n\nmodel Grievance {\n id Int @id @default(autoincrement())\n name String\n email String\n phone String\n address String\n subject String\n description String\n category String? // Service Related, Technical, Policy, etc.\n priority String @default(\"medium\") // low, medium, high, urgent\n status String @default(\"new\") // new, pending, solved\n attachments String[] // File paths or URLs\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Admin tracking\n assignedTo String? // Admin name who is handling\n adminNotes String? // Internal notes by admin\n resolvedAt DateTime?\n\n // Tracking information\n trackingId String @unique // Unique tracking ID for users\n}\n", - "inlineSchemaHash": "2bbf99ea6dc974f756459e9f00002138d9a33e0eea289986377d51c9b6049dce", - "copyEngine": true -} - -const fs = require('fs') - -config.dirname = __dirname -if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { - const alternativePaths = [ - "generated/prisma", - "prisma", - ] - - const alternativePath = alternativePaths.find((altPath) => { - return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) - }) ?? alternativePaths[0] - - config.dirname = path.join(process.cwd(), alternativePath) - config.isBundled = true -} - -config.runtimeDataModel = JSON.parse("{\"models\":{\"Admin\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"admin\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"schemeServices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SchemeService\",\"nativeType\":null,\"relationName\":\"AdminToSchemeService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateServices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateService\",\"nativeType\":null,\"relationName\":\"AdminToCertificateService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactServices\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactService\",\"nativeType\":null,\"relationName\":\"AdminToContactService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SchemeService\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"summary\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"targetAudience\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"onlineUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"offlineAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"draft\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"adminId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"admin\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Admin\",\"nativeType\":null,\"relationName\":\"AdminToSchemeService\",\"relationFromFields\":[\"adminId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eligibilityDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemeDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contacts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactPerson\",\"nativeType\":null,\"relationName\":\"ContactPersonToSchemeService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SupportiveDocument\",\"nativeType\":null,\"relationName\":\"SchemeServiceToSupportiveDocument\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ContactPerson\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serviceName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"district\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subDistrict\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"block\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contact\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemeServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemeService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SchemeService\",\"nativeType\":null,\"relationName\":\"ContactPersonToSchemeService\",\"relationFromFields\":[\"schemeServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SupportiveDocument\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slNo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documentType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"validProof\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isRequired\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemeServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemeService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SchemeService\",\"nativeType\":null,\"relationName\":\"SchemeServiceToSupportiveDocument\",\"relationFromFields\":[\"schemeServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CertificateService\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"summary\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"targetAudience\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"onlineUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"offlineAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"draft\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"adminId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"admin\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Admin\",\"nativeType\":null,\"relationName\":\"AdminToCertificateService\",\"relationFromFields\":[\"adminId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eligibilityDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contacts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateContact\",\"nativeType\":null,\"relationName\":\"CertificateContactToCertificateService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateDocument\",\"nativeType\":null,\"relationName\":\"CertificateDocumentToCertificateService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processSteps\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateProcessStep\",\"nativeType\":null,\"relationName\":\"CertificateProcessStepToCertificateService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eligibilityItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateEligibility\",\"nativeType\":null,\"relationName\":\"CertificateEligibilityToCertificateService\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CertificateContact\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serviceName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"district\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subDistrict\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"block\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contact\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"New Application\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateService\",\"nativeType\":null,\"relationName\":\"CertificateContactToCertificateService\",\"relationFromFields\":[\"certificateServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CertificateDocument\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slNo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documentType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"validProof\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isRequired\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"New Application\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateService\",\"nativeType\":null,\"relationName\":\"CertificateDocumentToCertificateService\",\"relationFromFields\":[\"certificateServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CertificateProcessStep\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slNo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stepDetails\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"New Application\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateService\",\"nativeType\":null,\"relationName\":\"CertificateProcessStepToCertificateService\",\"relationFromFields\":[\"certificateServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CertificateEligibility\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eligibilityDetail\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"New Application\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"certificateService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CertificateService\",\"nativeType\":null,\"relationName\":\"CertificateEligibilityToCertificateService\",\"relationFromFields\":[\"certificateServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ContactService\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"summary\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"targetAudience\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"applicationMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"onlineUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"offlineAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"draft\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"adminId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"admin\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Admin\",\"nativeType\":null,\"relationName\":\"AdminToContactService\",\"relationFromFields\":[\"adminId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"eligibilityDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processDetails\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"processSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docNew\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docUpdate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"docSurrender\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contacts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactServiceContact\",\"nativeType\":null,\"relationName\":\"ContactServiceToContactServiceContact\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactServiceDocument\",\"nativeType\":null,\"relationName\":\"ContactServiceToContactServiceDocument\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ContactServiceContact\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"serviceName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"district\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subDistrict\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"block\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contact\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactService\",\"nativeType\":null,\"relationName\":\"ContactServiceToContactServiceContact\",\"relationFromFields\":[\"contactServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"posts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Post\",\"nativeType\":null,\"relationName\":\"ContactServiceContactToPost\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ContactServiceDocument\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slNo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documentType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"validProof\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isRequired\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactServiceId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"contactService\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactService\",\"nativeType\":null,\"relationName\":\"ContactServiceToContactServiceDocument\",\"relationFromFields\":[\"contactServiceId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Post\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rank\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"department\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"active\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"officeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"office\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ContactServiceContact\",\"nativeType\":null,\"relationName\":\"ContactServiceContactToPost\",\"relationFromFields\":[\"officeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"employees\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Employee\",\"nativeType\":null,\"relationName\":\"EmployeeToPost\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Employee\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"employeeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"joiningDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"salary\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"active\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"postId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"post\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Post\",\"nativeType\":null,\"relationName\":\"EmployeeToPost\",\"relationFromFields\":[\"postId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Feedback\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subject\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rating\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"new\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"resolvedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resolvedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminNotes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Grievance\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subject\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"priority\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"medium\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"new\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attachments\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"assignedTo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminNotes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resolvedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trackingId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") -defineDmmfProperty(exports.Prisma, config.runtimeDataModel) -config.engineWasm = undefined -config.compilerWasm = undefined - - -const { warnEnvConflicts } = require('./runtime/library.js') - -warnEnvConflicts({ - rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), - schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) -}) - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - -// file annotations for bundling tools to include these files -path.join(__dirname, "query_engine-windows.dll.node"); -path.join(process.cwd(), "generated/prisma/query_engine-windows.dll.node") -// file annotations for bundling tools to include these files -path.join(__dirname, "schema.prisma"); -path.join(process.cwd(), "generated/prisma/schema.prisma") diff --git a/backend/generated/prisma/package.json b/backend/generated/prisma/package.json deleted file mode 100644 index 8d26bef..0000000 --- a/backend/generated/prisma/package.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "name": "prisma-client-714508d446ac06105f3c7ef21cd940b2cd69aba8c8949417c503d01ffff9956c", - "main": "index.js", - "types": "index.d.ts", - "browser": "index-browser.js", - "exports": { - "./client": { - "require": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "import": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "default": "./index.js" - }, - "./package.json": "./package.json", - ".": { - "require": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "import": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "default": "./index.js" - }, - "./edge": { - "types": "./edge.d.ts", - "require": "./edge.js", - "import": "./edge.js", - "default": "./edge.js" - }, - "./react-native": { - "types": "./react-native.d.ts", - "require": "./react-native.js", - "import": "./react-native.js", - "default": "./react-native.js" - }, - "./extension": { - "types": "./extension.d.ts", - "require": "./extension.js", - "import": "./extension.js", - "default": "./extension.js" - }, - "./index-browser": { - "types": "./index.d.ts", - "require": "./index-browser.js", - "import": "./index-browser.js", - "default": "./index-browser.js" - }, - "./index": { - "types": "./index.d.ts", - "require": "./index.js", - "import": "./index.js", - "default": "./index.js" - }, - "./wasm": { - "types": "./wasm.d.ts", - "require": "./wasm.js", - "import": "./wasm.mjs", - "default": "./wasm.mjs" - }, - "./runtime/client": { - "types": "./runtime/client.d.ts", - "node": { - "require": "./runtime/client.js", - "default": "./runtime/client.js" - }, - "require": "./runtime/client.js", - "import": "./runtime/client.mjs", - "default": "./runtime/client.mjs" - }, - "./runtime/library": { - "types": "./runtime/library.d.ts", - "require": "./runtime/library.js", - "import": "./runtime/library.mjs", - "default": "./runtime/library.mjs" - }, - "./runtime/binary": { - "types": "./runtime/binary.d.ts", - "require": "./runtime/binary.js", - "import": "./runtime/binary.mjs", - "default": "./runtime/binary.mjs" - }, - "./runtime/wasm-engine-edge": { - "types": "./runtime/wasm-engine-edge.d.ts", - "require": "./runtime/wasm-engine-edge.js", - "import": "./runtime/wasm-engine-edge.mjs", - "default": "./runtime/wasm-engine-edge.mjs" - }, - "./runtime/wasm-compiler-edge": { - "types": "./runtime/wasm-compiler-edge.d.ts", - "require": "./runtime/wasm-compiler-edge.js", - "import": "./runtime/wasm-compiler-edge.mjs", - "default": "./runtime/wasm-compiler-edge.mjs" - }, - "./runtime/edge": { - "types": "./runtime/edge.d.ts", - "require": "./runtime/edge.js", - "import": "./runtime/edge-esm.js", - "default": "./runtime/edge-esm.js" - }, - "./runtime/react-native": { - "types": "./runtime/react-native.d.ts", - "require": "./runtime/react-native.js", - "import": "./runtime/react-native.js", - "default": "./runtime/react-native.js" - }, - "./generator-build": { - "require": "./generator-build/index.js", - "import": "./generator-build/index.js", - "default": "./generator-build/index.js" - }, - "./sql": { - "require": { - "types": "./sql.d.ts", - "node": "./sql.js", - "default": "./sql.js" - }, - "import": { - "types": "./sql.d.ts", - "node": "./sql.mjs", - "default": "./sql.mjs" - }, - "default": "./sql.js" - }, - "./*": "./*" - }, - "version": "6.13.0", - "sideEffects": false -} \ No newline at end of file diff --git a/backend/generated/prisma/query_engine-windows.dll.node b/backend/generated/prisma/query_engine-windows.dll.node deleted file mode 100644 index 5e24303..0000000 Binary files a/backend/generated/prisma/query_engine-windows.dll.node and /dev/null differ diff --git a/backend/generated/prisma/runtime/edge-esm.js b/backend/generated/prisma/runtime/edge-esm.js deleted file mode 100644 index 82dafa7..0000000 --- a/backend/generated/prisma/runtime/edge-esm.js +++ /dev/null @@ -1,34 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -var da=Object.create;var on=Object.defineProperty;var fa=Object.getOwnPropertyDescriptor;var ga=Object.getOwnPropertyNames;var ha=Object.getPrototypeOf,ya=Object.prototype.hasOwnProperty;var de=(e,t)=>()=>(e&&(t=e(e=0)),t);var Re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sr=(e,t)=>{for(var r in t)on(e,r,{get:t[r],enumerable:!0})},wa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ga(t))!ya.call(e,i)&&i!==r&&on(e,i,{get:()=>t[i],enumerable:!(n=fa(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?da(ha(e)):{},wa(t||!e||!e.__esModule?on(r,"default",{value:e,enumerable:!0}):r,e));var y,b,u=de(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=de(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=de(()=>{"use strict";E=()=>{};E.prototype=E});var m=de(()=>{"use strict"});var Ti=Re(ze=>{"use strict";d();u();c();p();m();var ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ea=ci(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=k;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=C.indexOf("=");M===-1&&(M=S);var _=M===S?0:4-M%4;return[M,_]}function l(C){var S=a(C),M=S[0],_=S[1];return(M+_)*3/4-_}function f(C,S,M){return(S+M)*3/4-M}function g(C){var S,M=a(C),_=M[0],B=M[1],I=new n(f(C,_,B)),L=0,oe=B>0?_-4:_,Q;for(Q=0;Q>16&255,I[L++]=S>>8&255,I[L++]=S&255;return B===2&&(S=r[C.charCodeAt(Q)]<<2|r[C.charCodeAt(Q+1)]>>4,I[L++]=S&255),B===1&&(S=r[C.charCodeAt(Q)]<<10|r[C.charCodeAt(Q+1)]<<4|r[C.charCodeAt(Q+2)]>>2,I[L++]=S>>8&255,I[L++]=S&255),I}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function T(C,S,M){for(var _,B=[],I=S;Ioe?oe:L+I));return _===1?(S=C[M-1],B.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(C[M-2]<<8)+C[M-1],B.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),B.join("")}}),ba=ci(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,f=(1<>1,h=-7,T=n?o-1:0,k=n?-1:1,C=t[r+T];for(T+=k,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=k,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=k,h-=8);if(s===0)s=1-g;else{if(s===f)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,f,g=s*8-o-1,h=(1<>1,k=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,S=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+T>=1?r+=k/f:r+=k*Math.pow(2,1-T),r*f>=2&&(a++,f/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*f-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=S,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=S,a/=256,g-=8);t[n+C-S]|=M*128}}),sn=Ea(),Ke=ba(),si=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Ca;ze.INSPECT_MAX_BYTES=50;var ar=2147483647;ze.kMaxLength=ar;A.TYPED_ARRAY_SUPPORT=xa();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function xa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function xe(e){if(e>ar)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return un(e)}return pi(e,t,r)}A.poolSize=8192;function pi(e,t,r){if(typeof e=="string")return va(e,t);if(ArrayBuffer.isView(e))return Ta(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(fe(e,ArrayBuffer)||e&&fe(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(fe(e,SharedArrayBuffer)||e&&fe(e.buffer,SharedArrayBuffer)))return di(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Aa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return pi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function mi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Pa(e,t,r){return mi(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}A.alloc=function(e,t,r){return Pa(e,t,r)};function un(e){return mi(e),xe(e<0?0:cn(e)|0)}A.allocUnsafe=function(e){return un(e)};A.allocUnsafeSlow=function(e){return un(e)};function va(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function an(e){let t=e.length<0?0:cn(e.length)|0,r=xe(t);for(let n=0;n=ar)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ar.toString(16)+" bytes");return e|0}function Ca(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(fe(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),fe(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||fe(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return ln(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return vi(e).length;default:if(i)return n?-1:ln(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=fi;function Ra(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return La(this,t,r);case"utf8":case"utf-8":return hi(this,t,r);case"ascii":return Na(this,t,r);case"latin1":case"binary":return Fa(this,t,r);case"base64":return Ma(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ua(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};si&&(A.prototype[si]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(fe(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),f=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,mn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:ai(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ai(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ai(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let f;if(i){let g=-1;for(f=r;fs&&(r=s-a),f=r;f>=0;f--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Sa(this,e,t,r);case"utf8":case"utf-8":return ka(this,e,t,r);case"ascii":case"latin1":case"binary":return Ia(this,e,t,r);case"base64":return Oa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Da(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ma(e,t,r){return t===0&&r===e.length?sn.fromByteArray(e):sn.fromByteArray(e.slice(t,r))}function hi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,f,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(h=(o&15)<<12|(l&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],f=e[i+2],g=e[i+3],(l&192)===128&&(f&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(f&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return _a(n)}var li=4096;function _a(e){let t=e.length;if(t<=li)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=Se(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),Ke.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),Ke.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),Ke.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),Ke.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function yi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function wi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=Se(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=Se(function(e,t=0){return wi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=Se(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=Se(function(e,t=0){return wi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ei(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ke.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return bi(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return bi(this,e,t,!1,r)};function xi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ke.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return xi(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return xi(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ui(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ui(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ui(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ba(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Pt(t,e.length-(r+1))}function Pi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new We.ERR_OUT_OF_RANGE("value",a,e)}Ba(n,i,o)}function He(e,t){if(typeof e!="number")throw new We.ERR_INVALID_ARG_TYPE(t,"number",e)}function Pt(e,t,r){throw Math.floor(e)!==e?(He(e,r),new We.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new We.ERR_BUFFER_OUT_OF_BOUNDS:new We.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var qa=/[^+/0-9A-Za-z-_]/g;function $a(e){if(e=e.split("=")[0],e=e.trim().replace(qa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function ln(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Va(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function vi(e){return sn.toByteArray($a(e))}function lr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function fe(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function mn(e){return e!==e}var Ga=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Se(e){return typeof BigInt>"u"?Qa:e}function Qa(){throw new Error("BigInt not supported")}});var w,d=de(()=>{"use strict";w=Ue(Ti())});function Ya(){return!1}function gn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Za(){return gn()}function Xa(){return[]}function el(e){e(null,[])}function tl(){return""}function rl(){return""}function nl(){}function il(){}function ol(){}function sl(){}function al(){}function ll(){}function ul(){}function cl(){}function pl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function ml(e,t){t(null,gn())}var dl,fl,ji,Gi=de(()=>{"use strict";d();u();c();p();m();dl={},fl={existsSync:Ya,lstatSync:gn,stat:ml,statSync:Za,readdirSync:Xa,readdir:el,readlinkSync:tl,realpathSync:rl,chmodSync:nl,renameSync:il,mkdirSync:ol,rmdirSync:sl,rmSync:al,unlinkSync:ll,watchFile:ul,unwatchFile:cl,watch:pl,promises:dl},ji=fl});function gl(...e){return e.join("/")}function hl(...e){return e.join("/")}function yl(e){let t=Qi(e),r=Ji(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Qi(e){let t=e.split("/");return t[t.length-1]}function Ji(e){return e.split("/").slice(0,-1).join("/")}function El(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var Wi,wl,bl,xl,mr,Ki=de(()=>{"use strict";d();u();c();p();m();Wi="/",wl=":";bl={sep:Wi},xl={basename:Qi,delimiter:wl,dirname:Ji,join:hl,normalize:El,parse:yl,posix:bl,resolve:gl,sep:Wi},mr=xl});var Hi=Re((Ed,Pl)=>{Pl.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var yn=Re((Dd,Cl)=>{Cl.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var zi=Re(dr=>{"use strict";d();u();c();p();m();Object.defineProperty(dr,"__esModule",{value:!0});dr.enginesVersion=void 0;dr.enginesVersion=yn().prisma.enginesVersion});var Xi=Re((Qd,Zi)=>{"use strict";d();u();c();p();m();Zi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var ro=Re((nf,to)=>{"use strict";d();u();c();p();m();to.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var io=Re((cf,no)=>{"use strict";d();u();c();p();m();var Ol=ro();no.exports=e=>typeof e=="string"?e.replace(Ol(),""):e});var Sn=Re((Zy,vo)=>{"use strict";d();u();c();p();m();vo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";d();u();c();p();m()});var ko=de(()=>{"use strict";d();u();c();p();m()});var $r,zo=de(()=>{"use strict";d();u();c();p();m();$r=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});d();u();c();p();m();var Ri={};sr(Ri,{defineExtension:()=>Ai,getExtensionContext:()=>Ci});d();u();c();p();m();d();u();c();p();m();function Ai(e){return typeof e=="function"?e:t=>t.$extends(e)}d();u();c();p();m();function Ci(e){return e}var ki={};sr(ki,{validator:()=>Si});d();u();c();p();m();d();u();c();p();m();function Si(...e){return t=>t}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var dn,Ii,Oi,Di,Mi=!0;typeof y<"u"&&({FORCE_COLOR:dn,NODE_DISABLE_COLORS:Ii,NO_COLOR:Oi,TERM:Di}=y.env||{},Mi=y.stdout&&y.stdout.isTTY);var Ja={enabled:!Ii&&Oi==null&&Di!=="dumb"&&(dn!=null&&dn!=="0"||Mi)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ja.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Pm=j(0,0),ur=j(1,22),cr=j(2,22),vm=j(3,23),_i=j(4,24),Tm=j(7,27),Am=j(8,28),Cm=j(9,29),Rm=j(30,39),Ye=j(31,39),Ni=j(32,39),Fi=j(33,39),Li=j(34,39),Sm=j(35,39),Ui=j(36,39),km=j(37,39),Bi=j(90,39),Im=j(90,39),Om=j(40,49),Dm=j(41,49),Mm=j(42,49),_m=j(43,49),Nm=j(44,49),Fm=j(45,49),Lm=j(46,49),Um=j(47,49);d();u();c();p();m();var Wa=100,qi=["green","yellow","blue","magenta","cyan","red"],pr=[],$i=Date.now(),Ka=0,fn=typeof y<"u"?y.env:{};globalThis.DEBUG??=fn.DEBUG??"";globalThis.DEBUG_COLORS??=fn.DEBUG_COLORS?fn.DEBUG_COLORS==="true":!0;var vt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ha(e){let t={color:qi[Ka++%qi.length],enabled:vt.enabled(e),namespace:e,log:vt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&pr.push([o,...n]),pr.length>Wa&&pr.shift(),vt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:za(g)),f=`+${Date.now()-$i}ms`;$i=Date.now(),a(o,...l,f)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Z=new Proxy(Ha,{get:(e,t)=>vt[t],set:(e,t,r)=>vt[t]=r});function za(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Vi(){pr.length=0}d();u();c();p();m();d();u();c();p();m();var vl=Hi(),hn=vl.version;d();u();c();p();m();function Ze(e){let t=Tl();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Al(e))}function Tl(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Al(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}d();u();c();p();m();var Yi="prisma+postgres",fr=`${Yi}:`;function gr(e){return e?.toString().startsWith(`${fr}//`)??!1}function wn(e){if(!gr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var At={};sr(At,{error:()=>kl,info:()=>Sl,log:()=>Rl,query:()=>Il,should:()=>eo,tags:()=>Tt,warn:()=>En});d();u();c();p();m();var Tt={error:Ye("prisma:error"),warn:Fi("prisma:warn"),info:Ui("prisma:info"),query:Li("prisma:query")},eo={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Rl(...e){console.log(...e)}function En(e,...t){eo.warn()&&console.warn(`${Tt.warn} ${e}`,...t)}function Sl(e,...t){console.info(`${Tt.info} ${e}`,...t)}function kl(e,...t){console.error(`${Tt.error} ${e}`,...t)}function Il(e,...t){console.log(`${Tt.query} ${e}`,...t)}d();u();c();p();m();function Pe(e,t){throw new Error(t)}d();u();c();p();m();function bn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();u();c();p();m();function Xe(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();u();c();p();m();function xn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{oo.has(e)||(oo.add(e),En(t,...r))};var J=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};F(J,"PrismaClientInitializationError");d();u();c();p();m();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};F(se,"PrismaClientKnownRequestError");d();u();c();p();m();var ke=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};F(ke,"PrismaClientRustPanicError");d();u();c();p();m();var ae=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};F(ae,"PrismaClientUnknownRequestError");d();u();c();p();m();var ee=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};F(ee,"PrismaClientValidationError");d();u();c();p();m();d();u();c();p();m();var et=9e15,Me=1e9,Pn="0123456789abcdef",Er="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",br="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",vn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},co,ve,N=!0,Pr="[DecimalError] ",De=Pr+"Invalid argument: ",po=Pr+"Precision limit exceeded",mo=Pr+"crypto unavailable",fo="[object Decimal]",X=Math.floor,W=Math.pow,Dl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ml=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,_l=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,go=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Nl=9007199254740991,Fl=Er.length-1,Tn=br.length-1,R={toStringTag:fo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};R.ceil=function(){return O(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,f=e.s;if(!s||!a)return!l||!f?NaN:l!==f?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-f:0;if(l!==f)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Ll(n,bo(n,r)),n.precision=e,n.rounding=t,O(ve==2||ve==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,f,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(N=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),f=l.plus(g),n=$(f.plus(g).times(a),f.plus(l),s+2,1),z(a.d).slice(0,s)===(r=z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return N=!0,O(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return $(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return O($(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return O(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Tr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,f=e,g=new s(8);f--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Tr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),f=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(f))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?ge(t,n,i):new t(0):new t(NaN):e.isZero()?ge(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,N=!1,r=r.times(r).minus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,N=!1,r=r.times(r).plus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ge(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,T=g.rounding;if(f.isFinite()){if(f.isZero())return new g(f);if(f.abs().eq(1)&&h+4<=Tn)return s=ge(g,h+4,T).times(.25),s.s=f.s,s}else{if(!f.s)return new g(NaN);if(h+4<=Tn)return s=ge(g,h+4,T).times(.5),s.s=f.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(N=!1,t=Math.ceil(a/D),n=1,l=f.times(f),s=new g(f),i=f;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,T=g.rounding,k=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=f.d,f.s<0||!r||!r[0]||f.eq(1))return new g(r&&!r[0]?-1/0:f.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(N=!1,a=h+k,s=Oe(f,a),n=t?xr(g,a+10):Oe(e,a),l=$(s,n,a,1),Ct(l.d,i=h,T))do if(a+=10,s=Oe(f,a),n=t?xr(g,a+10):Oe(e,a),l=$(s,n,a,1),!o){+z(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(Ct(l.d,i+=10,T));return N=!0,O(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,f,g,h,T,k=this,C=k.constructor;if(e=new C(e),!k.d||!e.d)return!k.s||!e.s?e=new C(NaN):k.d?e.s=-e.s:e=new C(e.d||k.s!==e.s?k:NaN),e;if(k.s!=e.s)return e.s=-e.s,k.plus(e);if(f=k.d,T=e.d,a=C.precision,l=C.rounding,!f[0]||!T[0]){if(T[0])e.s=-e.s;else if(f[0])e=new C(k);else return new C(l===3?-0:0);return N?O(e,a,l):e}if(r=X(e.e/D),g=X(k.e/D),f=f.slice(),o=g-r,o){for(h=o<0,h?(t=f,o=-o,s=T.length):(t=T,r=g,s=f.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=f.length,s=T.length,h=n0;--n)f[s++]=0;for(n=T.length;n>o;){if(f[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=f.length,i=g.length,s-i<0&&(i=s,r=g,g=f,f=r),t=0;i;)t=(f[--i]=f[i]+g[i]+t)/pe|0,f[i]%=pe;for(t&&(f.unshift(t),++n),s=f.length;f[--s]==0;)f.pop();return e.d=f,e.e=vr(f,n),N?O(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=ho(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Bl(n,bo(n,r)),n.precision=e,n.rounding=t,O(ve>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,f=s.s,g=s.constructor;if(f!==1||!a||!a[0])return new g(!f||f<0&&(!a||a[0])?NaN:a?s:1/0);for(N=!1,f=Math.sqrt(+s),f==0||f==1/0?(t=z(a),(t.length+l)%2==0&&(t+="0"),f=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),f==1/0?t="5e"+l:(t=f.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(f.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus($(s,o,r+2,1)).times(.5),z(o.d).slice(0,r)===(t=z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return N=!0,O(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(ve==2||ve==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,f,g=this,h=g.constructor,T=g.d,k=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!k||!k[0])return new h(!e.s||T&&!T[0]&&!k||k&&!k[0]&&!T?NaN:!T||!k?e.s/0:e.s*0);for(r=X(g.e/D)+X(e.e/D),l=T.length,f=k.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+k[n]*T[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=vr(o,r),N?O(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return Cn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,Me),t===void 0?t=n.rounding:ne(t,0,8),O(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,!0):(ne(e,0,Me),t===void 0?t=i.rounding:ne(t,0,8),n=O(new i(n),e+1,t),r=he(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=he(i):(ne(e,0,Me),t===void 0?t=o.rounding:ne(t,0,8),n=O(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,f,g,h,T,k=this,C=k.d,S=k.constructor;if(!C)return new S(k);if(f=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=ho(C)-k.e-1,s=o%D,t.d[0]=W(10,s<0?D+s:s),e==null)e=o>0?t:f;else{if(a=new S(e),!a.isInt()||a.lt(f))throw Error(De+a);e=a.gt(t)?o>0?t:f:a}for(N=!1,a=new S(z(C)),g=S.precision,S.precision=o=C.length*D*2;h=$(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=f,f=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=$(e.minus(r),n,0,1,1),l=l.plus(i.times(f)),r=r.plus(i.times(n)),l.s=f.s=k.s,T=$(f,n,o,1).minus(k).abs().cmp($(l,r,o,1).minus(k).abs())<1?[f,n]:[l,r],S.precision=g,N=!0,T};R.toHexadecimal=R.toHex=function(e,t){return Cn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(N=!1,r=$(r,e,0,t,1).times(e),N=!0,O(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return Cn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,f=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,f));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=X(e.e/D),t>=e.d.length-1&&(r=f<0?-f:f)<=Nl)return i=yo(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(N=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=An(e.times(Oe(a,n+r)),n),i.d&&(i=O(i,n+5,1),Ct(i.d,n,o)&&(t=n+10,i=O(An(e.times(Oe(a,t+r)),t),t+5,1),+z(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,N=!0,l.rounding=o,O(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,Me),t===void 0?t=i.rounding:ne(t,0,8),n=O(new i(n),e,t),r=he(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,Me),t===void 0?t=n.rounding:ne(t,0,8)),O(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return O(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function Ct(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=W(10,D-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function yr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Ll(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Tr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var $=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var f,g,h,T,k,C,S,M,_,B,I,L,oe,Q,tn,nr,xt,rn,ce,ir,or=n.constructor,nn=n.s==i.s?1:-1,Y=n.d,V=i.d;if(!Y||!Y[0]||!V||!V[0])return new or(!n.s||!i.s||(Y?V&&Y[0]==V[0]:!V)?NaN:Y&&Y[0]==0||!V?nn*0:nn/0);for(l?(k=1,g=n.e-i.e):(l=pe,k=D,g=X(n.e/k)-X(i.e/k)),ce=V.length,xt=Y.length,_=new or(nn),B=_.d=[],h=0;V[h]==(Y[h]||0);h++);if(V[h]>(Y[h]||0)&&g--,o==null?(Q=o=or.precision,s=or.rounding):a?Q=o+(n.e-i.e)+1:Q=o,Q<0)B.push(1),C=!0;else{if(Q=Q/k+2|0,h=0,ce==1){for(T=0,V=V[0],Q++;(h1&&(V=e(V,T,l),Y=e(Y,T,l),ce=V.length,xt=Y.length),nr=ce,I=Y.slice(0,ce),L=I.length;L=l/2&&++rn;do T=0,f=t(V,I,ce,L),f<0?(oe=I[0],ce!=L&&(oe=oe*l+(I[1]||0)),T=oe/rn|0,T>1?(T>=l&&(T=l-1),S=e(V,T,l),M=S.length,L=I.length,f=t(S,I,M,L),f==1&&(T--,r(S,ce=10;T/=10)h++;_.e=h+g*k-1,O(_,a?o+_.e+1:o,s,C)}return _}}();function O(e,t,r,n){var i,o,s,a,l,f,g,h,T,k=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=D,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(10,i-s-1)),f=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,f?(t-=e.e+1,h[0]=W(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,D-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),f)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return N&&(e.e>k.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function vr(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function xr(e,t,r){if(t>Fl)throw N=!0,r&&(e.precision=r),Error(po);return O(new e(Er),t,1,!0)}function ge(e,t,r){if(t>Tn)throw Error(po);return O(new e(br),t,r,!0)}function ho(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function yo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(N=!1;;){if(r%2&&(o=o.times(t),lo(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),lo(t.d,s)}return N=!0,o}function ao(e){return e.d[e.d.length-1]&1}function wo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(N=!1,l=C):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),z(a.d).slice(0,l)===z(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(f<3&&Ct(s.d,l-n,k,f))T.precision=l+=10,r=o=a=new T(1),g=0,f++;else return O(s,T.precision=C,k,N=!0);else return T.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,f,g,h,T,k=1,C=10,S=e,M=S.d,_=S.constructor,B=_.rounding,I=_.precision;if(S.s<0||!M||!M[0]||!S.e&&M[0]==1&&M.length==1)return new _(M&&!M[0]?-1/0:S.s!=1?NaN:M?0:S);if(t==null?(N=!1,g=I):g=t,_.precision=g+=C,r=z(M),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=z(S.d),n=r.charAt(0),k++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return f=xr(_,g+2,I).times(o+""),S=Oe(new _(n+"."+r.slice(1)),g-C).plus(f),_.precision=I,t==null?O(S,I,B,N=!0):S;for(h=S,l=s=S=$(S.minus(1),S.plus(1),g,1),T=O(S.times(S),g,1),i=3;;){if(s=O(s.times(T),g,1),f=l.plus($(s,new _(i),g,1)),z(f.d).slice(0,g)===z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(xr(_,g+2,I).times(o+""))),l=$(l,new _(k),g,1),t==null)if(Ct(l.d,g-C,B,a))_.precision=g+=C,f=s=S=$(h.minus(1),h.plus(1),g,1),T=O(S.times(S),g,1),i=a=1;else return O(l,_.precision=I,B,N=!0);else return _.precision=I,l;l=f,i+=2}}function Eo(e){return String(e.s*e.s/0)}function wr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),go.test(t))return wr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ml.test(t))r=16,t=t.toLowerCase();else if(Dl.test(t))r=2;else if(_l.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=yo(n,new n(r),o,o*2)),f=yr(t,r,pe),g=f.length-1,o=g;f[o]===0;--o)f.pop();return o<0?new n(e.s*0):(e.e=vr(f,g),e.d=f,N=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):qe.pow(2,l))),N=!0,e)}function Bl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Tr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,f=1,g=e.precision,h=Math.ceil(g/D);for(N=!1,l=r.times(r),a=new e(n);;){if(s=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,f++}return N=!0,s.d.length=h+1,s}function Tr(e,t){for(var r=e;--t;)r*=e;return r}function bo(e,t){var r,n=t.s<0,i=ge(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ve=n?4:1,t;if(r=t.divToInt(i),r.isZero())ve=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return ve=ao(r)?n?2:3:n?4:1,t;ve=ao(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Cn(e,t,r,n){var i,o,s,a,l,f,g,h,T,k=e.constructor,C=r!==void 0;if(C?(ne(r,1,Me),n===void 0?n=k.rounding:ne(n,0,8)):(r=k.precision,n=k.rounding),!e.isFinite())g=Eo(e);else{for(g=he(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new k(1),T.e=g.length-s,T.d=yr(he(T),10,i),T.e=T.d.length),h=yr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new k(e),e.d=h,e.e=o,e=$(e,T,r,n,0,i),h=e.d,o=e.e,f=co),s=h[r],a=i/2,f=f||h[r+1]!==void 0,f=n<4?(s!==void 0||f)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||f||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,f)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=yr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function ql(e){return new this(e).abs()}function $l(e){return new this(e).acos()}function Vl(e){return new this(e).acosh()}function jl(e,t){return new this(e).plus(t)}function Gl(e){return new this(e).asin()}function Ql(e){return new this(e).asinh()}function Jl(e){return new this(e).atan()}function Wl(e){return new this(e).atanh()}function Kl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ge(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ge(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ge(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan($(e,t,o,1)),t=ge(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan($(e,t,o,1)),r}function Hl(e){return new this(e).cbrt()}function zl(e){return O(e=new this(e),e.e+1,2)}function Yl(e,t,r){return new this(e).clamp(t,r)}function Zl(e){if(!e||typeof e!="object")throw Error(Pr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=vn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(mo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function Xl(e){return new this(e).cos()}function eu(e){return new this(e).cosh()}function xo(e){var t,r,n;function i(o){var s,a,l,f=this;if(!(f instanceof i))return new i(o);if(f.constructor=i,uo(o)){f.s=o.s,N?!o.d||o.e>i.maxE?(f.e=NaN,f.d=null):o.e=10;a/=10)s++;N?s>i.maxE?(f.e=NaN,f.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(mo);else for(;o=10;i/=10)n++;nkt,datamodelEnumToSchemaEnum:()=>Su});d();u();c();p();m();d();u();c();p();m();function Su(e){return{name:e.name,values:e.values.map(t=>t.name)}}d();u();c();p();m();var kt=(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.updateManyAndReturn="updateManyAndReturn",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw",I))(kt||{});var ku=Ue(Xi());var Iu={red:Ye,gray:Bi,dim:cr,bold:ur,underline:_i,highlightSource:e=>e.highlight()},Ou={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Du({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Mu({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(_u(t))),i){a.push("");let f=[i.toString()];o&&(f.push(o),f.push(s.dim(")"))),a.push(f.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function _u(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Rr(e){let t=e.showColors?Iu:Ou,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Du(e),Mu(r,t)}d();u();c();p();m();var Oo=Ue(Sn());d();u();c();p();m();function Co(e,t,r){let n=Ro(e),i=Nu(n),o=Lu(i);o?Sr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Ro(e){return e.errors.flatMap(t=>t.kind==="Union"?Ro(t):[t])}function Nu(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Fu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Fu(e,t){return[...new Set(e.concat(t))]}function Lu(e){return xn(e,(t,r)=>{let n=To(t),i=To(r);return n!==i?n-i:Ao(t)-Ao(r)})}function To(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ao(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();u();c();p();m();var le=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();u();c();p();m();d();u();c();p();m();ko();d();u();c();p();m();var it=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};So();d();u();c();p();m();d();u();c();p();m();var kr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();u();c();p();m();var Ir=e=>e,Or={bold:Ir,red:Ir,green:Ir,dim:Ir,enabled:!1},Io={bold:ur,red:Ye,green:Ni,dim:cr,enabled:!0},ot={write(e){e.writeLine(",")}};d();u();c();p();m();var we=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();u();c();p();m();var Ne=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var st=class extends Ne{items=[];addItem(t){return this.items.push(new kr(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new we("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(ot,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var at=class e extends Ne{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof st&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new we("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(ot,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();u();c();p();m();var H=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};d();u();c();p();m();var It=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(ot,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Sr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Uu(e,t);break;case"IncludeOnScalar":Bu(e,t);break;case"EmptySelection":qu(e,t,r);break;case"UnknownSelectionField":Gu(e,t);break;case"InvalidSelectionValue":Qu(e,t);break;case"UnknownArgument":Ju(e,t);break;case"UnknownInputField":Wu(e,t);break;case"RequiredArgumentMissing":Ku(e,t);break;case"InvalidArgumentType":Hu(e,t);break;case"InvalidArgumentValue":zu(e,t);break;case"ValueTooLarge":Yu(e,t);break;case"SomeFieldsMissing":Zu(e,t);break;case"TooManyFieldsGiven":Xu(e,t);break;case"Union":Co(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Uu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Bu(e,t){let[r,n]=lt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new le(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Ot(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function qu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){$u(e,t,i);return}if(n.hasField("select")){Vu(e,t);return}}if(r?.[_e(e.outputType.name)]){ju(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function $u(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Vu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),_o(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Ot(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ju(e,t){let r=new It;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new le("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=lt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new at;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Gu(e,t){let r=No(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":_o(n,e.outputType);break;case"include":ec(n,e.outputType);break;case"omit":tc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Ot(n)),i.join(" ")})}function Qu(e,t){let r=No(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Ju(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),rc(n,e.arguments)),t.addErrorMessage(i=>Do(i,r,e.arguments.map(o=>o.name)))}function Wu(e,t){let[r,n]=lt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Fo(o,e.inputType)}t.addErrorMessage(o=>Do(o,n,e.inputType.fields.map(s=>s.name)))}function Do(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=ic(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Ot(e)),n.join(" ")}function Ku(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=lt(e.argumentPath),s=new It,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let l=e.inputTypes.map(Mo).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=lt(e.dependentArgumentPath);t.addErrorMessage(f=>`Argument \`${f.green(o)}\` is required because argument \`${f.green(l)}\` was provided.`)}}}function Mo(e){return e.kind==="list"?`${Mo(e.elementType)}[]`:e.name}function Hu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Dr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function zu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Dr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Yu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Zu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Fo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Dr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Ot(i)),o.join(" ")})}function Xu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Dr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function _o(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function ec(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function tc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function rc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function No(e,t){let[r,n]=lt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Fo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function lt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Ot({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Dr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var nc=3;function ic(e,t){let r=1/0,n;for(let i of t){let o=(0,Oo.default)(e,i);o>nc||o`}};function ut(e){return e instanceof Dt}d();u();c();p();m();var Mr=Symbol(),In=new WeakMap,Ae=class{constructor(t){t===Mr?In.set(this,`Prisma.${this._getName()}`):In.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return In.get(this)}},Mt=class extends Ae{_getNamespace(){return"NullTypes"}},_t=class extends Mt{#e};Dn(_t,"DbNull");var Nt=class extends Mt{#e};Dn(Nt,"JsonNull");var Ft=class extends Mt{#e};Dn(Ft,"AnyNull");var On={classes:{DbNull:_t,JsonNull:Nt,AnyNull:Ft},instances:{DbNull:new _t(Mr),JsonNull:new Nt(Mr),AnyNull:new Ft(Mr)}};function Dn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();u();c();p();m();var Lo=": ",_r=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Lo.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Lo).write(this.value)}};var Mn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function ct(e){return new Mn(Uo(e))}function Uo(e){let t=new at;for(let[r,n]of Object.entries(e)){let i=new _r(r,Bo(n));t.addField(i)}return t}function Bo(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(nt(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Ar(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Ae?new H(`Prisma.${e._getName()}`):ut(e)?new H(`prisma.${_e(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?oc(e):typeof e=="object"?Uo(e):new H(Object.prototype.toString.call(e))}function oc(e){let t=new st;for(let r of e)t.addItem(Bo(r));return t}function Nr(e,t){let r=t==="pretty"?Io:Or,n=e.renderAllMessages(r),i=new it(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=ct(e);for(let h of t)Sr(h,a,s);let{message:l,args:f}=Nr(a,r),g=Rr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:f});throw new ee(g,{clientVersion:o})}d();u();c();p();m();d();u();c();p();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}d();u();c();p();m();function $o(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:sc({...e,...qo(t.name,e,t.result.$allModels),...qo(t.name,e,t.result[n])})}function sc(e){let t=new ye,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Xe(e,n=>({...n,needs:r(n.name,new Set)}))}function qo(e,t,r){return r?Xe(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:ac(t,o,i)})):{}}function ac(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Vo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function jo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Lr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new ye;modelExtensionsCache=new ye;queryCallbacksCache=new ye;clientExtensions=St(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=St(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>$o(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},pt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Lr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Lr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};d();u();c();p();m();var Ur=class{constructor(t){this.name=t}};function Go(e){return e instanceof Ur}function lc(e){return new Ur(e)}d();u();c();p();m();d();u();c();p();m();var Qo=Symbol(),Lt=class{constructor(t){if(t!==Qo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?_n:t}},_n=new Lt(Qo);function be(e){return e instanceof Lt}var uc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Jo="explicitly `undefined` values are not allowed";function Fn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=pt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g}){let h=new Nn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g});return{modelName:e,action:uc[t],query:Ut(r,h)}}function Ut({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ko(r,n),selection:cc(e,t,i,n)}}function cc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),fc(e,n)):pc(n,t,r)}function pc(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&mc(n,t,e),dc(n,r,e),n}function mc(e,t,r){for(let[n,i]of Object.entries(t)){if(be(i))continue;let o=r.nestSelection(n);if(Ln(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Ut(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Ut(i,o)}}function dc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=jo(i,n);for(let[s,a]of Object.entries(o)){if(be(a))continue;Ln(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function fc(e,t){let r={},n=t.getComputedFields(),i=Vo(e,n);for(let[o,s]of Object.entries(i)){if(be(s))continue;let a=t.nestSelection(o);Ln(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||be(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Ut({},a):r[o]=!0;continue}r[o]=Ut(s,a)}}return r}function Wo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(rt(e)){if(Ar(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Go(e))return{$type:"Param",value:e.name};if(ut(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return gc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(hc(e))return e.values;if(nt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ae){if(e!==On.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(yc(e))return e.toJSON();if(typeof e=="object")return Ko(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ko(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);be(i)||(i!==void 0?r[n]=Wo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Jo}))}return r}function gc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[_e(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Pe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();u();c();p();m();function Ho(e){if(!e._hasPreviewFlag("metrics"))throw new ee("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Bt=class{_client;constructor(t){this._client=t}prometheus(t){return Ho(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return Ho(this._client),this._client._engine.metrics({format:"json",...t})}};d();u();c();p();m();function wc(e,t){let r=St(()=>Ec(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Ec(e){return{datamodel:{models:Un(e.models),enums:Un(e.enums),types:Un(e.types)}}}function Un(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();u();c();p();m();var Bn=new WeakMap,Br="$$PrismaTypedSql",qt=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,Br,{value:Br})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function bc(e){return(...t)=>new qt(e,t)}function qr(e){return e!=null&&e[Br]===Br}d();u();c();p();m();var ma=Ue(yn());d();u();c();p();m();zo();Gi();Ki();d();u();c();p();m();var ue=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}d();u();c();p();m();d();u();c();p();m();var Vr={enumerable:!0,configurable:!0,writable:!0};function jr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Vr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Xo=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=vc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=es(Reflect.ownKeys(o),r),a=es(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Vr,...l?.getPropertyDescriptor(s)}:Vr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Xo]=function(){let o={...this};return delete o[Xo],o},i}function vc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function es(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}d();u();c();p();m();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();u();c();p();m();function Gr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();u();c();p();m();function ts(e){if(e===void 0)return"";let t=ct(e);return new it(0,{colors:Or}).write(t).toString()}d();u();c();p();m();var Tc="P2037";function Qr({error:e,user_facing_error:t},r,n){return t.error_code?new se(Ac(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ae(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Ac(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Tc&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var qn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new qn}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var rs={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function dt(e={}){let t=Rc(e);return Object.entries(t).reduce((n,[i,o])=>(rs[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Rc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Jr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ns(e,t){let r=Jr(e);return t({action:"aggregate",unpacker:r,argsMapper:dt})(e)}d();u();c();p();m();function Sc(e={}){let{select:t,...r}=e;return typeof t=="object"?dt({...r,_count:t}):dt({...r,_count:{_all:!0}})}function kc(e={}){return typeof e.select=="object"?t=>Jr(e)(t)._count:t=>Jr(e)(t)._count._all}function is(e,t){return t({action:"count",unpacker:kc(e),argsMapper:Sc})(e)}d();u();c();p();m();function Ic(e={}){let t=dt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Oc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function os(e,t){return t({action:"groupBy",unpacker:Oc(e),argsMapper:Ic})(e)}function ss(e,t,r){if(t==="aggregate")return n=>ns(n,r);if(t==="count")return n=>is(n,r);if(t==="groupBy")return n=>os(n,r)}d();u();c();p();m();function as(e,t){let r=t.fields.filter(i=>!i.relationName),n=Po(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Dt(e,o,s.type,s.isList,s.kind==="enum")},...jr(Object.keys(n))})}d();u();c();p();m();d();u();c();p();m();var ls=e=>Array.isArray(e)?e:e.split("."),$n=(e,t)=>ls(t).reduce((r,n)=>r&&r[n],e),us=(e,t,r)=>ls(t).reduceRight((n,i,o,s)=>Object.assign({},$n(e,s.slice(0,o)),{[i]:n}),r);function Dc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Mc(e,t,r){return t===void 0?e??{}:us(t,r,e||!0)}function Vn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,f)=>({...l,[f.name]:f}),{});return l=>{let f=Fe(e._errorFormat),g=Dc(n,i),h=Mc(l,o,g),T=r({dataPath:g,callsite:f})(h),k=_c(e,t);return new Proxy(T,{get(C,S){if(!k.includes(S))return C[S];let _=[a[S].type,r,S],B=[g,h];return Vn(e,..._,...B)},...jr([...k,...Object.getOwnPropertyNames(T)])})}}function _c(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Nc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Fc=["aggregate","count","groupBy"];function jn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Lc(e,t),Bc(e,t),$t(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function Lc(e,t){let r=Ee(t),n=Object.keys(kt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let f=Fe(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:f};return e._request({...h,...a})},{action:o,args:l,model:t})};return Nc.includes(o)?Vn(e,t,s):Uc(i)?ss(e,i,s):s({})}}}function Uc(e){return Fc.includes(e)}function Bc(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return as(t,r)}))}d();u();c();p();m();function cs(e){return e.replace(/^./,t=>t.toUpperCase())}var Gn=Symbol();function Vt(e){let t=[qc(e),$c(e),te(Gn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push($t(r)),me(e,t)}function qc(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function $c(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=cs(i);if(e._runtimeDataModel.models[o]!==void 0)return jn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return jn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ps(e){return e[Gn]?e[Gn]:e}function ms(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Vt(t)}d();u();c();p();m();d();u();c();p();m();function ds({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let f=l.needs.filter(g=>n[g]);f.length>0&&a.push(mt(f))}else if(r){if(!r[l.name])continue;let f=l.needs.filter(g=>!r[g]);f.length>0&&a.push(mt(f))}Vc(e,l.needs)&&s.push(jc(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Vc(e,t){return t.every(r=>bn(e,r))}function jc(e,t){return $e(te(e.name,()=>e.compute(t)))}d();u();c();p();m();function Wr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let f=typeof s=="object"?s:{};t[o]=Wr({visitor:i,result:t[o],args:f,modelName:l.type,runtimeDataModel:n})}}function gs({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Wr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,f)=>{let g=Ee(l);return ds({result:a,modelName:g,select:f.select,omit:f.select?void 0:{...o?.[g],...f.omit},extensions:n})}})}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Gc=["$connect","$disconnect","$on","$transaction","$use","$extends"],hs=Gc;function ys(e){if(e instanceof ue)return Qc(e);if(qr(e))return Jc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ys(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=vs(o,l),a.args=s,Es(e,a,r,n+1)}})})}function bs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Es(e,t,s)}function xs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ps(r,n,0,e):e(r)}}function Ps(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=vs(i,l),Ps(a,t,r+1,n)}})}var ws=e=>e;function vs(e=ws,t=ws){return r=>e(t(r))}d();u();c();p();m();var Ts=Z("prisma:client"),As={Vercel:"vercel","Netlify CI":"netlify"};function Cs({postinstall:e,ciName:t,clientVersion:r}){if(Ts("checkPlatformCaching:postinstall",e),Ts("checkPlatformCaching:ciName",t),e===!0&&t&&t in As){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${As[t]}-build`;throw console.error(n),new J(n,r)}}d();u();c();p();m();function Rs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();u();c();p();m();d();u();c();p();m();var Wc=()=>globalThis.process?.release?.name==="node",Kc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Hc=()=>!!globalThis.Deno,zc=()=>typeof globalThis.Netlify=="object",Yc=()=>typeof globalThis.EdgeRuntime=="object",Zc=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Xc(){return[[zc,"netlify"],[Yc,"edge-light"],[Zc,"workerd"],[Hc,"deno"],[Kc,"bun"],[Wc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var ep={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Qn(){let e=Xc();return{id:e,prettyName:ep[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();u();c();p();m();var Ss="6.13.0";d();u();c();p();m();d();u();c();p();m();function ft({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Qn().id==="workerd"?new J(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new J(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new J("error: Missing URL environment variable, value, or override.",n);return i}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Kr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Kr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};d();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var Ve=class extends ie{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};F(Ve,"InvalidDatasourceError");function ks(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=ft({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==fr)throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new Ve(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=wn(i)?"http:":"https:",f=new URL(i.href.replace(o,l));return{apiKey:a,url:f}}d();u();c();p();m();var Is=Ue(zi()),Hr=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Is.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};d();u();c();p();m();function rp(e){return e[0]*1e3+e[1]/1e6}function Jn(e){return new Date(rp(e))}d();u();c();p();m();d();u();c();p();m();var gt=class extends ie{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};F(gt,"ForcedRetryError");d();u();c();p();m();var je=class extends ie{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};F(je,"NotImplementedYetError");d();u();c();p();m();d();u();c();p();m();var G=class extends ie{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ge=class extends G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};F(Ge,"SchemaMissingError");d();u();c();p();m();d();u();c();p();m();var Wn="This request could not be understood by the server",Gt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Wn,U(t,!1)),n&&(this.code=n)}};F(Gt,"BadRequestError");d();u();c();p();m();var Qt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};F(Qt,"HealthcheckTimeoutError");d();u();c();p();m();var Jt=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};F(Jt,"EngineStartupError");d();u();c();p();m();var Wt=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};F(Wt,"EngineVersionNotSupportedError");d();u();c();p();m();var Kn="Request timed out",Kt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Kn){super(r,U(t,!1))}};F(Kt,"GatewayTimeoutError");d();u();c();p();m();var np="Interactive transaction error",Ht=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=np){super(r,U(t,!1))}};F(Ht,"InteractiveTransactionError");d();u();c();p();m();var ip="Request parameters are invalid",zt=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=ip){super(r,U(t,!1))}};F(zt,"InvalidRequestError");d();u();c();p();m();var Hn="Requested resource does not exist",Yt=class extends G{name="NotFoundError";code="P5003";constructor(t,r=Hn){super(r,U(t,!1))}};F(Yt,"NotFoundError");d();u();c();p();m();var zn="Unknown server error",ht=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||zn,U(t,!0)),this.logs=n}};F(ht,"ServerError");d();u();c();p();m();var Yn="Unauthorized, check your connection string",Zt=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=Yn){super(r,U(t,!1))}};F(Zt,"UnauthorizedError");d();u();c();p();m();var Zn="Usage exceeded, retry again later",Xt=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=Zn){super(r,U(t,!0))}};F(Xt,"UsageExceededError");async function op(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function er(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await op(e);if(n.type==="QueryEngineError")throw new se(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new ht(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Wt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new J(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Qt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ht(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new zt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Zt(r,yt(Yn,n));if(e.status===404)return new Yt(r,yt(Hn,n));if(e.status===429)throw new Xt(r,yt(Zn,n));if(e.status===504)throw new Kt(r,yt(Kn,n));if(e.status>=500)throw new ht(r,yt(zn,n));if(e.status>=400)throw new Gt(r,yt(Wn,n))}function yt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();u();c();p();m();function Os(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();u();c();p();m();var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ds(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,f,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,f=g&63,r+=Ce[s]+Ce[a]+Ce[l]+Ce[f];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ce[s]+Ce[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ce[s]+Ce[a]+Ce[l]+"="),r}d();u();c();p();m();function Ms(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new J("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();u();c();p();m();var _s={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();u();c();p();m();d();u();c();p();m();var tr=class extends ie{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: -${t}`,U(r,!0))}};F(tr,"RequestError");async function Qe(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new tr(a,{clientVersion:n,cause:s})}}var ap=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Ns=Z("prisma:client:dataproxyEngine");async function lp(e,t){let r=_s["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&ap.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,f]=s.split("."),g=up(`<=${a}.${l}.${f}`),h=await Qe(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let T=await h.text();Ns("length of body fetched from unpkg.com",T.length);let k;try{k=JSON.parse(T)}catch(C){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),C}return k.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Fs(e,t){let r=await lp(e,t);return Ns("version",r),r}function up(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ls=3,rr=Z("prisma:client:dataproxyEngine"),wt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Ms(t),this.config=t,this.env=t.env,this.inlineSchema=Ds(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new Hr({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Fs(this.host,this.config),rr("host",this.host),rr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":rr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Jn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Jn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Qe(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||rr("schema response status",r.status);let n=await er(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Gr(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||rr("graphql response status",a.status),await this.handleError(await er(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Qe(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await er(l,this.clientVersion));let f=await l.json(),{extensions:g}=f;g&&this.propagateResponseExtensions(g);let h=f.id,T=f["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await er(a,this.clientVersion));let l=await a.json(),{extensions:f}=l;f&&this.propagateResponseExtensions(f);return}}})}getURLAndAPIKey(){return ks({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new je("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(r>=Ls)throw i instanceof gt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ls} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Os(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new gt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Qr(t[0],this.config.clientVersion,this.config.activeProvider):new ae(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};d();u();c();p();m();function Us({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=S=>{i.push({_tag:"warning",value:S})},a=S=>{let M=S.join(` -`);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),f=gr(e),g=!!t,h=l||f;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let k={accelerate:T,ppg:f,driverAdapters:g};function C(S){return S.length>0}return C(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:k}:{ok:!0,diagnostics:{warnings:i},isUsing:k}}function Bs({copyEngine:e=!0},t){let r;try{r=ft({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Us({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)hr(...h.value);if(!n){let h=o.errors[0];throw new ee(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",f=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new wt(t):(i.driverAdapters,i.accelerate,new wt(t))}d();u();c();p();m();function zr({generator:e}){return e?.previewFeatures??[]}d();u();c();p();m();var qs=e=>({command:e});d();u();c();p();m();d();u();c();p();m();var $s=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();u();c();p();m();function Et(e){try{return Vs(e,"fast")}catch{return Vs(e,"slow")}}function Vs(e,t){return JSON.stringify(e.map(r=>Gs(r,t)))}function Gs(e,t){if(Array.isArray(e))return e.map(r=>Gs(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(rt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Te.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(cp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Qs(e):e}function cp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Qs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(js);let t={};for(let r of Object.keys(e))t[r]=js(e[r]);return t}function js(e){return typeof e=="bigint"?e.toString():Qs(e)}var pp=/^(\s*alter\s)/i,Js=Z("prisma:client");function Xn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&pp.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var ei=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(qr(r))n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Et(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=$s(r),i={values:Et(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Js(`prisma.${e}(${n}, ${i.values})`):Js(`prisma.${e}(${n})`),{query:n,parameters:i}},Ws={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ue(t,r)}},Ks={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();u();c();p();m();function ti(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Hs(r(s)):Hs(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Hs(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();u();c();p();m();var mp=hn.split(".")[0],dp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ri=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${mp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??dp}};function zs(){return new ri}d();u();c();p();m();function Ys(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}d();u();c();p();m();function Zs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();u();c();p();m();var Yr=class{_middlewares=[];use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();u();c();p();m();var ea=Ue(io());d();u();c();p();m();function Zr(e){return typeof e.batchRequestIdx=="number"}d();u();c();p();m();function Xs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ni(e.query.arguments)),t.push(ni(e.query.selection)),t.join("")}function ni(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ni(n)})`:r}).join(" ")})`}d();u();c();p();m();var fp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ii(e){return fp[e]}d();u();c();p();m();var Xr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iJe("bigint",r));case"bytes-array":return t.map(r=>Je("bytes",r));case"decimal-array":return t.map(r=>Je("decimal",r));case"datetime-array":return t.map(r=>Je("datetime",r));case"date-array":return t.map(r=>Je("date",r));case"time-array":return t.map(r=>Je("time",r));default:return t}}function oi(e){let t=[],r=gp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),f=n.some(h=>ii(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:yp(o),containsWrite:f,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(k){return k}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?ta(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ii(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Xs(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(hp(t),wp(t,i))throw t;if(t instanceof se&&Ep(t)){let f=ra(t.meta);Fr({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Rr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ke(l,this.client._clientVersion);if(t instanceof ae)throw new ae(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof J)throw new J(l,this.client._clientVersion);if(t instanceof ke)throw new ke(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,ea.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(f=>f!=="select"&&f!=="include"),a=$n(o,s),l=i==="queryRaw"?oi(a):Rt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function yp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:ta(e)};Pe(e,"Unknown transaction kind")}}function ta(e){return{id:e.id,payload:e.payload}}function wp(e,t){return Zr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Ep(e){return e.code==="P2009"||e.code==="P2012"}function ra(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ra)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();u();c();p();m();var na=Ss;d();u();c();p();m();var la=Ue(Sn());d();u();c();p();m();var q=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};F(q,"PrismaClientConstructorValidationError");var ia=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],oa=["pretty","colorless","minimal"],sa=["info","query","warn","error"],bp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=bt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&Ze(t.generator)==="client")throw new q('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!zr(t).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ze(t.generator)==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!oa.includes(e)){let t=bt(e,oa);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!sa.includes(r)){let n=bt(r,sa);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=bt(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new q('"omit" option is expected to be an object.');if(e===null)throw new q('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Pp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(f=>f.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new q(vp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=bt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ua(e,t){for(let[r,n]of Object.entries(e)){if(!ia.includes(r)){let i=bt(r,ia);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}bp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function bt(e,t){if(t.length===0||typeof e!="string")return"";let r=xp(e,t);return r?` Did you mean "${r}"?`:""}function xp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,la.default)(e,i)}));r.sort((i,o)=>i.distance_e(n)===t);if(r)return e[r]}function vp(e,t){let r=ct(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Nr(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}d();u();c();p();m();function ca(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=f=>{o||(o=!0,r(f))};for(let f=0;f{n[f]=g,a()},g=>{if(!Zr(g)){l(g);return}g.batchRequestIdx===f?l(g):(i||(i=g),a())})})}var Le=Z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Tp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Ap=Symbol.for("prisma.client.transaction.id"),Cp={id:0,nextId(){return++this.id}};function Rp(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new Yr;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ti();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Cs(e),n&&ua(n,e);let i=new $r().on("error",()=>{});this._extensions=pt.empty(),this._previewFeatures=zr(e),this._clientVersion=e.clientVersion??na,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=zs();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&mr.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&mr.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new J(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new J("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},f=l.__internal??{},g=f.debug===!0;g&&Z.enable("prisma:client");let h=mr.resolve(e.dirname,e.relativePath);ji.existsSync(h)||(h=e.dirname),Le("dirname",e.dirname),Le("relativePath",e.relativePath),Le("cwd",h);let T=f.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Zs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(k=>typeof k=="string"?k==="query":k.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Rs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ft,getBatchRequestPayload:Gr,prismaGraphQLToJSError:Qr,PrismaClientUnknownRequestError:ae,PrismaClientInitializationError:J,PrismaClientKnownRequestError:se,debug:Z("prisma:client:accelerateEngine"),engineVersion:ma.version,clientVersion:e.clientVersion}},Le("clientVersion",e.clientVersion),this._engine=Bs(e,this._engineConfig),this._requestHandler=new en(this,i),l.log)for(let k of l.log){let C=typeof k=="string"?k:k.emit==="stdout"?k.level:null;C&&this.$on(C,S=>{At.log(`${At.tags[C]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Vt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Vi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=pa(n,i);return Xn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ee("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Xn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ee(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:qs,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...pa(n,i));throw new ee("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ee("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Cp.nextId(),s=Ys(n.length),a=n.map((l,f)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:f,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ca(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let f={kind:"itx",...a};l=await n(this._createItxClient(f)),await this._engine.transaction("commit",o,a)}catch(f){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),f}return l}_createItxClient(n){return me(Vt(me(ps(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>ti(n)),te(Ap,()=>n.id)])),[mt(hs)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Tp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async f=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,M=>g(f,_=>(M?.end(),l(_))));let{runInTransaction:h,args:T,...k}=f,C={...n,...k};T&&(C.args=i.middlewareArgsToRequestArgs(T)),n.transaction!==void 0&&h===!1&&delete C.transaction;let S=await bs(this,C);return C.model?gs({result:S,modelName:C.model,args:C.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:f,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:k}){try{n=f?f(n):n;let C={name:"serialize"},S=this._tracingHelper.runInChildSpan(C,()=>Fn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return Z.enabled("prisma:client")&&(Le("Prisma Client call:"),Le(`prisma.${i}(${ts(n)})`),Le("Generated request:"),Le(JSON.stringify(S,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:k})}catch(C){throw C.clientVersion=this._clientVersion,C}}$metrics=new Bt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ms}return t}function pa(e,t){return Sp(e)?[new ue(e,t),Ws]:[e,Ks]}function Sp(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();u();c();p();m();var kp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ip(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!kp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();u();c();p();m();var export_warnEnvConflicts=void 0;export{Cr as DMMF,Z as Debug,Te as Decimal,Ri as Extensions,Bt as MetricsClient,J as PrismaClientInitializationError,se as PrismaClientKnownRequestError,ke as PrismaClientRustPanicError,ae as PrismaClientUnknownRequestError,ee as PrismaClientValidationError,ki as Public,ue as Sql,lc as createParam,wc as defineDmmfProperty,Rt as deserializeJsonResponse,oi as deserializeRawResult,Ru as dmmfToRuntimeDataModel,Pc as empty,Rp as getPrismaClient,Qn as getRuntime,xc as join,Ip as makeStrictEnum,bc as makeTypedQueryFactory,On as objectEnumValues,Yo as raw,Fn as serializeJsonQuery,_n as skip,Zo as sqltag,export_warnEnvConflicts as warnEnvConflicts,hr as warnOnce}; -//# sourceMappingURL=edge-esm.js.map diff --git a/backend/generated/prisma/runtime/edge.js b/backend/generated/prisma/runtime/edge.js deleted file mode 100644 index 382cce4..0000000 --- a/backend/generated/prisma/runtime/edge.js +++ /dev/null @@ -1,34 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -"use strict";var va=Object.create;var ur=Object.defineProperty;var Ta=Object.getOwnPropertyDescriptor;var Aa=Object.getOwnPropertyNames;var Ca=Object.getPrototypeOf,Ra=Object.prototype.hasOwnProperty;var de=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tt=(e,t)=>{for(var r in t)ur(e,r,{get:t[r],enumerable:!0})},ci=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Aa(t))!Ra.call(e,i)&&i!==r&&ur(e,i,{get:()=>t[i],enumerable:!(n=Ta(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?va(Ca(e)):{},ci(t||!e||!e.__esModule?ur(r,"default",{value:e,enumerable:!0}):r,e)),Sa=e=>ci(ur({},"__esModule",{value:!0}),e);var y,b,u=de(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:b}=y});var x,c=de(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,p=de(()=>{"use strict";E=()=>{};E.prototype=E});var m=de(()=>{"use strict"});var ki=Se(ze=>{"use strict";d();u();c();p();m();var gi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ka=gi(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=k;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=C.indexOf("=");M===-1&&(M=S);var _=M===S?0:4-M%4;return[M,_]}function l(C){var S=a(C),M=S[0],_=S[1];return(M+_)*3/4-_}function f(C,S,M){return(S+M)*3/4-M}function g(C){var S,M=a(C),_=M[0],B=M[1],I=new n(f(C,_,B)),L=0,le=B>0?_-4:_,Q;for(Q=0;Q>16&255,I[L++]=S>>8&255,I[L++]=S&255;return B===2&&(S=r[C.charCodeAt(Q)]<<2|r[C.charCodeAt(Q+1)]>>4,I[L++]=S&255),B===1&&(S=r[C.charCodeAt(Q)]<<10|r[C.charCodeAt(Q+1)]<<4|r[C.charCodeAt(Q+2)]>>2,I[L++]=S>>8&255,I[L++]=S&255),I}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function T(C,S,M){for(var _,B=[],I=S;Ile?le:L+I));return _===1?(S=C[M-1],B.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(C[M-2]<<8)+C[M-1],B.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),B.join("")}}),Ia=gi(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,f=(1<>1,h=-7,T=n?o-1:0,k=n?-1:1,C=t[r+T];for(T+=k,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=k,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=k,h-=8);if(s===0)s=1-g;else{if(s===f)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,f,g=s*8-o-1,h=(1<>1,k=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,S=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+T>=1?r+=k/f:r+=k*Math.pow(2,1-T),r*f>=2&&(a++,f/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*f-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=S,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=S,a/=256,g-=8);t[n+C-S]|=M*128}}),pn=ka(),Ke=Ia(),pi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.Buffer=A;ze.SlowBuffer=Fa;ze.INSPECT_MAX_BYTES=50;var cr=2147483647;ze.kMaxLength=cr;A.TYPED_ARRAY_SUPPORT=Oa();!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Oa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}});Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function Pe(e){if(e>cr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return fn(e)}return hi(e,t,r)}A.poolSize=8192;function hi(e,t,r){if(typeof e=="string")return Ma(e,t);if(ArrayBuffer.isView(e))return _a(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(fe(e,ArrayBuffer)||e&&fe(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(fe(e,SharedArrayBuffer)||e&&fe(e.buffer,SharedArrayBuffer)))return wi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return A.from(n,t,r);let i=Na(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}A.from=function(e,t,r){return hi(e,t,r)};Object.setPrototypeOf(A.prototype,Uint8Array.prototype);Object.setPrototypeOf(A,Uint8Array);function yi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Da(e,t,r){return yi(e),e<=0?Pe(e):t!==void 0?typeof r=="string"?Pe(e).fill(t,r):Pe(e).fill(t):Pe(e)}A.alloc=function(e,t,r){return Da(e,t,r)};function fn(e){return yi(e),Pe(e<0?0:gn(e)|0)}A.allocUnsafe=function(e){return fn(e)};A.allocUnsafeSlow=function(e){return fn(e)};function Ma(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Ei(e,t)|0,n=Pe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function mn(e){let t=e.length<0?0:gn(e.length)|0,r=Pe(t);for(let n=0;n=cr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+cr.toString(16)+" bytes");return e|0}function Fa(e){return+e!=e&&(e=0),A.alloc(+e)}A.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==A.prototype};A.compare=function(e,t){if(fe(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),fe(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(A.isBuffer(o)||(o=A.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(A.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function Ei(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||fe(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return dn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Si(e).length;default:if(i)return n?-1:dn(e).length;t=(""+t).toLowerCase(),i=!0}}A.byteLength=Ei;function La(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Wa(this,t,r);case"utf8":case"utf-8":return xi(this,t,r);case"ascii":return Qa(this,t,r);case"latin1":case"binary":return Ja(this,t,r);case"base64":return ja(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ka(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}A.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}A.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};pi&&(A.prototype[pi]=A.prototype.inspect);A.prototype.compare=function(e,t,r,n,i){if(fe(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),f=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,yn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=A.from(t,n)),A.isBuffer(t))return t.length===0?-1:mi(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):mi(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function mi(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let f;if(i){let g=-1;for(f=r;fs&&(r=s-a),f=r;f>=0;f--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ua(this,e,t,r);case"utf8":case"utf-8":return Ba(this,e,t,r);case"ascii":case"latin1":case"binary":return qa(this,e,t,r);case"base64":return $a(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Va(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ja(e,t,r){return t===0&&r===e.length?pn.fromByteArray(e):pn.fromByteArray(e.slice(t,r))}function xi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,f,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(h=(o&15)<<12|(l&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],f=e[i+2],g=e[i+3],(l&192)===128&&(f&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(f&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ga(n)}var di=4096;function Ga(e){let t=e.length;if(t<=di)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};A.prototype.readBigUInt64LE=ke(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};A.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};A.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};A.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};A.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};A.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};A.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};A.prototype.readBigInt64LE=ke(function(e){e=e>>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,He(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),Ke.read(this,e,!0,23,4)};A.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),Ke.read(this,e,!1,23,4)};A.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),Ke.read(this,e,!0,52,8)};A.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),Ke.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Pi(e,t,r,n,i){Ri(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function vi(e,t,r,n,i){Ri(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}A.prototype.writeBigUInt64LE=ke(function(e,t=0){return Pi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeBigUInt64BE=ke(function(e,t=0){return vi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};A.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};A.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};A.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};A.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};A.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};A.prototype.writeBigInt64LE=ke(function(e,t=0){return Pi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});A.prototype.writeBigInt64BE=ke(function(e,t=0){return vi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ti(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ai(e,t,r,n,i){return t=+t,r=r>>>0,i||Ti(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ke.write(e,t,r,n,23,4),r+4}A.prototype.writeFloatLE=function(e,t,r){return Ai(this,e,t,!0,r)};A.prototype.writeFloatBE=function(e,t,r){return Ai(this,e,t,!1,r)};function Ci(e,t,r,n,i){return t=+t,r=r>>>0,i||Ti(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ke.write(e,t,r,n,52,8),r+8}A.prototype.writeDoubleLE=function(e,t,r){return Ci(this,e,t,!0,r)};A.prototype.writeDoubleBE=function(e,t,r){return Ci(this,e,t,!1,r)};A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=fi(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=fi(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function fi(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ha(e,t,r){He(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&At(t,e.length-(r+1))}function Ri(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new We.ERR_OUT_OF_RANGE("value",a,e)}Ha(n,i,o)}function He(e,t){if(typeof e!="number")throw new We.ERR_INVALID_ARG_TYPE(t,"number",e)}function At(e,t,r){throw Math.floor(e)!==e?(He(e,r),new We.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new We.ERR_BUFFER_OUT_OF_BOUNDS:new We.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var za=/[^+/0-9A-Za-z-_]/g;function Ya(e){if(e=e.split("=")[0],e=e.trim().replace(za,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function dn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Za(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function Si(e){return pn.toByteArray(Ya(e))}function pr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function fe(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function yn(e){return e!==e}var el=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function ke(e){return typeof BigInt>"u"?tl:e}function tl(){throw new Error("BigInt not supported")}});var w,d=de(()=>{"use strict";w=Ue(ki())});function al(){return!1}function Pn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function ll(){return Pn()}function ul(){return[]}function cl(e){e(null,[])}function pl(){return""}function ml(){return""}function dl(){}function fl(){}function gl(){}function hl(){}function yl(){}function wl(){}function El(){}function bl(){}function xl(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Pl(e,t){t(null,Pn())}var vl,Tl,Ji,Wi=de(()=>{"use strict";d();u();c();p();m();vl={},Tl={existsSync:al,lstatSync:Pn,stat:Pl,statSync:ll,readdirSync:ul,readdir:cl,readlinkSync:pl,realpathSync:ml,chmodSync:dl,renameSync:fl,mkdirSync:gl,rmdirSync:hl,rmSync:yl,unlinkSync:wl,watchFile:El,unwatchFile:bl,watch:xl,promises:vl},Ji=Tl});function Al(...e){return e.join("/")}function Cl(...e){return e.join("/")}function Rl(e){let t=Ki(e),r=Hi(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Ki(e){let t=e.split("/");return t[t.length-1]}function Hi(e){return e.split("/").slice(0,-1).join("/")}function kl(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var zi,Sl,Il,Ol,gr,Yi=de(()=>{"use strict";d();u();c();p();m();zi="/",Sl=":";Il={sep:zi},Ol={basename:Ki,delimiter:Sl,dirname:Hi,join:Cl,normalize:kl,parse:Rl,posix:Il,resolve:Al,sep:zi},gr=Ol});var Zi=Se((xd,Dl)=>{Dl.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Tn=Se((_d,Fl)=>{Fl.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Xi=Se(hr=>{"use strict";d();u();c();p();m();Object.defineProperty(hr,"__esModule",{value:!0});hr.enginesVersion=void 0;hr.enginesVersion=Tn().prisma.enginesVersion});var ro=Se((Wd,to)=>{"use strict";d();u();c();p();m();to.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var oo=Se((sf,io)=>{"use strict";d();u();c();p();m();io.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var ao=Se((mf,so)=>{"use strict";d();u();c();p();m();var $l=oo();so.exports=e=>typeof e=="string"?e.replace($l(),""):e});var Nn=Se((ew,Ro)=>{"use strict";d();u();c();p();m();Ro.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";d();u();c();p();m()});var Mo=de(()=>{"use strict";d();u();c();p();m()});var Qr,ns=de(()=>{"use strict";d();u();c();p();m();Qr=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Mp={};Tt(Mp,{DMMF:()=>Mt,Debug:()=>z,Decimal:()=>ye,Extensions:()=>wn,MetricsClient:()=>dt,PrismaClientInitializationError:()=>J,PrismaClientKnownRequestError:()=>ne,PrismaClientRustPanicError:()=>Te,PrismaClientUnknownRequestError:()=>ie,PrismaClientValidationError:()=>X,Public:()=>En,Sql:()=>se,createParam:()=>Ho,defineDmmfProperty:()=>ts,deserializeJsonResponse:()=>rt,deserializeRawResult:()=>sn,dmmfToRuntimeDataModel:()=>Co,empty:()=>os,getPrismaClient:()=>ba,getRuntime:()=>Zr,join:()=>is,makeStrictEnum:()=>xa,makeTypedQueryFactory:()=>rs,objectEnumValues:()=>Nr,raw:()=>Gn,serializeJsonQuery:()=>Vr,skip:()=>$r,sqltag:()=>Qn,warnEnvConflicts:()=>void 0,warnOnce:()=>kt});module.exports=Sa(Mp);d();u();c();p();m();var wn={};Tt(wn,{defineExtension:()=>Ii,getExtensionContext:()=>Oi});d();u();c();p();m();d();u();c();p();m();function Ii(e){return typeof e=="function"?e:t=>t.$extends(e)}d();u();c();p();m();function Oi(e){return e}var En={};Tt(En,{validator:()=>Di});d();u();c();p();m();d();u();c();p();m();function Di(...e){return t=>t}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var bn,Mi,_i,Ni,Fi=!0;typeof y<"u"&&({FORCE_COLOR:bn,NODE_DISABLE_COLORS:Mi,NO_COLOR:_i,TERM:Ni}=y.env||{},Fi=y.stdout&&y.stdout.isTTY);var rl={enabled:!Mi&&_i==null&&Ni!=="dumb"&&(bn!=null&&bn!=="0"||Fi)};function j(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!rl.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Tm=j(0,0),mr=j(1,22),dr=j(2,22),Am=j(3,23),Li=j(4,24),Cm=j(7,27),Rm=j(8,28),Sm=j(9,29),km=j(30,39),Ye=j(31,39),Ui=j(32,39),Bi=j(33,39),qi=j(34,39),Im=j(35,39),$i=j(36,39),Om=j(37,39),Vi=j(90,39),Dm=j(90,39),Mm=j(40,49),_m=j(41,49),Nm=j(42,49),Fm=j(43,49),Lm=j(44,49),Um=j(45,49),Bm=j(46,49),qm=j(47,49);d();u();c();p();m();var nl=100,ji=["green","yellow","blue","magenta","cyan","red"],fr=[],Gi=Date.now(),il=0,xn=typeof y<"u"?y.env:{};globalThis.DEBUG??=xn.DEBUG??"";globalThis.DEBUG_COLORS??=xn.DEBUG_COLORS?xn.DEBUG_COLORS==="true":!0;var Ct={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function ol(e){let t={color:ji[il++%ji.length],enabled:Ct.enabled(e),namespace:e,log:Ct.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&fr.push([o,...n]),fr.length>nl&&fr.shift(),Ct.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:sl(g)),f=`+${Date.now()-Gi}ms`;Gi=Date.now(),a(o,...l,f)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var z=new Proxy(ol,{get:(e,t)=>Ct[t],set:(e,t,r)=>Ct[t]=r});function sl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Qi(){fr.length=0}d();u();c();p();m();d();u();c();p();m();var Ml=Zi(),vn=Ml.version;d();u();c();p();m();function Ze(e){let t=_l();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Nl(e))}function _l(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Nl(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}d();u();c();p();m();var eo="prisma+postgres",yr=`${eo}:`;function wr(e){return e?.toString().startsWith(`${yr}//`)??!1}function An(e){if(!wr(e))return!1;let{host:t}=new URL(e);return t.includes("localhost")||t.includes("127.0.0.1")||t.includes("[::1]")}var St={};Tt(St,{error:()=>Bl,info:()=>Ul,log:()=>Ll,query:()=>ql,should:()=>no,tags:()=>Rt,warn:()=>Cn});d();u();c();p();m();var Rt={error:Ye("prisma:error"),warn:Bi("prisma:warn"),info:$i("prisma:info"),query:qi("prisma:query")},no={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ll(...e){console.log(...e)}function Cn(e,...t){no.warn()&&console.warn(`${Rt.warn} ${e}`,...t)}function Ul(e,...t){console.info(`${Rt.info} ${e}`,...t)}function Bl(e,...t){console.error(`${Rt.error} ${e}`,...t)}function ql(e,...t){console.log(`${Rt.query} ${e}`,...t)}d();u();c();p();m();function ve(e,t){throw new Error(t)}d();u();c();p();m();function Rn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();u();c();p();m();function Xe(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();u();c();p();m();function Sn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{lo.has(e)||(lo.add(e),Cn(t,...r))};var J=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};F(J,"PrismaClientInitializationError");d();u();c();p();m();var ne=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};F(ne,"PrismaClientKnownRequestError");d();u();c();p();m();var Te=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};F(Te,"PrismaClientRustPanicError");d();u();c();p();m();var ie=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};F(ie,"PrismaClientUnknownRequestError");d();u();c();p();m();var X=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};F(X,"PrismaClientValidationError");d();u();c();p();m();d();u();c();p();m();var et=9e15,Me=1e9,kn="0123456789abcdef",xr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Pr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",In={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},fo,Ae,N=!0,Tr="[DecimalError] ",De=Tr+"Invalid argument: ",go=Tr+"Precision limit exceeded",ho=Tr+"crypto unavailable",yo="[object Decimal]",ee=Math.floor,W=Math.pow,Vl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,jl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Gl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,wo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,D=7,Ql=9007199254740991,Jl=xr.length-1,On=Pr.length-1,R={toStringTag:yo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};R.ceil=function(){return O(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,f=e.s;if(!s||!a)return!l||!f?NaN:l!==f?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-f:0;if(l!==f)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Wl(n,vo(n,r)),n.precision=e,n.rounding=t,O(Ae==2||Ae==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,f,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(N=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),f=l.plus(g),n=$(f.plus(g).times(a),f.plus(l),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return N=!0,O(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/D))*D,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return $(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return O($(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return O(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Cr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,f=e,g=new s(8);f--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Cr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),f=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(f))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?ge(t,n,i):new t(0):new t(NaN):e.isZero()?ge(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,N=!1,r=r.times(r).minus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,N=!1,r=r.times(r).plus(1).sqrt().plus(r),N=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ge(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,T=g.rounding;if(f.isFinite()){if(f.isZero())return new g(f);if(f.abs().eq(1)&&h+4<=On)return s=ge(g,h+4,T).times(.25),s.s=f.s,s}else{if(!f.s)return new g(NaN);if(h+4<=On)return s=ge(g,h+4,T).times(.5),s.s=f.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/D+2|0),e=r;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(N=!1,t=Math.ceil(a/D),n=1,l=f.times(f),s=new g(f),i=f;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,f=this,g=f.constructor,h=g.precision,T=g.rounding,k=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=f.d,f.s<0||!r||!r[0]||f.eq(1))return new g(r&&!r[0]?-1/0:f.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(N=!1,a=h+k,s=Oe(f,a),n=t?vr(g,a+10):Oe(e,a),l=$(s,n,a,1),It(l.d,i=h,T))do if(a+=10,s=Oe(f,a),n=t?vr(g,a+10):Oe(e,a),l=$(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(It(l.d,i+=10,T));return N=!0,O(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,f,g,h,T,k=this,C=k.constructor;if(e=new C(e),!k.d||!e.d)return!k.s||!e.s?e=new C(NaN):k.d?e.s=-e.s:e=new C(e.d||k.s!==e.s?k:NaN),e;if(k.s!=e.s)return e.s=-e.s,k.plus(e);if(f=k.d,T=e.d,a=C.precision,l=C.rounding,!f[0]||!T[0]){if(T[0])e.s=-e.s;else if(f[0])e=new C(k);else return new C(l===3?-0:0);return N?O(e,a,l):e}if(r=ee(e.e/D),g=ee(k.e/D),f=f.slice(),o=g-r,o){for(h=o<0,h?(t=f,o=-o,s=T.length):(t=T,r=g,s=f.length),n=Math.max(Math.ceil(a/D),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=f.length,s=T.length,h=n0;--n)f[s++]=0;for(n=T.length;n>o;){if(f[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=f.length,i=g.length,s-i<0&&(i=s,r=g,g=f,f=r),t=0;i;)t=(f[--i]=f[i]+g[i]+t)/pe|0,f[i]%=pe;for(t&&(f.unshift(t),++n),s=f.length;f[--s]==0;)f.pop();return e.d=f,e.e=Ar(f,n),N?O(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=Eo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+D,n.rounding=1,r=Hl(n,vo(n,r)),n.precision=e,n.rounding=t,O(Ae>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,f=s.s,g=s.constructor;if(f!==1||!a||!a[0])return new g(!f||f<0&&(!a||a[0])?NaN:a?s:1/0);for(N=!1,f=Math.sqrt(+s),f==0||f==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),f=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),f==1/0?t="5e"+l:(t=f.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(f.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus($(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return N=!0,O(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(Ae==2||Ae==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,f,g=this,h=g.constructor,T=g.d,k=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!k||!k[0])return new h(!e.s||T&&!T[0]&&!k||k&&!k[0]&&!T?NaN:!T||!k?e.s/0:e.s*0);for(r=ee(g.e/D)+ee(e.e/D),l=T.length,f=k.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+k[n]*T[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Ar(o,r),N?O(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return Mn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,Me),t===void 0?t=n.rounding:oe(t,0,8),O(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,!0):(oe(e,0,Me),t===void 0?t=i.rounding:oe(t,0,8),n=O(new i(n),e+1,t),r=he(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=he(i):(oe(e,0,Me),t===void 0?t=o.rounding:oe(t,0,8),n=O(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,f,g,h,T,k=this,C=k.d,S=k.constructor;if(!C)return new S(k);if(f=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=Eo(C)-k.e-1,s=o%D,t.d[0]=W(10,s<0?D+s:s),e==null)e=o>0?t:f;else{if(a=new S(e),!a.isInt()||a.lt(f))throw Error(De+a);e=a.gt(t)?o>0?t:f:a}for(N=!1,a=new S(Y(C)),g=S.precision,S.precision=o=C.length*D*2;h=$(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=f,f=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=$(e.minus(r),n,0,1,1),l=l.plus(i.times(f)),r=r.plus(i.times(n)),l.s=f.s=k.s,T=$(f,n,o,1).minus(k).abs().cmp($(l,r,o,1).minus(k).abs())<1?[f,n]:[l,r],S.precision=g,N=!0,T};R.toHexadecimal=R.toHex=function(e,t){return Mn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(N=!1,r=$(r,e,0,t,1).times(e),N=!0,O(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return Mn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,f=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,f));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=ee(e.e/D),t>=e.d.length-1&&(r=f<0?-f:f)<=Ql)return i=bo(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(N=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Dn(e.times(Oe(a,n+r)),n),i.d&&(i=O(i,n+5,1),It(i.d,n,o)&&(t=n+10,i=O(Dn(e.times(Oe(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,N=!0,l.rounding=o,O(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,Me),t===void 0?t=i.rounding:oe(t,0,8),n=O(new i(n),e,t),r=he(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,Me),t===void 0?t=n.rounding:oe(t,0,8)),O(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return O(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function It(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=D,i=0):(i=Math.ceil((t+1)/D),t%=D),o=W(10,D-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function Er(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Wl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Cr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var $=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var f,g,h,T,k,C,S,M,_,B,I,L,le,Q,ln,sr,vt,un,ce,ar,lr=n.constructor,cn=n.s==i.s?1:-1,Z=n.d,V=i.d;if(!Z||!Z[0]||!V||!V[0])return new lr(!n.s||!i.s||(Z?V&&Z[0]==V[0]:!V)?NaN:Z&&Z[0]==0||!V?cn*0:cn/0);for(l?(k=1,g=n.e-i.e):(l=pe,k=D,g=ee(n.e/k)-ee(i.e/k)),ce=V.length,vt=Z.length,_=new lr(cn),B=_.d=[],h=0;V[h]==(Z[h]||0);h++);if(V[h]>(Z[h]||0)&&g--,o==null?(Q=o=lr.precision,s=lr.rounding):a?Q=o+(n.e-i.e)+1:Q=o,Q<0)B.push(1),C=!0;else{if(Q=Q/k+2|0,h=0,ce==1){for(T=0,V=V[0],Q++;(h1&&(V=e(V,T,l),Z=e(Z,T,l),ce=V.length,vt=Z.length),sr=ce,I=Z.slice(0,ce),L=I.length;L=l/2&&++un;do T=0,f=t(V,I,ce,L),f<0?(le=I[0],ce!=L&&(le=le*l+(I[1]||0)),T=le/un|0,T>1?(T>=l&&(T=l-1),S=e(V,T,l),M=S.length,L=I.length,f=t(S,I,M,L),f==1&&(T--,r(S,ce=10;T/=10)h++;_.e=h+g*k-1,O(_,a?o+_.e+1:o,s,C)}return _}}();function O(e,t,r,n){var i,o,s,a,l,f,g,h,T,k=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=D,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/D),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=D,s=o-D+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=D,s=o-D+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(10,i-s-1)),f=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,f?(t-=e.e+1,h[0]=W(10,(D-t%D)%D),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,D-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),f)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=pe)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return N&&(e.e>k.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function Ar(e,t){var r=e[0];for(t*=D;r>=10;r/=10)t++;return t}function vr(e,t,r){if(t>Jl)throw N=!0,r&&(e.precision=r),Error(go);return O(new e(xr),t,1,!0)}function ge(e,t,r){if(t>On)throw Error(go);return O(new e(Pr),t,r,!0)}function Eo(e){var t=e.length-1,r=t*D+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function bo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/D+4);for(N=!1;;){if(r%2&&(o=o.times(t),po(o.d,s)&&(i=!0)),r=ee(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),po(t.d,s)}return N=!0,o}function co(e){return e.d[e.d.length-1]&1}function xo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(N=!1,l=C):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(f<3&&It(s.d,l-n,k,f))T.precision=l+=10,r=o=a=new T(1),g=0,f++;else return O(s,T.precision=C,k,N=!0);else return T.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,l,f,g,h,T,k=1,C=10,S=e,M=S.d,_=S.constructor,B=_.rounding,I=_.precision;if(S.s<0||!M||!M[0]||!S.e&&M[0]==1&&M.length==1)return new _(M&&!M[0]?-1/0:S.s!=1?NaN:M?0:S);if(t==null?(N=!1,g=I):g=t,_.precision=g+=C,r=Y(M),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=Y(S.d),n=r.charAt(0),k++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return f=vr(_,g+2,I).times(o+""),S=Oe(new _(n+"."+r.slice(1)),g-C).plus(f),_.precision=I,t==null?O(S,I,B,N=!0):S;for(h=S,l=s=S=$(S.minus(1),S.plus(1),g,1),T=O(S.times(S),g,1),i=3;;){if(s=O(s.times(T),g,1),f=l.plus($(s,new _(i),g,1)),Y(f.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(vr(_,g+2,I).times(o+""))),l=$(l,new _(k),g,1),t==null)if(It(l.d,g-C,B,a))_.precision=g+=C,f=s=S=$(h.minus(1),h.plus(1),g,1),T=O(S.times(S),g,1),i=a=1;else return O(l,_.precision=I,B,N=!0);else return _.precision=I,l;l=f,i+=2}}function Po(e){return String(e.s*e.s/0)}function br(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%D,r<0&&(n+=D),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),wo.test(t))return br(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(jl.test(t))r=16,t=t.toLowerCase();else if(Vl.test(t))r=2;else if(Gl.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=bo(n,new n(r),o,o*2)),f=Er(t,r,pe),g=f.length-1,o=g;f[o]===0;--o)f.pop();return o<0?new n(e.s*0):(e.e=Ar(f,g),e.d=f,N=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):qe.pow(2,l))),N=!0,e)}function Hl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Cr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,f=1,g=e.precision,h=Math.ceil(g/D);for(N=!1,l=r.times(r),a=new e(n);;){if(s=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,f++}return N=!0,s.d.length=h+1,s}function Cr(e,t){for(var r=e;--t;)r*=e;return r}function vo(e,t){var r,n=t.s<0,i=ge(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ae=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ae=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ae=co(r)?n?2:3:n?4:1,t;Ae=co(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Mn(e,t,r,n){var i,o,s,a,l,f,g,h,T,k=e.constructor,C=r!==void 0;if(C?(oe(r,1,Me),n===void 0?n=k.rounding:oe(n,0,8)):(r=k.precision,n=k.rounding),!e.isFinite())g=Po(e);else{for(g=he(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new k(1),T.e=g.length-s,T.d=Er(he(T),10,i),T.e=T.d.length),h=Er(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new k(e),e.d=h,e.e=o,e=$(e,T,r,n,0,i),h=e.d,o=e.e,f=fo),s=h[r],a=i/2,f=f||h[r+1]!==void 0,f=n<4?(s!==void 0||f)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||f||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,f)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=Er(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function zl(e){return new this(e).abs()}function Yl(e){return new this(e).acos()}function Zl(e){return new this(e).acosh()}function Xl(e,t){return new this(e).plus(t)}function eu(e){return new this(e).asin()}function tu(e){return new this(e).asinh()}function ru(e){return new this(e).atan()}function nu(e){return new this(e).atanh()}function iu(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ge(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ge(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ge(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan($(e,t,o,1)),t=ge(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan($(e,t,o,1)),r}function ou(e){return new this(e).cbrt()}function su(e){return O(e=new this(e),e.e+1,2)}function au(e,t,r){return new this(e).clamp(t,r)}function lu(e){if(!e||typeof e!="object")throw Error(Tr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=In[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ho);else this[r]=!1;else throw Error(De+r+": "+n);return this}function uu(e){return new this(e).cos()}function cu(e){return new this(e).cosh()}function To(e){var t,r,n;function i(o){var s,a,l,f=this;if(!(f instanceof i))return new i(o);if(f.constructor=i,mo(o)){f.s=o.s,N?!o.d||o.e>i.maxE?(f.e=NaN,f.d=null):o.e=10;a/=10)s++;N?s>i.maxE?(f.e=NaN,f.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(ho);else for(;o=10;i/=10)n++;nDt,datamodelEnumToSchemaEnum:()=>Lu});d();u();c();p();m();d();u();c();p();m();function Lu(e){return{name:e.name,values:e.values.map(t=>t.name)}}d();u();c();p();m();var Dt=(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.updateManyAndReturn="updateManyAndReturn",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw",I))(Dt||{});var Uu=Ue(ro());var Bu={red:Ye,gray:Vi,dim:dr,bold:mr,underline:Li,highlightSource:e=>e.highlight()},qu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function $u({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Vu({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(ju(t))),i){a.push("");let f=[i.toString()];o&&(f.push(o),f.push(s.dim(")"))),a.push(f.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function ju(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Sr(e){let t=e.showColors?Bu:qu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=$u(e),Vu(r,t)}d();u();c();p();m();var No=Ue(Nn());d();u();c();p();m();function Io(e,t,r){let n=Oo(e),i=Gu(n),o=Ju(i);o?kr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Oo(e){return e.errors.flatMap(t=>t.kind==="Union"?Oo(t):[t])}function Gu(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Qu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Qu(e,t){return[...new Set(e.concat(t))]}function Ju(e){return Sn(e,(t,r)=>{let n=So(t),i=So(r);return n!==i?n-i:ko(t)-ko(r)})}function So(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function ko(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();u();c();p();m();var ue=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();u();c();p();m();d();u();c();p();m();Mo();d();u();c();p();m();var ot=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};Do();d();u();c();p();m();d();u();c();p();m();var Ir=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();u();c();p();m();var Or=e=>e,Dr={bold:Or,red:Or,green:Or,dim:Or,enabled:!1},_o={bold:mr,red:Ye,green:Ui,dim:dr,enabled:!0},st={write(e){e.writeLine(",")}};d();u();c();p();m();var Ee=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();u();c();p();m();var Ne=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var at=class extends Ne{items=[];addItem(t){return this.items.push(new Ir(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Ee("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(st,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var lt=class e extends Ne{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof at&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Ee("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(st,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();u();c();p();m();var H=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Ee(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};d();u();c();p();m();var _t=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(st,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function kr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Wu(e,t);break;case"IncludeOnScalar":Ku(e,t);break;case"EmptySelection":Hu(e,t,r);break;case"UnknownSelectionField":Xu(e,t);break;case"InvalidSelectionValue":ec(e,t);break;case"UnknownArgument":tc(e,t);break;case"UnknownInputField":rc(e,t);break;case"RequiredArgumentMissing":nc(e,t);break;case"InvalidArgumentType":ic(e,t);break;case"InvalidArgumentValue":oc(e,t);break;case"ValueTooLarge":sc(e,t);break;case"SomeFieldsMissing":ac(e,t);break;case"TooManyFieldsGiven":lc(e,t);break;case"Union":Io(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Wu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Ku(e,t){let[r,n]=ut(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Nt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Hu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){zu(e,t,i);return}if(n.hasField("select")){Yu(e,t);return}}if(r?.[_e(e.outputType.name)]){Zu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function zu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ue(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Yu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Uo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Nt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Zu(e,t){let r=new _t;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ue("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=ut(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new lt;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Xu(e,t){let r=Bo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Uo(n,e.outputType);break;case"include":uc(n,e.outputType);break;case"omit":cc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Nt(n)),i.join(" ")})}function ec(e,t){let r=Bo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function tc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),pc(n,e.arguments)),t.addErrorMessage(i=>Fo(i,r,e.arguments.map(o=>o.name)))}function rc(e,t){let[r,n]=ut(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&qo(o,e.inputType)}t.addErrorMessage(o=>Fo(o,n,e.inputType.fields.map(s=>s.name)))}function Fo(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=dc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Nt(e)),n.join(" ")}function nc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof H&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=ut(e.argumentPath),s=new _t,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ue(o,s).makeRequired())}else{let l=e.inputTypes.map(Lo).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=ut(e.dependentArgumentPath);t.addErrorMessage(f=>`Argument \`${f.green(o)}\` is required because argument \`${f.green(l)}\` was provided.`)}}}function Lo(e){return e.kind==="list"?`${Lo(e.elementType)}[]`:e.name}function ic(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Mr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function oc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Mr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function sc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof H&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function ac(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&qo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Mr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Nt(i)),o.join(" ")})}function lc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Mr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Uo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,"true"))}function uc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ue(r.name,"true"))}function cc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ue(r.name,"true"))}function pc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function Bo(e,t){let[r,n]=ut(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function qo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function ut(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Nt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Mr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var mc=3;function dc(e,t){let r=1/0,n;for(let i of t){let o=(0,No.default)(e,i);o>mc||o`}};function ct(e){return e instanceof Ft}d();u();c();p();m();var _r=Symbol(),Ln=new WeakMap,Ce=class{constructor(t){t===_r?Ln.set(this,`Prisma.${this._getName()}`):Ln.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ln.get(this)}},Lt=class extends Ce{_getNamespace(){return"NullTypes"}},Ut=class extends Lt{#e};Un(Ut,"DbNull");var Bt=class extends Lt{#e};Un(Bt,"JsonNull");var qt=class extends Lt{#e};Un(qt,"AnyNull");var Nr={classes:{DbNull:Ut,JsonNull:Bt,AnyNull:qt},instances:{DbNull:new Ut(_r),JsonNull:new Bt(_r),AnyNull:new qt(_r)}};function Un(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();u();c();p();m();var $o=": ",Fr=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+$o.length}write(t){let r=new Ee(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write($o).write(this.value)}};var Bn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function pt(e){return new Bn(Vo(e))}function Vo(e){let t=new lt;for(let[r,n]of Object.entries(e)){let i=new Fr(r,jo(n));t.addField(i)}return t}function jo(e){if(typeof e=="string")return new H(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new H(String(e));if(typeof e=="bigint")return new H(`${e}n`);if(e===null)return new H("null");if(e===void 0)return new H("undefined");if(it(e))return new H(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new H(`Buffer.alloc(${e.byteLength})`):new H(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Rr(e)?e.toISOString():"Invalid Date";return new H(`new Date("${t}")`)}return e instanceof Ce?new H(`Prisma.${e._getName()}`):ct(e)?new H(`prisma.${_e(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?fc(e):typeof e=="object"?Vo(e):new H(Object.prototype.toString.call(e))}function fc(e){let t=new at;for(let r of e)t.addItem(jo(r));return t}function Lr(e,t){let r=t==="pretty"?_o:Dr,n=e.renderAllMessages(r),i=new ot(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Ur({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=pt(e);for(let h of t)kr(h,a,s);let{message:l,args:f}=Lr(a,r),g=Sr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:f});throw new X(g,{clientVersion:o})}d();u();c();p();m();d();u();c();p();m();function be(e){return e.replace(/^./,t=>t.toLowerCase())}d();u();c();p();m();function Qo(e,t,r){let n=be(r);return!t.result||!(t.result.$allModels||t.result[n])?e:gc({...e,...Go(t.name,e,t.result.$allModels),...Go(t.name,e,t.result[n])})}function gc(e){let t=new we,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Xe(e,n=>({...n,needs:r(n.name,new Set)}))}function Go(e,t,r){return r?Xe(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:hc(t,o,i)})):{}}function hc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Jo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Wo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Br=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new we;modelExtensionsCache=new we;queryCallbacksCache=new we;clientExtensions=Ot(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=Ot(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Qo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=be(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},mt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Br(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Br(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};d();u();c();p();m();var qr=class{constructor(t){this.name=t}};function Ko(e){return e instanceof qr}function Ho(e){return new qr(e)}d();u();c();p();m();d();u();c();p();m();var zo=Symbol(),$t=class{constructor(t){if(t!==zo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?$r:t}},$r=new $t(zo);function xe(e){return e instanceof $t}var yc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Yo="explicitly `undefined` values are not allowed";function Vr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=mt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g}){let h=new qn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:f,globalOmit:g});return{modelName:e,action:yc[t],query:Vt(r,h)}}function Vt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Xo(r,n),selection:wc(e,t,i,n)}}function wc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Pc(e,n)):Ec(n,t,r)}function Ec(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&bc(n,t,e),xc(n,r,e),n}function bc(e,t,r){for(let[n,i]of Object.entries(t)){if(xe(i))continue;let o=r.nestSelection(n);if($n(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Vt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Vt(i,o)}}function xc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Wo(i,n);for(let[s,a]of Object.entries(o)){if(xe(a))continue;$n(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Pc(e,t){let r={},n=t.getComputedFields(),i=Jo(e,n);for(let[o,s]of Object.entries(i)){if(xe(s))continue;let a=t.nestSelection(o);$n(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||xe(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Vt({},a):r[o]=!0;continue}r[o]=Vt(s,a)}}return r}function Zo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(nt(e)){if(Rr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ko(e))return{$type:"Param",value:e.name};if(ct(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return vc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Tc(e))return e.values;if(it(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ce){if(e!==Nr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Ac(e))return e.toJSON();if(typeof e=="object")return Xo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Xo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);xe(i)||(i!==void 0?r[n]=Zo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Yo}))}return r}function vc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[_e(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:ve(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();u();c();p();m();function es(e){if(!e._hasPreviewFlag("metrics"))throw new X("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var dt=class{_client;constructor(t){this._client=t}prometheus(t){return es(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return es(this._client),this._client._engine.metrics({format:"json",...t})}};d();u();c();p();m();function ts(e,t){let r=Ot(()=>Cc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Cc(e){return{datamodel:{models:Vn(e.models),enums:Vn(e.enums),types:Vn(e.types)}}}function Vn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();u();c();p();m();var jn=new WeakMap,jr="$$PrismaTypedSql",jt=class{constructor(t,r){jn.set(this,{sql:t,values:r}),Object.defineProperty(this,jr,{value:jr})}get sql(){return jn.get(this).sql}get values(){return jn.get(this).values}};function rs(e){return(...t)=>new jt(e,t)}function Gr(e){return e!=null&&e[jr]===jr}d();u();c();p();m();var Ea=Ue(Tn());d();u();c();p();m();ns();Wi();Yi();d();u();c();p();m();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}d();u();c();p();m();d();u();c();p();m();var Jr={enumerable:!0,configurable:!0,writable:!0};function Wr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Jr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ss=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=Rc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=as(Reflect.ownKeys(o),r),a=as(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Jr,...l?.getPropertyDescriptor(s)}:Jr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[ss]=function(){let o={...this};return delete o[ss],o},i}function Rc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function as(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}d();u();c();p();m();function ft(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();u();c();p();m();function Kr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();u();c();p();m();function ls(e){if(e===void 0)return"";let t=pt(e);return new ot(0,{colors:Dr}).write(t).toString()}d();u();c();p();m();var Sc="P2037";function Hr({error:e,user_facing_error:t},r,n){return t.error_code?new ne(kc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ie(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function kc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Sc&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Jn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Jn}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var us={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function gt(e={}){let t=Oc(e);return Object.entries(t).reduce((n,[i,o])=>(us[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Oc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function zr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function cs(e,t){let r=zr(e);return t({action:"aggregate",unpacker:r,argsMapper:gt})(e)}d();u();c();p();m();function Dc(e={}){let{select:t,...r}=e;return typeof t=="object"?gt({...r,_count:t}):gt({...r,_count:{_all:!0}})}function Mc(e={}){return typeof e.select=="object"?t=>zr(e)(t)._count:t=>zr(e)(t)._count._all}function ps(e,t){return t({action:"count",unpacker:Mc(e),argsMapper:Dc})(e)}d();u();c();p();m();function _c(e={}){let t=gt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Nc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ms(e,t){return t({action:"groupBy",unpacker:Nc(e),argsMapper:_c})(e)}function ds(e,t,r){if(t==="aggregate")return n=>cs(n,r);if(t==="count")return n=>ps(n,r);if(t==="groupBy")return n=>ms(n,r)}d();u();c();p();m();function fs(e,t){let r=t.fields.filter(i=>!i.relationName),n=Ao(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ft(e,o,s.type,s.isList,s.kind==="enum")},...Wr(Object.keys(n))})}d();u();c();p();m();d();u();c();p();m();var gs=e=>Array.isArray(e)?e:e.split("."),Wn=(e,t)=>gs(t).reduce((r,n)=>r&&r[n],e),hs=(e,t,r)=>gs(t).reduceRight((n,i,o,s)=>Object.assign({},Wn(e,s.slice(0,o)),{[i]:n}),r);function Fc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Lc(e,t,r){return t===void 0?e??{}:hs(t,r,e||!0)}function Kn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,f)=>({...l,[f.name]:f}),{});return l=>{let f=Fe(e._errorFormat),g=Fc(n,i),h=Lc(l,o,g),T=r({dataPath:g,callsite:f})(h),k=Uc(e,t);return new Proxy(T,{get(C,S){if(!k.includes(S))return C[S];let _=[a[S].type,r,S],B=[g,h];return Kn(e,..._,...B)},...Wr([...k,...Object.getOwnPropertyNames(T)])})}}function Uc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var Bc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],qc=["aggregate","count","groupBy"];function Hn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[$c(e,t),jc(e,t),Gt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return me({},n)}function $c(e,t){let r=be(t),n=Object.keys(Dt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let f=Fe(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:f};return e._request({...h,...a})},{action:o,args:l,model:t})};return Bc.includes(o)?Kn(e,t,s):Vc(i)?ds(e,i,s):s({})}}}function Vc(e){return qc.includes(e)}function jc(e,t){return $e(te("fields",()=>{let r=e._runtimeDataModel.models[t];return fs(t,r)}))}d();u();c();p();m();function ys(e){return e.replace(/^./,t=>t.toUpperCase())}var zn=Symbol();function Qt(e){let t=[Gc(e),Qc(e),te(zn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Gt(r)),me(e,t)}function Gc(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Qc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(be),n=[...new Set(t.concat(r))];return $e({getKeys(){return n},getPropertyValue(i){let o=ys(i);if(e._runtimeDataModel.models[o]!==void 0)return Hn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Hn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ws(e){return e[zn]?e[zn]:e}function Es(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Qt(t)}d();u();c();p();m();d();u();c();p();m();function bs({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let f=l.needs.filter(g=>n[g]);f.length>0&&a.push(ft(f))}else if(r){if(!r[l.name])continue;let f=l.needs.filter(g=>!r[g]);f.length>0&&a.push(ft(f))}Jc(e,l.needs)&&s.push(Wc(l,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function Jc(e,t){return t.every(r=>Rn(e,r))}function Wc(e,t){return $e(te(e.name,()=>e.compute(t)))}d();u();c();p();m();function Yr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let f=typeof s=="object"?s:{};t[o]=Yr({visitor:i,result:t[o],args:f,modelName:l.type,runtimeDataModel:n})}}function Ps({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Yr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,f)=>{let g=be(l);return bs({result:a,modelName:g,select:f.select,omit:f.select?void 0:{...o?.[g],...f.omit},extensions:n})}})}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Kc=["$connect","$disconnect","$on","$transaction","$use","$extends"],vs=Kc;function Ts(e){if(e instanceof se)return Hc(e);if(Gr(e))return zc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Ts(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Is(o,l),a.args=s,Cs(e,a,r,n+1)}})})}function Rs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Cs(e,t,s)}function Ss(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ks(r,n,0,e):e(r)}}function ks(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Is(i,l),ks(a,t,r+1,n)}})}var As=e=>e;function Is(e=As,t=As){return r=>e(t(r))}d();u();c();p();m();var Os=z("prisma:client"),Ds={Vercel:"vercel","Netlify CI":"netlify"};function Ms({postinstall:e,ciName:t,clientVersion:r}){if(Os("checkPlatformCaching:postinstall",e),Os("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ds){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Ds[t]}-build`;throw console.error(n),new J(n,r)}}d();u();c();p();m();function _s(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();u();c();p();m();d();u();c();p();m();var Yc=()=>globalThis.process?.release?.name==="node",Zc=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Xc=()=>!!globalThis.Deno,ep=()=>typeof globalThis.Netlify=="object",tp=()=>typeof globalThis.EdgeRuntime=="object",rp=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function np(){return[[ep,"netlify"],[tp,"edge-light"],[rp,"workerd"],[Xc,"deno"],[Zc,"bun"],[Yc,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var ip={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Zr(){let e=np();return{id:e,prettyName:ip[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();u();c();p();m();var Ns="6.13.0";d();u();c();p();m();d();u();c();p();m();function ht({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Zr().id==="workerd"?new J(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new J(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new J("error: Missing URL environment variable, value, or override.",n);return i}d();u();c();p();m();d();u();c();p();m();d();u();c();p();m();var Xr=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ae=class extends Xr{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};d();u();c();p();m();function U(e,t){return{...e,isRetryable:t}}var Ve=class extends ae{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,U(r,!1))}};F(Ve,"InvalidDatasourceError");function Fs(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=ht({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof y<"u"?y.env:{}}}),i;try{i=new URL(n)}catch{throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==yr)throw new Ve(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new Ve(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let l=An(i)?"http:":"https:",f=new URL(i.href.replace(o,l));return{apiKey:a,url:f}}d();u();c();p();m();var Ls=Ue(Xi()),en=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Ls.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};d();u();c();p();m();function sp(e){return e[0]*1e3+e[1]/1e6}function Yn(e){return new Date(sp(e))}d();u();c();p();m();d();u();c();p();m();var yt=class extends ae{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",U(t,!0))}};F(yt,"ForcedRetryError");d();u();c();p();m();var je=class extends ae{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,U(r,!1))}};F(je,"NotImplementedYetError");d();u();c();p();m();d();u();c();p();m();var G=class extends ae{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ge=class extends G{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",U(t,!0))}};F(Ge,"SchemaMissingError");d();u();c();p();m();d();u();c();p();m();var Zn="This request could not be understood by the server",Wt=class extends G{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Zn,U(t,!1)),n&&(this.code=n)}};F(Wt,"BadRequestError");d();u();c();p();m();var Kt=class extends G{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",U(t,!0)),this.logs=r}};F(Kt,"HealthcheckTimeoutError");d();u();c();p();m();var Ht=class extends G{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,U(t,!0)),this.logs=n}};F(Ht,"EngineStartupError");d();u();c();p();m();var zt=class extends G{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",U(t,!1))}};F(zt,"EngineVersionNotSupportedError");d();u();c();p();m();var Xn="Request timed out",Yt=class extends G{name="GatewayTimeoutError";code="P5009";constructor(t,r=Xn){super(r,U(t,!1))}};F(Yt,"GatewayTimeoutError");d();u();c();p();m();var ap="Interactive transaction error",Zt=class extends G{name="InteractiveTransactionError";code="P5015";constructor(t,r=ap){super(r,U(t,!1))}};F(Zt,"InteractiveTransactionError");d();u();c();p();m();var lp="Request parameters are invalid",Xt=class extends G{name="InvalidRequestError";code="P5011";constructor(t,r=lp){super(r,U(t,!1))}};F(Xt,"InvalidRequestError");d();u();c();p();m();var ei="Requested resource does not exist",er=class extends G{name="NotFoundError";code="P5003";constructor(t,r=ei){super(r,U(t,!1))}};F(er,"NotFoundError");d();u();c();p();m();var ti="Unknown server error",wt=class extends G{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||ti,U(t,!0)),this.logs=n}};F(wt,"ServerError");d();u();c();p();m();var ri="Unauthorized, check your connection string",tr=class extends G{name="UnauthorizedError";code="P5007";constructor(t,r=ri){super(r,U(t,!1))}};F(tr,"UnauthorizedError");d();u();c();p();m();var ni="Usage exceeded, retry again later",rr=class extends G{name="UsageExceededError";code="P5008";constructor(t,r=ni){super(r,U(t,!0))}};F(rr,"UsageExceededError");async function up(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function nr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await up(e);if(n.type==="QueryEngineError")throw new ne(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new wt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new zt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Ht(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new J(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Kt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Zt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Xt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new tr(r,Et(ri,n));if(e.status===404)return new er(r,Et(ei,n));if(e.status===429)throw new rr(r,Et(ni,n));if(e.status===504)throw new Yt(r,Et(Xn,n));if(e.status>=500)throw new wt(r,Et(ti,n));if(e.status>=400)throw new Wt(r,Et(Zn,n))}function Et(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();u();c();p();m();function Us(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();u();c();p();m();var Re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Bs(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,f,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,f=g&63,r+=Re[s]+Re[a]+Re[l]+Re[f];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Re[s]+Re[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Re[s]+Re[a]+Re[l]+"="),r}d();u();c();p();m();function qs(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new J("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();u();c();p();m();var $s={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();u();c();p();m();d();u();c();p();m();var ir=class extends ae{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: -${t}`,U(r,!0))}};F(ir,"RequestError");async function Qe(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new ir(a,{clientVersion:n,cause:s})}}var pp=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Vs=z("prisma:client:dataproxyEngine");async function mp(e,t){let r=$s["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&pp.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,l,f]=s.split("."),g=dp(`<=${a}.${l}.${f}`),h=await Qe(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let T=await h.text();Vs("length of body fetched from unpkg.com",T.length);let k;try{k=JSON.parse(T)}catch(C){throw console.error("JSON.parse error: body fetched from unpkg.com: ",T),C}return k.version}throw new je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function js(e,t){let r=await mp(e,t);return Vs("version",r),r}function dp(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Gs=3,or=z("prisma:client:dataproxyEngine"),bt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){qs(t),this.config=t,this.env=t.env,this.inlineSchema=Bs(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new en({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await js(this.host,this.config),or("host",this.host),or("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":or(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Yn(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Yn(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Qe(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||or("schema response status",r.status);let n=await nr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Kr(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||or("graphql response status",a.status),await this.handleError(await nr(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Qe(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await nr(l,this.clientVersion));let f=await l.json(),{extensions:g}=f;g&&this.propagateResponseExtensions(g);let h=f.id,T=f["data-proxy"].endpoint;return{id:h,payload:{endpoint:T}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await nr(a,this.clientVersion));let l=await a.json(),{extensions:f}=l;f&&this.propagateResponseExtensions(f);return}}})}getURLAndAPIKey(){return Fs({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new je("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ae)||!i.isRetryable)throw i;if(r>=Gs)throw i instanceof yt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Gs} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Us(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new yt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?Hr(t[0],this.config.clientVersion,this.config.activeProvider):new ie(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};d();u();c();p();m();function Qs({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=S=>{i.push({_tag:"warning",value:S})},a=S=>{let M=S.join(` -`);o.push({_tag:"error",value:M})},l=!!e?.startsWith("prisma://"),f=wr(e),g=!!t,h=l||f;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let k={accelerate:T,ppg:f,driverAdapters:g};function C(S){return S.length>0}return C(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:k}:{ok:!0,diagnostics:{warnings:i},isUsing:k}}function Js({copyEngine:e=!0},t){let r;try{r=ht({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Qs({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"edge"});for(let h of o.warnings)kt(...h.value);if(!n){let h=o.errors[0];throw new X(h.value,{clientVersion:t.clientVersion})}let s=Ze(t.generator),a=s==="library",l=s==="binary",f=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new bt(t):(i.driverAdapters,i.accelerate,new bt(t))}d();u();c();p();m();function tn({generator:e}){return e?.previewFeatures??[]}d();u();c();p();m();var Ws=e=>({command:e});d();u();c();p();m();d();u();c();p();m();var Ks=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();u();c();p();m();function xt(e){try{return Hs(e,"fast")}catch{return Hs(e,"slow")}}function Hs(e,t){return JSON.stringify(e.map(r=>Ys(r,t)))}function Ys(e,t){if(Array.isArray(e))return e.map(r=>Ys(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(nt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ye.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(fp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Zs(e):e}function fp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Zs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(zs);let t={};for(let r of Object.keys(e))t[r]=zs(e[r]);return t}function zs(e){return typeof e=="bigint"?e.toString():Zs(e)}var gp=/^(\s*alter\s)/i,Xs=z("prisma:client");function ii(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&gp.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var oi=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Gr(r))n=r.sql,i={values:xt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:xt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:xt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:xt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ks(r),i={values:xt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Xs(`prisma.${e}(${n}, ${i.values})`):Xs(`prisma.${e}(${n})`),{query:n,parameters:i}},ea={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},ta={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();u();c();p();m();function si(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=ra(r(s)):ra(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function ra(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();u();c();p();m();var hp=vn.split(".")[0],yp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ai=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${hp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??yp}};function na(){return new ai}d();u();c();p();m();function ia(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}d();u();c();p();m();function oa(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();u();c();p();m();var rn=class{_middlewares=[];use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();u();c();p();m();var aa=Ue(ao());d();u();c();p();m();function nn(e){return typeof e.batchRequestIdx=="number"}d();u();c();p();m();function sa(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(li(e.query.arguments)),t.push(li(e.query.selection)),t.join("")}function li(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${li(n)})`:r}).join(" ")})`}d();u();c();p();m();var wp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ui(e){return wp[e]}d();u();c();p();m();var on=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iJe("bigint",r));case"bytes-array":return t.map(r=>Je("bytes",r));case"decimal-array":return t.map(r=>Je("decimal",r));case"datetime-array":return t.map(r=>Je("datetime",r));case"date-array":return t.map(r=>Je("date",r));case"time-array":return t.map(r=>Je("time",r));default:return t}}function sn(e){let t=[],r=Ep(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),f=n.some(h=>ui(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:xp(o),containsWrite:f,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(k){return k}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?la(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ui(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:sa(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(bp(t),Pp(t,i))throw t;if(t instanceof ne&&vp(t)){let f=ua(t.meta);Ur({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Sr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new ne(l,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Te(l,this.client._clientVersion);if(t instanceof ie)throw new ie(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof J)throw new J(l,this.client._clientVersion);if(t instanceof Te)throw new Te(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,aa.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(f=>f!=="select"&&f!=="include"),a=Wn(o,s),l=i==="queryRaw"?sn(a):rt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function xp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:la(e)};ve(e,"Unknown transaction kind")}}function la(e){return{id:e.id,payload:e.payload}}function Pp(e,t){return nn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function vp(e){return e.code==="P2009"||e.code==="P2012"}function ua(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(ua)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();u();c();p();m();var ca=Ns;d();u();c();p();m();var ga=Ue(Nn());d();u();c();p();m();var q=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};F(q,"PrismaClientConstructorValidationError");var pa=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ma=["pretty","colorless","minimal"],da=["info","query","warn","error"],Tp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Pt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&Ze(t.generator)==="client")throw new q('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!tn(t).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ze(t.generator)==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!ma.includes(e)){let t=Pt(e,ma);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!da.includes(r)){let n=Pt(r,da);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Pt(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new q('"omit" option is expected to be an object.');if(e===null)throw new q('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Cp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(f=>f.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new q(Rp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Pt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ha(e,t){for(let[r,n]of Object.entries(e)){if(!pa.includes(r)){let i=Pt(r,pa);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Tp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Pt(e,t){if(t.length===0||typeof e!="string")return"";let r=Ap(e,t);return r?` Did you mean "${r}"?`:""}function Ap(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ga.default)(e,i)}));r.sort((i,o)=>i.distance_e(n)===t);if(r)return e[r]}function Rp(e,t){let r=pt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Lr(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}d();u();c();p();m();function ya(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=f=>{o||(o=!0,r(f))};for(let f=0;f{n[f]=g,a()},g=>{if(!nn(g)){l(g);return}g.batchRequestIdx===f?l(g):(i||(i=g),a())})})}var Le=z("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Sp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},kp=Symbol.for("prisma.client.transaction.id"),Ip={id:0,nextId(){return++this.id}};function ba(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new rn;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=si();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Ms(e),n&&ha(n,e);let i=new Qr().on("error",()=>{});this._extensions=mt.empty(),this._previewFeatures=tn(e),this._clientVersion=e.clientVersion??ca,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=na();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&gr.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&gr.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new J(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new J("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},f=l.__internal??{},g=f.debug===!0;g&&z.enable("prisma:client");let h=gr.resolve(e.dirname,e.relativePath);Ji.existsSync(h)||(h=e.dirname),Le("dirname",e.dirname),Le("relativePath",e.relativePath),Le("cwd",h);let T=f.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&oa(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(k=>typeof k=="string"?k==="query":k.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:_s(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ht,getBatchRequestPayload:Kr,prismaGraphQLToJSError:Hr,PrismaClientUnknownRequestError:ie,PrismaClientInitializationError:J,PrismaClientKnownRequestError:ne,debug:z("prisma:client:accelerateEngine"),engineVersion:Ea.version,clientVersion:e.clientVersion}},Le("clientVersion",e.clientVersion),this._engine=Js(e,this._engineConfig),this._requestHandler=new an(this,i),l.log)for(let k of l.log){let C=typeof k=="string"?k:k.emit==="stdout"?k.level:null;C&&this.$on(C,S=>{St.log(`${St.tags[C]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Qi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:oi({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=wa(n,i);return ii(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new X("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(ii(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new X(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ws,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:oi({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...wa(n,i));throw new X("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new X("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Ip.nextId(),s=ia(n.length),a=n.map((l,f)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:f,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ya(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let f={kind:"itx",...a};l=await n(this._createItxClient(f)),await this._engine.transaction("commit",o,a)}catch(f){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),f}return l}_createItxClient(n){return me(Qt(me(ws(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>si(n)),te(kp,()=>n.id)])),[ft(vs)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Sp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async f=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,M=>g(f,_=>(M?.end(),l(_))));let{runInTransaction:h,args:T,...k}=f,C={...n,...k};T&&(C.args=i.middlewareArgsToRequestArgs(T)),n.transaction!==void 0&&h===!1&&delete C.transaction;let S=await Rs(this,C);return C.model?Ps({result:S,modelName:C.model,args:C.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:f,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:k}){try{n=f?f(n):n;let C={name:"serialize"},S=this._tracingHelper.runInChildSpan(C,()=>Vr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return z.enabled("prisma:client")&&(Le("Prisma Client call:"),Le(`prisma.${i}(${ls(n)})`),Le("Generated request:"),Le(JSON.stringify(S,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:k})}catch(C){throw C.clientVersion=this._clientVersion,C}}$metrics=new dt(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Es}return t}function wa(e,t){return Op(e)?[new se(e,t),ea]:[e,ta]}function Op(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();u();c();p();m();var Dp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function xa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Dp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();u();c();p();m();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=edge.js.map diff --git a/backend/generated/prisma/runtime/index-browser.d.ts b/backend/generated/prisma/runtime/index-browser.d.ts deleted file mode 100644 index d11f410..0000000 --- a/backend/generated/prisma/runtime/index-browser.d.ts +++ /dev/null @@ -1,370 +0,0 @@ -declare class AnyNull extends NullTypesEnumValue { - #private; -} - -declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} ? T[symbol]['types']['operations'][F]['args'] : any; - -declare class DbNull extends NullTypesEnumValue { - #private; -} - -export declare function Decimal(n: Decimal.Value): Decimal; - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine() : Decimal; - sin() : Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent() : Decimal; - tan() : Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value) : Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -declare type Exact = (A extends unknown ? (W extends A ? { - [K in keyof A]: Exact; -} : W) : never) | (A extends Narrowable ? A : never); - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: RuntimeName; - prettyName: string; - isEdge: boolean; -}; - -declare class JsonNull extends NullTypesEnumValue { - #private; -} - -/** - * Generates more strict variant of an enum which, unlike regular enum, - * throws on non-existing property access. This can be useful in following situations: - * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input - * - enum values are generated dynamically from DMMF. - * - * In that case, if using normal enums and no compile-time typechecking, using non-existing property - * will result in `undefined` value being used, which will be accepted. Using strict enum - * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. - * - * Note: if you need to check for existence of a value in the enum you can still use either - * `in` operator or `hasOwnProperty` function. - * - * @param definition - * @returns - */ -export declare function makeStrictEnum>(definition: T): T; - -declare type Narrowable = string | number | bigint | boolean | []; - -declare class NullTypesEnumValue extends ObjectEnumValue { - _getNamespace(): string; -} - -/** - * Base class for unique values of object-valued enums. - */ -declare abstract class ObjectEnumValue { - constructor(arg?: symbol); - abstract _getNamespace(): string; - _getName(): string; - toString(): string; -} - -export declare const objectEnumValues: { - classes: { - DbNull: typeof DbNull; - JsonNull: typeof JsonNull; - AnyNull: typeof AnyNull; - }; - instances: { - DbNull: DbNull; - JsonNull: JsonNull; - AnyNull: AnyNull; - }; -}; - -declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; - -declare namespace Public { - export { - validator - } -} -export { Public } - -declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | ''; - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; - -declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -export { } diff --git a/backend/generated/prisma/runtime/index-browser.js b/backend/generated/prisma/runtime/index-browser.js deleted file mode 100644 index 373ada9..0000000 --- a/backend/generated/prisma/runtime/index-browser.js +++ /dev/null @@ -1,16 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -"use strict";var pe=Object.defineProperty;var Xe=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var Qe=Object.prototype.hasOwnProperty;var Ye=e=>{throw TypeError(e)};var Oe=(e,n)=>{for(var i in n)pe(e,i,{get:n[i],enumerable:!0})},xe=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ke(n))!Qe.call(e,r)&&r!==i&&pe(e,r,{get:()=>n[r],enumerable:!(t=Xe(n,r))||t.enumerable});return e};var ze=e=>xe(pe({},"__esModule",{value:!0}),e);var ne=(e,n,i)=>n.has(e)?Ye("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,i);var ii={};Oe(ii,{Decimal:()=>Je,Public:()=>ge,getRuntime:()=>_e,makeStrictEnum:()=>qe,objectEnumValues:()=>Ae});module.exports=ze(ii);var ge={};Oe(ge,{validator:()=>Re});function Re(...e){return n=>n}var ie=Symbol(),me=new WeakMap,we=class{constructor(n){n===ie?me.set(this,"Prisma.".concat(this._getName())):me.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return me.get(this)}},G=class extends we{_getNamespace(){return"NullTypes"}},Ne,J=class extends G{constructor(){super(...arguments);ne(this,Ne)}};Ne=new WeakMap;ke(J,"DbNull");var ve,X=class extends G{constructor(){super(...arguments);ne(this,ve)}};ve=new WeakMap;ke(X,"JsonNull");var Ee,K=class extends G{constructor(){super(...arguments);ne(this,Ee)}};Ee=new WeakMap;ke(K,"AnyNull");var Ae={classes:{DbNull:J,JsonNull:X,AnyNull:K},instances:{DbNull:new J(ie),JsonNull:new X(ie),AnyNull:new K(ie)}};function ke(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var ye=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function qe(e){return new Proxy(e,{get(n,i){if(i in n)return n[i];if(!ye.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var en=()=>{var e,n;return((n=(e=globalThis.process)==null?void 0:e.release)==null?void 0:n.name)==="node"},nn=()=>{var e,n;return!!globalThis.Bun||!!((n=(e=globalThis.process)==null?void 0:e.versions)!=null&&n.bun)},tn=()=>!!globalThis.Deno,rn=()=>typeof globalThis.Netlify=="object",sn=()=>typeof globalThis.EdgeRuntime=="object",on=()=>{var e;return((e=globalThis.navigator)==null?void 0:e.userAgent)==="Cloudflare-Workers"};function un(){var i;return(i=[[rn,"netlify"],[sn,"edge-light"],[on,"workerd"],[tn,"deno"],[nn,"bun"],[en,"node"]].flatMap(t=>t[0]()?[t[1]]:[]).at(0))!=null?i:""}var fn={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function _e(){let e=un();return{id:e,prettyName:fn[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var V=9e15,H=1e9,Se="0123456789abcdef",se="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",oe="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Me={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-V,maxE:V,crypto:!1},Le,Z,w=!0,fe="[DecimalError] ",$=fe+"Invalid argument: ",Ie=fe+"Precision limit exceeded",Ze=fe+"crypto unavailable",Ue="[object Decimal]",R=Math.floor,C=Math.pow,cn=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ln=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,an=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Be=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,m=7,dn=9007199254740991,hn=se.length-1,Ce=oe.length-1,h={toStringTag:Ue};h.absoluteValue=h.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};h.ceil=function(){return p(new this.constructor(this),this.e+1,2)};h.clampedTo=h.clamp=function(e,n){var i,t=this,r=t.constructor;if(e=new r(e),n=new r(n),!e.s||!n.s)return new r(NaN);if(e.gt(n))throw Error($+n);return i=t.cmp(e),i<0?e:t.cmp(n)>0?n:new r(t)};h.comparedTo=h.cmp=function(e){var n,i,t,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,c=s.s,f=e.s;if(!o||!u)return!c||!f?NaN:c!==f?c:o===u?0:!o^c<0?1:-1;if(!o[0]||!u[0])return o[0]?c:u[0]?-f:0;if(c!==f)return c;if(s.e!==e.e)return s.e>e.e^c<0?1:-1;for(t=o.length,r=u.length,n=0,i=tu[n]^c<0?1:-1;return t===r?0:t>r^c<0?1:-1};h.cosine=h.cos=function(){var e,n,i=this,t=i.constructor;return i.d?i.d[0]?(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=pn(t,We(t,i)),t.precision=e,t.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new t(1):new t(NaN)};h.cubeRoot=h.cbrt=function(){var e,n,i,t,r,s,o,u,c,f,l=this,a=l.constructor;if(!l.isFinite()||l.isZero())return new a(l);for(w=!1,s=l.s*C(l.s*l,1/3),!s||Math.abs(s)==1/0?(i=b(l.d),e=l.e,(s=(e-i.length+1)%3)&&(i+=s==1||s==-2?"0":"00"),s=C(i,1/3),e=R((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?i="5e"+e:(i=s.toExponential(),i=i.slice(0,i.indexOf("e")+1)+e),t=new a(i),t.s=l.s):t=new a(s.toString()),o=(e=a.precision)+3;;)if(u=t,c=u.times(u).times(u),f=c.plus(l),t=k(f.plus(l).times(u),f.plus(c),o+2,1),b(u.d).slice(0,o)===(i=b(t.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!r&&i=="4999"){if(!r&&(p(u,e+1,0),u.times(u).times(u).eq(l))){t=u;break}o+=4,r=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(t,e+1,1),n=!t.times(t).times(t).eq(l));break}return w=!0,p(t,e,a.rounding,n)};h.decimalPlaces=h.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-R(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};h.dividedBy=h.div=function(e){return k(this,new this.constructor(e))};h.dividedToIntegerBy=h.divToInt=function(e){var n=this,i=n.constructor;return p(k(n,new i(e),0,1,1),i.precision,i.rounding)};h.equals=h.eq=function(e){return this.cmp(e)===0};h.floor=function(){return p(new this.constructor(this),this.e+1,3)};h.greaterThan=h.gt=function(e){return this.cmp(e)>0};h.greaterThanOrEqualTo=h.gte=function(e){var n=this.cmp(e);return n==1||n===0};h.hyperbolicCosine=h.cosh=function(){var e,n,i,t,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;i=o.precision,t=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),n=(1/le(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),s=j(o,1,s.times(n),new o(1),!0);for(var c,f=e,l=new o(8);f--;)c=s.times(s),s=u.minus(c.times(l.minus(c.times(l))));return p(s,o.precision=i,o.rounding=t,!0)};h.hyperbolicSine=h.sinh=function(){var e,n,i,t,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(r.e,r.sd())+4,s.rounding=1,t=r.d.length,t<3)r=j(s,2,r,r,!0);else{e=1.4*Math.sqrt(t),e=e>16?16:e|0,r=r.times(1/le(5,e)),r=j(s,2,r,r,!0);for(var o,u=new s(5),c=new s(16),f=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(c.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(r,n,i,!0)};h.hyperbolicTangent=h.tanh=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+7,t.rounding=1,k(i.sinh(),i.cosh(),t.precision=e,t.rounding=n)):new t(i.s)};h.inverseCosine=h.acos=function(){var e=this,n=e.constructor,i=e.abs().cmp(1),t=n.precision,r=n.rounding;return i!==-1?i===0?e.isNeg()?F(n,t,r):new n(0):new n(NaN):e.isZero()?F(n,t+4,r).times(.5):(n.precision=t+6,n.rounding=1,e=new n(1).minus(e).div(e.plus(1)).sqrt().atan(),n.precision=t,n.rounding=r,e.times(2))};h.inverseHyperbolicCosine=h.acosh=function(){var e,n,i=this,t=i.constructor;return i.lte(1)?new t(i.eq(1)?0:NaN):i.isFinite()?(e=t.precision,n=t.rounding,t.precision=e+Math.max(Math.abs(i.e),i.sd())+4,t.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln()):new t(i)};h.inverseHyperbolicSine=h.asinh=function(){var e,n,i=this,t=i.constructor;return!i.isFinite()||i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,t.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln())};h.inverseHyperbolicTangent=h.atanh=function(){var e,n,i,t,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,n=s.rounding,t=r.sd(),Math.max(t,e)<2*-r.e-1?p(new s(r),e,n,!0):(s.precision=i=t-r.e,r=k(r.plus(1),new s(1).minus(r),i+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=n,r.times(.5))):new s(NaN)};h.inverseSine=h.asin=function(){var e,n,i,t,r=this,s=r.constructor;return r.isZero()?new s(r):(n=r.abs().cmp(1),i=s.precision,t=s.rounding,n!==-1?n===0?(e=F(s,i+4,t).times(.5),e.s=r.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=t,r.times(2)))};h.inverseTangent=h.atan=function(){var e,n,i,t,r,s,o,u,c,f=this,l=f.constructor,a=l.precision,d=l.rounding;if(f.isFinite()){if(f.isZero())return new l(f);if(f.abs().eq(1)&&a+4<=Ce)return o=F(l,a+4,d).times(.25),o.s=f.s,o}else{if(!f.s)return new l(NaN);if(a+4<=Ce)return o=F(l,a+4,d).times(.5),o.s=f.s,o}for(l.precision=u=a+10,l.rounding=1,i=Math.min(28,u/m+2|0),e=i;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(w=!1,n=Math.ceil(u/m),t=1,c=f.times(f),o=new l(f),r=f;e!==-1;)if(r=r.times(c),s=o.minus(r.div(t+=2)),r=r.times(c),o=s.plus(r.div(t+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2};h.isNaN=function(){return!this.s};h.isNegative=h.isNeg=function(){return this.s<0};h.isPositive=h.isPos=function(){return this.s>0};h.isZero=function(){return!!this.d&&this.d[0]===0};h.lessThan=h.lt=function(e){return this.cmp(e)<0};h.lessThanOrEqualTo=h.lte=function(e){return this.cmp(e)<1};h.logarithm=h.log=function(e){var n,i,t,r,s,o,u,c,f=this,l=f.constructor,a=l.precision,d=l.rounding,g=5;if(e==null)e=new l(10),n=!0;else{if(e=new l(e),i=e.d,e.s<0||!i||!i[0]||e.eq(1))return new l(NaN);n=e.eq(10)}if(i=f.d,f.s<0||!i||!i[0]||f.eq(1))return new l(i&&!i[0]?-1/0:f.s!=1?NaN:i?0:1/0);if(n)if(i.length>1)s=!0;else{for(r=i[0];r%10===0;)r/=10;s=r!==1}if(w=!1,u=a+g,o=B(f,u),t=n?ue(l,u+10):B(e,u),c=k(o,t,u,1),Q(c.d,r=a,d))do if(u+=10,o=B(f,u),t=n?ue(l,u+10):B(e,u),c=k(o,t,u,1),!s){+b(c.d).slice(r+1,r+15)+1==1e14&&(c=p(c,a+1,0));break}while(Q(c.d,r+=10,d));return w=!0,p(c,a,d)};h.minus=h.sub=function(e){var n,i,t,r,s,o,u,c,f,l,a,d,g=this,v=g.constructor;if(e=new v(e),!g.d||!e.d)return!g.s||!e.s?e=new v(NaN):g.d?e.s=-e.s:e=new v(e.d||g.s!==e.s?g:NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=g.d,d=e.d,u=v.precision,c=v.rounding,!f[0]||!d[0]){if(d[0])e.s=-e.s;else if(f[0])e=new v(g);else return new v(c===3?-0:0);return w?p(e,u,c):e}if(i=R(e.e/m),l=R(g.e/m),f=f.slice(),s=l-i,s){for(a=s<0,a?(n=f,s=-s,o=d.length):(n=d,i=l,o=f.length),t=Math.max(Math.ceil(u/m),o)+2,s>t&&(s=t,n.length=1),n.reverse(),t=s;t--;)n.push(0);n.reverse()}else{for(t=f.length,o=d.length,a=t0;--t)f[o++]=0;for(t=d.length;t>s;){if(f[--t]o?s+1:o+1,r>o&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for(o=f.length,r=l.length,o-r<0&&(r=o,i=l,l=f,f=i),n=0;r;)n=(f[--r]=f[r]+l[r]+n)/D|0,f[r]%=D;for(n&&(f.unshift(n),++t),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ce(f,t),w?p(e,u,c):e};h.precision=h.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($+e);return i.d?(n=$e(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};h.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};h.sine=h.sin=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=mn(t,We(t,i)),t.precision=e,t.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new t(NaN)};h.squareRoot=h.sqrt=function(){var e,n,i,t,r,s,o=this,u=o.d,c=o.e,f=o.s,l=o.constructor;if(f!==1||!u||!u[0])return new l(!f||f<0&&(!u||u[0])?NaN:u?o:1/0);for(w=!1,f=Math.sqrt(+o),f==0||f==1/0?(n=b(u),(n.length+c)%2==0&&(n+="0"),f=Math.sqrt(n),c=R((c+1)/2)-(c<0||c%2),f==1/0?n="5e"+c:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+c),t=new l(n)):t=new l(f.toString()),i=(c=l.precision)+3;;)if(s=t,t=s.plus(k(o,s,i+2,1)).times(.5),b(s.d).slice(0,i)===(n=b(t.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!r&&n=="4999"){if(!r&&(p(s,c+1,0),s.times(s).eq(o))){t=s;break}i+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(t,c+1,1),e=!t.times(t).eq(o));break}return w=!0,p(t,c,l.rounding,e)};h.tangent=h.tan=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+10,t.rounding=1,i=i.sin(),i.s=1,i=k(i,new t(1).minus(i.times(i)).sqrt(),e+10,0),t.precision=e,t.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new t(NaN)};h.times=h.mul=function(e){var n,i,t,r,s,o,u,c,f,l=this,a=l.constructor,d=l.d,g=(e=new a(e)).d;if(e.s*=l.s,!d||!d[0]||!g||!g[0])return new a(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:!d||!g?e.s/0:e.s*0);for(i=R(l.e/m)+R(e.e/m),c=d.length,f=g.length,c=0;){for(n=0,r=c+t;r>t;)u=s[r]+g[t]*d[r-t-1]+n,s[r--]=u%D|0,n=u/D|0;s[r]=(s[r]+n)%D|0}for(;!s[--o];)s.pop();return n?++i:s.shift(),e.d=s,e.e=ce(s,i),w?p(e,a.precision,a.rounding):e};h.toBinary=function(e,n){return Pe(this,2,e,n)};h.toDecimalPlaces=h.toDP=function(e,n){var i=this,t=i.constructor;return i=new t(i),e===void 0?i:(q(e,0,H),n===void 0?n=t.rounding:q(n,0,8),p(i,e+i.e+1,n))};h.toExponential=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=L(t,!0):(q(e,0,H),n===void 0?n=r.rounding:q(n,0,8),t=p(new r(t),e+1,n),i=L(t,!0,e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toFixed=function(e,n){var i,t,r=this,s=r.constructor;return e===void 0?i=L(r):(q(e,0,H),n===void 0?n=s.rounding:q(n,0,8),t=p(new s(r),e+r.e+1,n),i=L(t,!1,e+t.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};h.toFraction=function(e){var n,i,t,r,s,o,u,c,f,l,a,d,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),t=c=new N(0),n=new N(t),s=n.e=$e(v)-g.e-1,o=s%m,n.d[0]=C(10,o<0?m+o:o),e==null)e=s>0?n:f;else{if(u=new N(e),!u.isInt()||u.lt(f))throw Error($+u);e=u.gt(n)?s>0?n:f:u}for(w=!1,u=new N(b(v)),l=N.precision,N.precision=s=v.length*m*2;a=k(u,n,0,1,1),r=i.plus(a.times(t)),r.cmp(e)!=1;)i=t,t=r,r=f,f=c.plus(a.times(r)),c=r,r=n,n=u.minus(a.times(r)),u=r;return r=k(e.minus(i),t,0,1,1),c=c.plus(r.times(f)),i=i.plus(r.times(t)),c.s=f.s=g.s,d=k(f,t,s,1).minus(g).abs().cmp(k(c,i,s,1).minus(g).abs())<1?[f,t]:[c,i],N.precision=l,w=!0,d};h.toHexadecimal=h.toHex=function(e,n){return Pe(this,16,e,n)};h.toNearest=function(e,n){var i=this,t=i.constructor;if(i=new t(i),e==null){if(!i.d)return i;e=new t(1),n=t.rounding}else{if(e=new t(e),n===void 0?n=t.rounding:q(n,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(w=!1,i=k(i,e,0,n,1).times(e),w=!0,p(i)):(e.s=i.s,i=e),i};h.toNumber=function(){return+this};h.toOctal=function(e,n){return Pe(this,8,e,n)};h.toPower=h.pow=function(e){var n,i,t,r,s,o,u=this,c=u.constructor,f=+(e=new c(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new c(C(+u,f));if(u=new c(u),u.eq(1))return u;if(t=c.precision,s=c.rounding,e.eq(1))return p(u,t,s);if(n=R(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=dn)return r=He(c,u,i,t),e.s<0?new c(1).div(r):p(r,t,s);if(o=u.s,o<0){if(nc.maxE+1||n0?o/0:0):(w=!1,c.rounding=u.s=1,i=Math.min(12,(n+"").length),r=be(e.times(B(u,t+i)),t),r.d&&(r=p(r,t+5,1),Q(r.d,t,s)&&(n=t+10,r=p(be(e.times(B(u,n+i)),n),n+5,1),+b(r.d).slice(t+1,t+15)+1==1e14&&(r=p(r,t+1,0)))),r.s=o,w=!0,c.rounding=s,p(r,t,s))};h.toPrecision=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=L(t,t.e<=r.toExpNeg||t.e>=r.toExpPos):(q(e,1,H),n===void 0?n=r.rounding:q(n,0,8),t=p(new r(t),e,n),i=L(t,e<=t.e||t.e<=r.toExpNeg,e)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toSignificantDigits=h.toSD=function(e,n){var i=this,t=i.constructor;return e===void 0?(e=t.precision,n=t.rounding):(q(e,1,H),n===void 0?n=t.rounding:q(n,0,8)),p(new t(i),e,n)};h.toString=function(){var e=this,n=e.constructor,i=L(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};h.truncated=h.trunc=function(){return p(new this.constructor(this),this.e+1,1)};h.valueOf=h.toJSON=function(){var e=this,n=e.constructor,i=L(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function b(e){var n,i,t,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,n=1;ni)throw Error($+e)}function Q(e,n,i,t){var r,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,r=0):(r=Math.ceil((n+1)/m),n%=m),s=C(10,m-n),u=e[r]%s|0,t==null?n<3?(n==0?u=u/100|0:n==1&&(u=u/10|0),o=i<4&&u==99999||i>3&&u==49999||u==5e4||u==0):o=(i<4&&u+1==s||i>3&&u+1==s/2)&&(e[r+1]/s/100|0)==C(10,n-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:n<4?(n==0?u=u/1e3|0:n==1?u=u/100|0:n==2&&(u=u/10|0),o=(t||i<4)&&u==9999||!t&&i>3&&u==4999):o=((t||i<4)&&u+1==s||!t&&i>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==C(10,n-3)-1,o}function te(e,n,i){for(var t,r=[0],s,o=0,u=e.length;oi-1&&(r[t+1]===void 0&&(r[t+1]=0),r[t+1]+=r[t]/i|0,r[t]%=i)}return r.reverse()}function pn(e,n){var i,t,r;if(n.isZero())return n;t=n.d.length,t<32?(i=Math.ceil(t/3),r=(1/le(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,n=j(e,1,n.times(r),new e(1));for(var s=i;s--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,n}var k=function(){function e(t,r,s){var o,u=0,c=t.length;for(t=t.slice();c--;)o=t[c]*r+u,t[c]=o%s|0,u=o/s|0;return u&&t.unshift(u),t}function n(t,r,s,o){var u,c;if(s!=o)c=s>o?1:-1;else for(u=c=0;ur[u]?1:-1;break}return c}function i(t,r,s,o){for(var u=0;s--;)t[s]-=u,u=t[s]1;)t.shift()}return function(t,r,s,o,u,c){var f,l,a,d,g,v,N,A,M,_,E,P,x,I,ae,z,W,de,T,y,ee=t.constructor,he=t.s==r.s?1:-1,O=t.d,S=r.d;if(!O||!O[0]||!S||!S[0])return new ee(!t.s||!r.s||(O?S&&O[0]==S[0]:!S)?NaN:O&&O[0]==0||!S?he*0:he/0);for(c?(g=1,l=t.e-r.e):(c=D,g=m,l=R(t.e/g)-R(r.e/g)),T=S.length,W=O.length,M=new ee(he),_=M.d=[],a=0;S[a]==(O[a]||0);a++);if(S[a]>(O[a]||0)&&l--,s==null?(I=s=ee.precision,o=ee.rounding):u?I=s+(t.e-r.e)+1:I=s,I<0)_.push(1),v=!0;else{if(I=I/g+2|0,a=0,T==1){for(d=0,S=S[0],I++;(a1&&(S=e(S,d,c),O=e(O,d,c),T=S.length,W=O.length),z=T,E=O.slice(0,T),P=E.length;P=c/2&&++de;do d=0,f=n(S,E,T,P),f<0?(x=E[0],T!=P&&(x=x*c+(E[1]||0)),d=x/de|0,d>1?(d>=c&&(d=c-1),N=e(S,d,c),A=N.length,P=E.length,f=n(N,E,A,P),f==1&&(d--,i(N,T=10;d/=10)a++;M.e=a+l*g-1,p(M,u?s+M.e+1:s,o,v)}return M}}();function p(e,n,i,t){var r,s,o,u,c,f,l,a,d,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(r=1,u=a[0];u>=10;u/=10)r++;if(s=n-r,s<0)s+=m,o=n,l=a[d=0],c=l/C(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/m),u=a.length,d>=u)if(t){for(;u++<=d;)a.push(0);l=c=0,r=1,s%=m,o=s-m+1}else break e;else{for(l=u=a[d],r=1;u>=10;u/=10)r++;s%=m,o=s-m+r,c=o<0?0:l/C(10,r-o-1)%10|0}if(t=t||n<0||a[d+1]!==void 0||(o<0?l:l%C(10,r-o-1)),f=i<4?(c||t)&&(i==0||i==(e.s<0?3:2)):c>5||c==5&&(i==4||t||i==6&&(s>0?o>0?l/C(10,r-o):0:a[d-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=C(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=d,u=1,d--):(a.length=d+1,u=C(10,m-s),a[d]=o>0?(l/C(10,r-o)%C(10,o)|0)*u:0),f)for(;;)if(d==0){for(s=1,o=a[0];o>=10;o/=10)s++;for(o=a[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,a[0]==D&&(a[0]=1));break}else{if(a[d]+=u,a[d]!=D)break;a[d--]=0,u=1}for(s=a.length;a[--s]===0;)a.pop()}return w&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e0?s=s.charAt(0)+"."+s.slice(1)+U(t):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+U(-r-1)+s,i&&(t=i-o)>0&&(s+=U(t))):r>=o?(s+=U(r+1-o),i&&(t=i-r-1)>0&&(s=s+"."+U(t))):((t=r+1)0&&(r+1===o&&(s+="."),s+=U(t))),s}function ce(e,n){var i=e[0];for(n*=m;i>=10;i/=10)n++;return n}function ue(e,n,i){if(n>hn)throw w=!0,i&&(e.precision=i),Error(Ie);return p(new e(se),n,1,!0)}function F(e,n,i){if(n>Ce)throw Error(Ie);return p(new e(oe),n,i,!0)}function $e(e){var n=e.length-1,i=n*m+1;if(n=e[n],n){for(;n%10==0;n/=10)i--;for(n=e[0];n>=10;n/=10)i++}return i}function U(e){for(var n="";e--;)n+="0";return n}function He(e,n,i,t){var r,s=new e(1),o=Math.ceil(t/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),De(s.d,o)&&(r=!0)),i=R(i/2),i===0){i=s.d.length-1,r&&s.d[i]===0&&++s.d[i];break}n=n.times(n),De(n.d,o)}return w=!0,s}function Te(e){return e.d[e.d.length-1]&1}function Ve(e,n,i){for(var t,r,s=new e(n[0]),o=0;++o17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(n==null?(w=!1,c=v):c=n,u=new d(.03125);e.e>-2;)e=e.times(u),a+=5;for(t=Math.log(C(2,a))/Math.LN10*2+5|0,c+=t,i=s=o=new d(1),d.precision=c;;){if(s=p(s.times(e),c,1),i=i.times(++l),u=o.plus(k(s,i,c,1)),b(u.d).slice(0,c)===b(o.d).slice(0,c)){for(r=a;r--;)o=p(o.times(o),c,1);if(n==null)if(f<3&&Q(o.d,c-t,g,f))d.precision=c+=10,i=s=u=new d(1),l=0,f++;else return p(o,d.precision=v,g,w=!0);else return d.precision=v,o}o=u}}function B(e,n){var i,t,r,s,o,u,c,f,l,a,d,g=1,v=10,N=e,A=N.d,M=N.constructor,_=M.rounding,E=M.precision;if(N.s<0||!A||!A[0]||!N.e&&A[0]==1&&A.length==1)return new M(A&&!A[0]?-1/0:N.s!=1?NaN:A?0:N);if(n==null?(w=!1,l=E):l=n,M.precision=l+=v,i=b(A),t=i.charAt(0),Math.abs(s=N.e)<15e14){for(;t<7&&t!=1||t==1&&i.charAt(1)>3;)N=N.times(e),i=b(N.d),t=i.charAt(0),g++;s=N.e,t>1?(N=new M("0."+i),s++):N=new M(t+"."+i.slice(1))}else return f=ue(M,l+2,E).times(s+""),N=B(new M(t+"."+i.slice(1)),l-v).plus(f),M.precision=E,n==null?p(N,E,_,w=!0):N;for(a=N,c=o=N=k(N.minus(1),N.plus(1),l,1),d=p(N.times(N),l,1),r=3;;){if(o=p(o.times(d),l,1),f=c.plus(k(o,new M(r),l,1)),b(f.d).slice(0,l)===b(c.d).slice(0,l))if(c=c.times(2),s!==0&&(c=c.plus(ue(M,l+2,E).times(s+""))),c=k(c,new M(g),l,1),n==null)if(Q(c.d,l-v,_,u))M.precision=l+=v,f=o=N=k(a.minus(1),a.plus(1),l,1),d=p(N.times(N),l,1),r=u=1;else return p(c,M.precision=E,_,w=!0);else return M.precision=E,c;c=f,r+=2}}function je(e){return String(e.s*e.s/0)}function re(e,n){var i,t,r;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(i<0&&(i=t),i+=+n.slice(t+1),n=n.substring(0,t)):i<0&&(i=n.length),t=0;n.charCodeAt(t)===48;t++);for(r=n.length;n.charCodeAt(r-1)===48;--r);if(n=n.slice(t,r),n){if(r-=t,e.e=i=i-t-1,e.d=[],t=(i+1)%m,i<0&&(t+=m),te.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Be.test(n))return re(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(ln.test(n))i=16,n=n.toLowerCase();else if(cn.test(n))i=2;else if(an.test(n))i=8;else throw Error($+n);for(s=n.search(/p/i),s>0?(c=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),s=n.indexOf("."),o=s>=0,t=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,r=He(t,new t(i),s,s*2)),f=te(n,i,D),l=f.length-1,s=l;f[s]===0;--s)f.pop();return s<0?new t(e.s*0):(e.e=ce(f,l),e.d=f,w=!1,o&&(e=k(e,r,u*4)),c&&(e=e.times(Math.abs(c)<54?C(2,c):Y.pow(2,c))),w=!0,e)}function mn(e,n){var i,t=n.d.length;if(t<3)return n.isZero()?n:j(e,2,n,n);i=1.4*Math.sqrt(t),i=i>16?16:i|0,n=n.times(1/le(5,i)),n=j(e,2,n,n);for(var r,s=new e(5),o=new e(16),u=new e(20);i--;)r=n.times(n),n=n.times(s.plus(r.times(o.times(r).minus(u))));return n}function j(e,n,i,t,r){var s,o,u,c,f=1,l=e.precision,a=Math.ceil(l/m);for(w=!1,c=i.times(i),u=new e(t);;){if(o=k(u.times(c),new e(n++*n++),l,1),u=r?t.plus(o):t.minus(o),t=k(o.times(c),new e(n++*n++),l,1),o=u.plus(t),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=t,t=o,o=s,f++}return w=!0,o.d.length=a+1,o}function le(e,n){for(var i=e;--n;)i*=e;return i}function We(e,n){var i,t=n.s<0,r=F(e,e.precision,1),s=r.times(.5);if(n=n.abs(),n.lte(s))return Z=t?4:1,n;if(i=n.divToInt(r),i.isZero())Z=t?3:2;else{if(n=n.minus(i.times(r)),n.lte(s))return Z=Te(i)?t?2:3:t?4:1,n;Z=Te(i)?t?1:4:t?3:2}return n.minus(r).abs()}function Pe(e,n,i,t){var r,s,o,u,c,f,l,a,d,g=e.constructor,v=i!==void 0;if(v?(q(i,1,H),t===void 0?t=g.rounding:q(t,0,8)):(i=g.precision,t=g.rounding),!e.isFinite())l=je(e);else{for(l=L(e),o=l.indexOf("."),v?(r=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):r=n,o>=0&&(l=l.replace(".",""),d=new g(1),d.e=l.length-o,d.d=te(L(d),10,r),d.e=d.d.length),a=te(l,10,r),s=c=a.length;a[--c]==0;)a.pop();if(!a[0])l=v?"0p+0":"0";else{if(o<0?s--:(e=new g(e),e.d=a,e.e=s,e=k(e,d,i,t,0,r),a=e.d,s=e.e,f=Le),o=a[i],u=r/2,f=f||a[i+1]!==void 0,f=t<4?(o!==void 0||f)&&(t===0||t===(e.s<0?3:2)):o>u||o===u&&(t===4||f||t===6&&a[i-1]&1||t===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>r-1;)a[i]=0,i||(++s,a.unshift(1));for(c=a.length;!a[c-1];--c);for(o=0,l="";o1)if(n==16||n==8){for(o=n==16?4:3,--c;c%o;c++)l+="0";for(a=te(l,r,n),c=a.length;!a[c-1];--c);for(o=1,l="1.";oc)for(s-=c;s--;)l+="0";else sn)return e.length=n,!0}function wn(e){return new this(e).abs()}function Nn(e){return new this(e).acos()}function vn(e){return new this(e).acosh()}function En(e,n){return new this(e).plus(n)}function kn(e){return new this(e).asin()}function Sn(e){return new this(e).asinh()}function Mn(e){return new this(e).atan()}function Cn(e){return new this(e).atanh()}function bn(e,n){e=new this(e),n=new this(n);var i,t=this.precision,r=this.rounding,s=t+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=F(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?F(this,t,r):new this(0),i.s=e.s):!e.d||n.isZero()?(i=F(this,s,1).times(.5),i.s=e.s):n.s<0?(this.precision=s,this.rounding=1,i=this.atan(k(e,n,s,1)),n=F(this,s,1),this.precision=t,this.rounding=r,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(k(e,n,s,1)),i}function Pn(e){return new this(e).cbrt()}function On(e){return p(e=new this(e),e.e+1,2)}function Rn(e,n,i){return new this(e).clamp(n,i)}function An(e){if(!e||typeof e!="object")throw Error(fe+"Object expected");var n,i,t,r=e.defaults===!0,s=["precision",1,H,"rounding",0,8,"toExpNeg",-V,0,"toExpPos",0,V,"maxE",0,V,"minE",-V,0,"modulo",0,9];for(n=0;n=s[n+1]&&t<=s[n+2])this[i]=t;else throw Error($+i+": "+t);if(i="crypto",r&&(this[i]=Me[i]),(t=e[i])!==void 0)if(t===!0||t===!1||t===0||t===1)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(Ze);else this[i]=!1;else throw Error($+i+": "+t);return this}function qn(e){return new this(e).cos()}function _n(e){return new this(e).cosh()}function Ge(e){var n,i,t;function r(s){var o,u,c,f=this;if(!(f instanceof r))return new r(s);if(f.constructor=r,Fe(s)){f.s=s.s,w?!s.d||s.e>r.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>r.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(t*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(r%1e7),s+=4);s=t/4}else throw Error(Ze);else for(;s=10;r/=10)t++;t - * MIT Licence - *) -*/ -//# sourceMappingURL=index-browser.js.map diff --git a/backend/generated/prisma/runtime/library.d.ts b/backend/generated/prisma/runtime/library.d.ts deleted file mode 100644 index 0dcdd30..0000000 --- a/backend/generated/prisma/runtime/library.d.ts +++ /dev/null @@ -1,3697 +0,0 @@ -/** - * @param this - */ -declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; - -declare type AccelerateEngineConfig = { - inlineSchema: EngineConfig['inlineSchema']; - inlineSchemaHash: EngineConfig['inlineSchemaHash']; - env: EngineConfig['env']; - generator?: { - previewFeatures: string[]; - }; - inlineDatasources: EngineConfig['inlineDatasources']; - overrideDatasources: EngineConfig['overrideDatasources']; - clientVersion: EngineConfig['clientVersion']; - engineVersion: EngineConfig['engineVersion']; - logEmitter: EngineConfig['logEmitter']; - logQueries?: EngineConfig['logQueries']; - logLevel?: EngineConfig['logLevel']; - tracingHelper: EngineConfig['tracingHelper']; - accelerateUtils?: AccelerateUtils; -}; - -declare type AccelerateUtils = EngineConfig['accelerateUtils']; - -export declare type Action = keyof typeof DMMF_2.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; - -declare type ActiveConnectorType = Exclude; - -/** - * An interface that exposes some basic information about the - * adapter like its name and provider type. - */ -declare interface AdapterInfo { - readonly provider: Provider; - readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); -} - -export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; - -export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { - [P in K]: { - $allModels: infer AllModels; - }; -} ? { - [P in K]: Record; -} : {}; - -declare class AnyNull extends NullTypesEnumValue { - #private; -} - -export declare type ApplyOmit = Compute<{ - [K in keyof T as OmitValue extends true ? never : K]: T[K]; -}>; - -export declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} ? T[symbol]['types']['operations'][F]['args'] : any; - -export declare type Args_3 = Args; - -/** - * Original `quaint::ValueType` enum tag from Prisma's `quaint`. - * Query arguments marked with this type are sanitized before being sent to the database. - * Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined. - */ -declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' | 'Enum' | 'EnumArray' | 'Bytes' | 'Boolean' | 'Char' | 'Array' | 'Numeric' | 'Json' | 'Xml' | 'Uuid' | 'DateTime' | 'Date' | 'Time' | 'Unknown'; - -/** - * Attributes is a map from string to attribute values. - * - * Note: only the own enumerable keys are counted as valid attribute keys. - */ -declare interface Attributes { - [attributeKey: string]: AttributeValue | undefined; -} - -/** - * Attribute values may be any non-nullish primitive value except an object. - * - * null or undefined attribute values are invalid and will result in undefined behavior. - */ -declare type AttributeValue = string | number | boolean | Array | Array | Array; - -export declare type BaseDMMF = { - readonly datamodel: Omit; -}; - -declare type BatchArgs = { - queries: BatchQuery[]; - transaction?: { - isolationLevel?: IsolationLevel_2; - }; -}; - -declare type BatchInternalParams = { - requests: RequestParams[]; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type BatchQuery = { - model: string | undefined; - operation: string; - args: JsArgs | RawQueryArgs; -}; - -declare type BatchQueryEngineResult = QueryEngineResultData | Error; - -declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; - -declare type BatchQueryOptionsCbArgs = { - args: BatchArgs; - query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; - __internalParams: BatchInternalParams; -}; - -declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse; - -declare type BatchTransactionOptions = { - isolationLevel?: Transaction_2.IsolationLevel; -}; - -declare interface BinaryTargetsEnvValue { - fromEnvVar: string | null; - value: string; - native?: boolean; -} - -export declare type Call = (F & { - params: P; -})['returns']; - -declare interface CallSite { - getLocation(): LocationInFile | null; -} - -export declare type Cast = A extends W ? A : W; - -declare type Client = ReturnType extends new () => infer T ? T : never; - -export declare type ClientArg = { - [MethodName in string]: unknown; -}; - -export declare type ClientArgs = { - client: ClientArg; -}; - -export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; - -export declare type ClientOptionDef = undefined | { - [K in string]: any; -}; - -export declare type ClientOtherOps = { - $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; - $queryRawTyped(query: TypedSql): PrismaPromise; - $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; - $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; - $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; - $runCommandRaw(command: InputJsonObject): PrismaPromise; -}; - -declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; - -declare const ColumnTypeEnum: { - readonly Int32: 0; - readonly Int64: 1; - readonly Float: 2; - readonly Double: 3; - readonly Numeric: 4; - readonly Boolean: 5; - readonly Character: 6; - readonly Text: 7; - readonly Date: 8; - readonly Time: 9; - readonly DateTime: 10; - readonly Json: 11; - readonly Enum: 12; - readonly Bytes: 13; - readonly Set: 14; - readonly Uuid: 15; - readonly Int32Array: 64; - readonly Int64Array: 65; - readonly FloatArray: 66; - readonly DoubleArray: 67; - readonly NumericArray: 68; - readonly BooleanArray: 69; - readonly CharacterArray: 70; - readonly TextArray: 71; - readonly DateArray: 72; - readonly TimeArray: 73; - readonly DateTimeArray: 74; - readonly JsonArray: 75; - readonly EnumArray: 76; - readonly BytesArray: 77; - readonly UuidArray: 78; - readonly UnknownNumber: 128; -}; - -declare type CompactedBatchResponse = { - type: 'compacted'; - plan: {}; - arguments: Record[]; - nestedSelection: string[]; - keys: string[]; - expectNonEmpty: boolean; -}; - -declare type CompilerWasmLoadingConfig = { - /** - * WASM-bindgen runtime for corresponding module - */ - getRuntime: () => Promise<{ - __wbg_set_wasm(exports: unknown): void; - QueryCompiler: QueryCompilerConstructor; - }>; - /** - * Loads the raw wasm module for the wasm compiler engine. This configuration is - * generated specifically for each type of client, eg. Node.js client and Edge - * clients will have different implementations. - * @remarks this is a callback on purpose, we only load the wasm if needed. - * @remarks only used by ClientEngine - */ - getQueryCompilerWasmModule: () => Promise; -}; - -export declare type Compute = T extends Function ? T : { - [K in keyof T]: T[K]; -} & unknown; - -export declare type ComputeDeep = T extends Function ? T : { - [K in keyof T]: ComputeDeep; -} & unknown; - -declare type ComputedField = { - name: string; - needs: string[]; - compute: ResultArgsFieldCompute; -}; - -declare type ComputedFieldsMap = { - [fieldName: string]: ComputedField; -}; - -declare type ConnectionInfo = { - schemaName?: string; - maxBindValues?: number; - supportsRelationJoins: boolean; -}; - -declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'prisma+postgres' | 'sqlserver' | 'cockroachdb'; - -declare interface Context { - /** - * Get a value from the context. - * - * @param key key which identifies a context value - */ - getValue(key: symbol): unknown; - /** - * Create a new context which inherits from this context and has - * the given key set to the given value. - * - * @param key context key for which to set the value - * @param value value to set for the given key - */ - setValue(key: symbol, value: unknown): Context; - /** - * Return a new context which inherits from this context but does - * not contain a value for the given key. - * - * @param key context key for which to clear a value - */ - deleteValue(key: symbol): Context; -} - -declare type Context_2 = T extends { - [K: symbol]: { - ctx: infer C; - }; -} ? C & T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; -} : T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; -}; - -export declare type Count = { - [K in keyof O]: Count; -} & {}; - -export declare function createParam(name: string): Param; - -/** - * Custom fetch function for `DataProxyEngine`. - * - * We can't use the actual type of `globalThis.fetch` because this will result - * in API Extractor referencing Node.js type definitions in the `.d.ts` bundle - * for the client runtime. We can only use such types in internal types that - * don't end up exported anywhere. - - * It's also not possible to write a definition of `fetch` that would accept the - * actual `fetch` function from different environments such as Node.js and - * Cloudflare Workers (with their extensions to `RequestInit` and `Response`). - * `fetch` is used in both covariant and contravariant positions in - * `CustomDataProxyFetch`, making it invariant, so we need the exact same type. - * Even if we removed the argument and left `fetch` in covariant position only, - * then for an extension-supplied function to be assignable to `customDataProxyFetch`, - * the platform-specific (or custom) `fetch` function needs to be assignable - * to our `fetch` definition. This, in turn, requires the third-party `Response` - * to be a subtype of our `Response` (which is not a problem, we could declare - * a minimal `Response` type that only includes what we use) *and* requires the - * third-party `RequestInit` to be a supertype of our `RequestInit` (i.e. we - * have to declare all properties any `RequestInit` implementation in existence - * could possibly have), which is not possible. - * - * Since `@prisma/extension-accelerate` redefines the type of - * `__internalParams.customDataProxyFetch` to its own type anyway (probably for - * exactly this reason), our definition is never actually used and is completely - * ignored, so it doesn't matter, and we can just use `unknown` as the type of - * `fetch` here. - */ -declare type CustomDataProxyFetch = (fetch: unknown) => unknown; - -declare class DataLoader { - private options; - batches: { - [key: string]: Job[]; - }; - private tickActive; - constructor(options: DataLoaderOptions); - request(request: T): Promise; - private dispatchBatches; - get [Symbol.toStringTag](): string; -} - -declare type DataLoaderOptions = { - singleLoader: (request: T) => Promise; - batchLoader: (request: T[]) => Promise; - batchBy: (request: T) => string | undefined; - batchOrder: (requestA: T, requestB: T) => number; -}; - -declare type Datamodel = ReadonlyDeep_2<{ - models: Model[]; - enums: DatamodelEnum[]; - types: Model[]; - indexes: Index[]; -}>; - -declare type DatamodelEnum = ReadonlyDeep_2<{ - name: string; - values: EnumValue[]; - dbName?: string | null; - documentation?: string; -}>; - -declare function datamodelEnumToSchemaEnum(datamodelEnum: DatamodelEnum): SchemaEnum; - -declare type Datasource = { - url?: string; -}; - -declare type Datasources = { - [name in string]: Datasource; -}; - -declare class DbNull extends NullTypesEnumValue { - #private; -} - -export declare const Debug: typeof debugCreate & { - enable(namespace: any): void; - disable(): any; - enabled(namespace: string): boolean; - log: (...args: string[]) => void; - formatters: {}; -}; - -/** - * Create a new debug instance with the given namespace. - * - * @example - * ```ts - * import Debug from '@prisma/debug' - * const debug = Debug('prisma:client') - * debug('Hello World') - * ``` - */ -declare function debugCreate(namespace: string): ((...args: any[]) => void) & { - color: string; - enabled: boolean; - namespace: string; - log: (...args: string[]) => void; - extend: () => void; -}; - -export declare function Decimal(n: Decimal.Value): Decimal; - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine() : Decimal; - sin() : Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent() : Decimal; - tan() : Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value) : Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -/** - * Interface for any Decimal.js-like library - * Allows us to accept Decimal.js from different - * versions and some compatible alternatives - */ -export declare interface DecimalJsLike { - d: number[]; - e: number; - s: number; - toFixed(): string; -} - -export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; - -export declare type DefaultSelection = Args extends { - omit: infer LocalOmit; -} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; - -export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; - -declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; - -declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"]; - -declare type Deprecation = ReadonlyDeep_2<{ - sinceVersion: string; - reason: string; - plannedRemovalVersion?: string; -}>; - -declare type DeserializedResponse = Array>; - -export declare function deserializeJsonResponse(result: unknown): unknown; - -export declare function deserializeRawResult(response: RawResponse): DeserializedResponse; - -export declare type DevTypeMapDef = { - meta: { - modelProps: string; - }; - model: { - [Model in PropertyKey]: { - [Operation in PropertyKey]: DevTypeMapFnDef; - }; - }; - other: { - [Operation in PropertyKey]: DevTypeMapFnDef; - }; -}; - -export declare type DevTypeMapFnDef = { - args: any; - result: any; - payload: OperationPayload; -}; - -export declare namespace DMMF { - export { - datamodelEnumToSchemaEnum, - Document_2 as Document, - Mappings, - OtherOperationMappings, - DatamodelEnum, - SchemaEnum, - EnumValue, - Datamodel, - uniqueIndex, - PrimaryKey, - Model, - FieldKind, - FieldNamespace, - FieldLocation, - Field, - FieldDefault, - FieldDefaultScalar, - Index, - IndexType, - IndexField, - SortOrder, - Schema, - Query, - QueryOutput, - TypeRef, - InputTypeRef, - SchemaArg, - OutputType, - SchemaField, - OutputTypeRef, - Deprecation, - InputType, - FieldRefType, - FieldRefAllowType, - ModelMapping, - ModelAction - } -} - -declare namespace DMMF_2 { - export { - datamodelEnumToSchemaEnum, - Document_2 as Document, - Mappings, - OtherOperationMappings, - DatamodelEnum, - SchemaEnum, - EnumValue, - Datamodel, - uniqueIndex, - PrimaryKey, - Model, - FieldKind, - FieldNamespace, - FieldLocation, - Field, - FieldDefault, - FieldDefaultScalar, - Index, - IndexType, - IndexField, - SortOrder, - Schema, - Query, - QueryOutput, - TypeRef, - InputTypeRef, - SchemaArg, - OutputType, - SchemaField, - OutputTypeRef, - Deprecation, - InputType, - FieldRefType, - FieldRefAllowType, - ModelMapping, - ModelAction - } -} - -export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF_2.Datamodel): RuntimeDataModel; - -declare type Document_2 = ReadonlyDeep_2<{ - datamodel: Datamodel; - schema: Schema; - mappings: Mappings; -}>; - -/** - * A generic driver adapter factory that allows the user to instantiate a - * driver adapter. The query and result types are specific to the adapter. - */ -declare interface DriverAdapterFactory extends AdapterInfo { - /** - * Instantiate a driver adapter. - */ - connect(): Promise>; -} - -/** Client */ -export declare type DynamicClientExtensionArgs> = { - [P in keyof C_]: unknown; -} & { - [K: symbol]: { - ctx: Optional, ITXClientDenyList> & { - $parent: Optional, ITXClientDenyList>; - }; - }; -}; - -export declare type DynamicClientExtensionThis> = { - [P in keyof ExtArgs['client']]: Return; -} & { - [P in Exclude]: DynamicModelExtensionThis, ExtArgs>; -} & { - [P in Exclude]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never; -} & { - [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; -} & { - [K: symbol]: { - types: TypeMap['other']; - }; -}; - -export declare type DynamicClientExtensionThisBuiltin> = { - $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call>; - $transaction

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

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

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

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

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

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

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

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

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

= P extends Promise ? R : P; - -export declare type UnwrapTuple = { - [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; -}; - -/** - * Input that flows from the user into the Client. - */ -declare type UserArgs_2 = any; - -declare namespace Utils { - export { - EmptyToUnknown, - NeverToUnknown, - PatchFlat, - Omit_2 as Omit, - Pick_2 as Pick, - ComputeDeep, - Compute, - OptionalFlat, - ReadonlyDeep, - Narrowable, - Narrow, - Exact, - Cast, - Record_2 as Record, - UnwrapPromise, - UnwrapTuple, - Path, - Fn, - Call, - RequiredKeys, - OptionalKeys, - Optional, - Return, - ToTuple, - RenameAndNestPayloadKeys, - PayloadToResult, - Select, - Equals, - Or, - JsPromise - } -} - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; - -declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -/** - * Values supported by SQL engine. - */ -export declare type Value = unknown; - -export declare function warnEnvConflicts(envPaths: any): void; - -export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; - -export { } diff --git a/backend/generated/prisma/runtime/library.js b/backend/generated/prisma/runtime/library.js deleted file mode 100644 index a96a351..0000000 --- a/backend/generated/prisma/runtime/library.js +++ /dev/null @@ -1,146 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -"use strict";var xu=Object.create;var Vt=Object.defineProperty;var vu=Object.getOwnPropertyDescriptor;var Pu=Object.getOwnPropertyNames;var Tu=Object.getPrototypeOf,Su=Object.prototype.hasOwnProperty;var Oo=(e,r)=>()=>(e&&(r=e(e=0)),r);var ne=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),tr=(e,r)=>{for(var t in r)Vt(e,t,{get:r[t],enumerable:!0})},_o=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Pu(r))!Su.call(e,i)&&i!==t&&Vt(e,i,{get:()=>r[i],enumerable:!(n=vu(r,i))||n.enumerable});return e};var C=(e,r,t)=>(t=e!=null?xu(Tu(e)):{},_o(r||!e||!e.__esModule?Vt(t,"default",{value:e,enumerable:!0}):t,e)),Ru=e=>_o(Vt({},"__esModule",{value:!0}),e);var yi=ne((Fg,ss)=>{"use strict";ss.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var jc=require("node:os"),as=require("node:tty"),de=yi(),{env:G}=process,Qe;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Qe=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Qe=1);"FORCE_COLOR"in G&&(G.FORCE_COLOR==="true"?Qe=1:G.FORCE_COLOR==="false"?Qe=0:Qe=G.FORCE_COLOR.length===0?1:Math.min(parseInt(G.FORCE_COLOR,10),3));function bi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Ei(e,r){if(Qe===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!r&&Qe===void 0)return 0;let t=Qe||0;if(G.TERM==="dumb")return t;if(process.platform==="win32"){let n=jc.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in G)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in G)||G.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if(G.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in G){let n=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(G.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM)||"COLORTERM"in G?1:t}function Vc(e){let r=Ei(e,e&&e.isTTY);return bi(r)}ls.exports={supportsColor:Vc,stdout:bi(Ei(!0,as.isatty(1))),stderr:bi(Ei(!0,as.isatty(2)))}});var ds=ne(($g,ps)=>{"use strict";var Bc=us(),br=yi();function cs(e){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}let r=(e||"").split(".").map(t=>parseInt(t,10));return{major:r[0],minor:r[1],patch:r[2]}}function wi(e){let{CI:r,FORCE_HYPERLINK:t,NETLIFY:n,TEAMCITY_VERSION:i,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:s,VTE_VERSION:a,TERM:l}=process.env;if(t)return!(t.length>0&&parseInt(t,10)===0);if(br("no-hyperlink")||br("no-hyperlinks")||br("hyperlink=false")||br("hyperlink=never"))return!1;if(br("hyperlink=true")||br("hyperlink=always")||n)return!0;if(!Bc.supportsColor(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||r||i)return!1;if(o){let u=cs(s||"");switch(o){case"iTerm.app":return u.major===3?u.minor>=1:u.major>3;case"WezTerm":return u.major>=20200620;case"vscode":return u.major>1||u.major===1&&u.minor>=72;case"ghostty":return!0}}if(a){if(a==="0.50.0")return!1;let u=cs(a);return u.major>0||u.minor>=50}switch(l){case"alacritty":return!0}return!1}ps.exports={supportsHyperlink:wi,stdout:wi(process.stdout),stderr:wi(process.stderr)}});var ms=ne((zg,Uc)=>{Uc.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Si=ne((bh,Kc)=>{Kc.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var on=ne(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.enginesVersion=void 0;nn.enginesVersion=Si().prisma.enginesVersion});var bs=ne((Oh,ys)=>{"use strict";ys.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var Di=ne((Lh,xs)=>{"use strict";xs.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var Ss=ne(($h,Ts)=>{"use strict";Ts.exports=({onlyFirst:e=!1}={})=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}});var Li=ne((qh,Rs)=>{"use strict";var op=Ss();Rs.exports=e=>typeof e=="string"?e.replace(op(),""):e});var As=ne((Uh,sp)=>{sp.exports={name:"dotenv",version:"16.5.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Os=ne((Gh,Le)=>{"use strict";var Mi=require("node:fs"),$i=require("node:path"),ap=require("node:os"),lp=require("node:crypto"),up=As(),Is=up.version,cp=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function pp(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,` -`);let n;for(;(n=cp.exec(t))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` -`),o=o.replace(/\\r/g,"\r")),r[i]=o}return r}function dp(e){let r=Ds(e),t=B.configDotenv({path:r});if(!t.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=ks(e).split(","),i=n.length,o;for(let s=0;s=i)throw a}return B.parse(o)}function mp(e){console.log(`[dotenv@${Is}][WARN] ${e}`)}function ot(e){console.log(`[dotenv@${Is}][DEBUG] ${e}`)}function ks(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function fp(e,r){let t;try{t=new URL(r)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=t.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=t.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Ds(e){let r=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)Mi.existsSync(t)&&(r=t.endsWith(".vault")?t:`${t}.vault`);else r=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else r=$i.resolve(process.cwd(),".env.vault");return Mi.existsSync(r)?r:null}function Cs(e){return e[0]==="~"?$i.join(ap.homedir(),e.slice(1)):e}function gp(e){!!(e&&e.debug)&&ot("Loading env from encrypted .env.vault");let t=B._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),B.populate(n,t,e),{parsed:t}}function hp(e){let r=$i.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug);e&&e.encoding?t=e.encoding:n&&ot("No encoding is specified. UTF-8 is used by default");let i=[r];if(e&&e.path)if(!Array.isArray(e.path))i=[Cs(e.path)];else{i=[];for(let l of e.path)i.push(Cs(l))}let o,s={};for(let l of i)try{let u=B.parse(Mi.readFileSync(l,{encoding:t}));B.populate(s,u,e)}catch(u){n&&ot(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),B.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function yp(e){if(ks(e).length===0)return B.configDotenv(e);let r=Ds(e);return r?B._configVault(e):(mp(`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`),B.configDotenv(e))}function bp(e,r){let t=Buffer.from(r.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=lp.createDecipheriv("aes-256-gcm",t,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function Ep(e,r,t={}){let n=!!(t&&t.debug),i=!!(t&&t.override);if(typeof r!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(r))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=r[o]),n&&ot(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=r[o]}var B={configDotenv:hp,_configVault:gp,_parseVault:dp,config:yp,decrypt:bp,parse:pp,populate:Ep};Le.exports.configDotenv=B.configDotenv;Le.exports._configVault=B._configVault;Le.exports._parseVault=B._parseVault;Le.exports.config=B.config;Le.exports.decrypt=B.decrypt;Le.exports.parse=B.parse;Le.exports.populate=B.populate;Le.exports=B});var Fs=ne((Yh,cn)=>{"use strict";cn.exports=(e={})=>{let r;if(e.repoUrl)r=e.repoUrl;else if(e.user&&e.repo)r=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${r}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}t.searchParams.set(i,o)}}return t.toString()};cn.exports.default=cn.exports});var Ki=ne((Ab,oa)=>{"use strict";oa.exports=function(){function e(r,t,n,i,o){return rn?n+1:r+1:i===o?t:t+1}return function(r,t){if(r===t)return 0;if(r.length>t.length){var n=r;r=t,t=n}for(var i=r.length,o=t.length;i>0&&r.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict"});var pa=Oo(()=>{"use strict"});var Gf={};tr(Gf,{DMMF:()=>ct,Debug:()=>N,Decimal:()=>ve,Extensions:()=>ii,MetricsClient:()=>Fr,PrismaClientInitializationError:()=>T,PrismaClientKnownRequestError:()=>z,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>j,PrismaClientValidationError:()=>Z,Public:()=>oi,Sql:()=>oe,createParam:()=>Aa,defineDmmfProperty:()=>_a,deserializeJsonResponse:()=>Tr,deserializeRawResult:()=>ei,dmmfToRuntimeDataModel:()=>Xs,empty:()=>Fa,getPrismaClient:()=>bu,getRuntime:()=>Gn,join:()=>La,makeStrictEnum:()=>Eu,makeTypedQueryFactory:()=>Na,objectEnumValues:()=>kn,raw:()=>io,serializeJsonQuery:()=>Mn,skip:()=>Fn,sqltag:()=>oo,warnEnvConflicts:()=>wu,warnOnce:()=>at});module.exports=Ru(Gf);var ii={};tr(ii,{defineExtension:()=>No,getExtensionContext:()=>Lo});function No(e){return typeof e=="function"?e:r=>r.$extends(e)}function Lo(e){return e}var oi={};tr(oi,{validator:()=>Fo});function Fo(...e){return r=>r}var Bt={};tr(Bt,{$:()=>Vo,bgBlack:()=>Fu,bgBlue:()=>ju,bgCyan:()=>Bu,bgGreen:()=>$u,bgMagenta:()=>Vu,bgRed:()=>Mu,bgWhite:()=>Uu,bgYellow:()=>qu,black:()=>Ou,blue:()=>nr,bold:()=>W,cyan:()=>De,dim:()=>Ie,gray:()=>Kr,green:()=>qe,grey:()=>Lu,hidden:()=>ku,inverse:()=>Iu,italic:()=>Cu,magenta:()=>_u,red:()=>ce,reset:()=>Au,strikethrough:()=>Du,underline:()=>Y,white:()=>Nu,yellow:()=>ke});var si,Mo,$o,qo,jo=!0;typeof process<"u"&&({FORCE_COLOR:si,NODE_DISABLE_COLORS:Mo,NO_COLOR:$o,TERM:qo}=process.env||{},jo=process.stdout&&process.stdout.isTTY);var Vo={enabled:!Mo&&$o==null&&qo!=="dumb"&&(si!=null&&si!=="0"||jo)};function F(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!Vo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var Au=F(0,0),W=F(1,22),Ie=F(2,22),Cu=F(3,23),Y=F(4,24),Iu=F(7,27),ku=F(8,28),Du=F(9,29),Ou=F(30,39),ce=F(31,39),qe=F(32,39),ke=F(33,39),nr=F(34,39),_u=F(35,39),De=F(36,39),Nu=F(37,39),Kr=F(90,39),Lu=F(90,39),Fu=F(40,49),Mu=F(41,49),$u=F(42,49),qu=F(43,49),ju=F(44,49),Vu=F(45,49),Bu=F(46,49),Uu=F(47,49);var Gu=100,Bo=["green","yellow","blue","magenta","cyan","red"],Yr=[],Uo=Date.now(),Qu=0,ai=typeof process<"u"?process.env:{};globalThis.DEBUG??=ai.DEBUG??"";globalThis.DEBUG_COLORS??=ai.DEBUG_COLORS?ai.DEBUG_COLORS==="true":!0;var zr={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=r.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=r.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return t&&!n},log:(...e)=>{let[r,t,...n]=e;(console.warn??console.log)(`${r} ${t}`,...n)},formatters:{}};function Wu(e){let r={color:Bo[Qu++%Bo.length],enabled:zr.enabled(e),namespace:e,log:zr.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Yr.push([o,...n]),Yr.length>Gu&&Yr.shift(),zr.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Ju(c)),u=`+${Date.now()-Uo}ms`;Uo=Date.now(),globalThis.DEBUG_COLORS?a(Bt[s](W(o)),...l,Bt[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var N=new Proxy(Wu,{get:(e,r)=>zr[r],set:(e,r,t)=>zr[r]=t});function Ju(e,r=2){let t=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(t.has(i))return"[Circular *]";t.add(i)}else if(typeof i=="bigint")return i.toString();return i},r)}function Go(e=7500){let r=Yr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return r.length!!(e&&typeof e=="object"),Qt=e=>e&&!!e[Oe],Ee=(e,r,t)=>{if(Qt(e)){let n=e[Oe](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(s=>t(s,o[s])),i}if(ci(e)){if(!ci(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];Qt(a)&&a[Hu]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.lengthEe(u,s[c],t))&&i.every((u,c)=>Ee(u,a[c],t))&&(o.length===0||Ee(o[0],l,t))}return e.length===r.length&&e.every((s,a)=>Ee(s,r[a],t))}return Reflect.ownKeys(e).every(n=>{let i=e[n];return(n in r||Qt(o=i)&&o[Oe]().matcherType==="optional")&&Ee(i,r[n],t);var o})}return Object.is(r,e)},Ge=e=>{var r,t,n;return ci(e)?Qt(e)?(r=(t=(n=e[Oe]()).getSelectionKeys)==null?void 0:t.call(n))!=null?r:[]:Array.isArray(e)?Zr(e,Ge):Zr(Object.values(e),Ge):[]},Zr=(e,r)=>e.reduce((t,n)=>t.concat(r(n)),[]);function pe(e){return Object.assign(e,{optional:()=>Ku(e),and:r=>q(e,r),or:r=>Yu(e,r),select:r=>r===void 0?Jo(e):Jo(r,e)})}function Ku(e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return r===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:t}):{matched:Ee(e,r,n),selections:t}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function q(...e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return{matched:e.every(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>Zr(e,Ge),matcherType:"and"})})}function Yu(...e){return pe({[Oe]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return Zr(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,r,n)),selections:t}},getSelectionKeys:()=>Zr(e,Ge),matcherType:"or"})})}function I(e){return{[Oe]:()=>({match:r=>({matched:!!e(r)})})}}function Jo(...e){let r=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return pe({[Oe]:()=>({match:n=>{let i={[r??Wt]:n};return{matched:t===void 0||Ee(t,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[r??Wt].concat(t===void 0?[]:Ge(t))})})}function ye(e){return typeof e=="number"}function je(e){return typeof e=="string"}function Ve(e){return typeof e=="bigint"}var ng=pe(I(function(e){return!0}));var Be=e=>Object.assign(pe(e),{startsWith:r=>{return Be(q(e,(t=r,I(n=>je(n)&&n.startsWith(t)))));var t},endsWith:r=>{return Be(q(e,(t=r,I(n=>je(n)&&n.endsWith(t)))));var t},minLength:r=>Be(q(e,(t=>I(n=>je(n)&&n.length>=t))(r))),length:r=>Be(q(e,(t=>I(n=>je(n)&&n.length===t))(r))),maxLength:r=>Be(q(e,(t=>I(n=>je(n)&&n.length<=t))(r))),includes:r=>{return Be(q(e,(t=r,I(n=>je(n)&&n.includes(t)))));var t},regex:r=>{return Be(q(e,(t=r,I(n=>je(n)&&!!n.match(t)))));var t}}),ig=Be(I(je)),be=e=>Object.assign(pe(e),{between:(r,t)=>be(q(e,((n,i)=>I(o=>ye(o)&&n<=o&&i>=o))(r,t))),lt:r=>be(q(e,(t=>I(n=>ye(n)&&nbe(q(e,(t=>I(n=>ye(n)&&n>t))(r))),lte:r=>be(q(e,(t=>I(n=>ye(n)&&n<=t))(r))),gte:r=>be(q(e,(t=>I(n=>ye(n)&&n>=t))(r))),int:()=>be(q(e,I(r=>ye(r)&&Number.isInteger(r)))),finite:()=>be(q(e,I(r=>ye(r)&&Number.isFinite(r)))),positive:()=>be(q(e,I(r=>ye(r)&&r>0))),negative:()=>be(q(e,I(r=>ye(r)&&r<0)))}),og=be(I(ye)),Ue=e=>Object.assign(pe(e),{between:(r,t)=>Ue(q(e,((n,i)=>I(o=>Ve(o)&&n<=o&&i>=o))(r,t))),lt:r=>Ue(q(e,(t=>I(n=>Ve(n)&&nUe(q(e,(t=>I(n=>Ve(n)&&n>t))(r))),lte:r=>Ue(q(e,(t=>I(n=>Ve(n)&&n<=t))(r))),gte:r=>Ue(q(e,(t=>I(n=>Ve(n)&&n>=t))(r))),positive:()=>Ue(q(e,I(r=>Ve(r)&&r>0))),negative:()=>Ue(q(e,I(r=>Ve(r)&&r<0)))}),sg=Ue(I(Ve)),ag=pe(I(function(e){return typeof e=="boolean"})),lg=pe(I(function(e){return typeof e=="symbol"})),ug=pe(I(function(e){return e==null})),cg=pe(I(function(e){return e!=null}));var pi=class extends Error{constructor(r){let t;try{t=JSON.stringify(r)}catch{t=r}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=r}},di={matched:!1,value:void 0};function hr(e){return new mi(e,di)}var mi=class e{constructor(r,t){this.input=void 0,this.state=void 0,this.input=r,this.state=t}with(...r){if(this.state.matched)return this;let t=r[r.length-1],n=[r[0]],i;r.length===3&&typeof r[1]=="function"?i=r[1]:r.length>2&&n.push(...r.slice(1,r.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>Ee(u,this.input,a))||i&&!i(this.input)?di:{matched:!0,value:t(o?Wt in s?s[Wt]:s:this.input,this.input)};return new e(this.input,l)}when(r,t){if(this.state.matched)return this;let n=!!r(this.input);return new e(this.input,n?{matched:!0,value:t(this.input,this.input)}:di)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new pi(this.input)}run(){return this.exhaustive()}returnType(){return this}};var zo=require("node:util");var zu={warn:ke("prisma:warn")},Zu={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Jt(e,...r){Zu.warn()&&console.warn(`${zu.warn} ${e}`,...r)}var Xu=(0,zo.promisify)(Yo.default.exec),ee=gr("prisma:get-platform"),ec=["1.0.x","1.1.x","3.0.x"];async function Zo(){let e=Kt.default.platform(),r=process.arch;if(e==="freebsd"){let s=await Yt("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:r}}}if(e!=="linux")return{platform:e,arch:r};let t=await tc(),n=await cc(),i=ic({arch:r,archFromUname:n,familyDistro:t.familyDistro}),{libssl:o}=await oc(i);return{platform:"linux",libssl:o,arch:r,archFromUname:n,...t}}function rc(e){let r=/^ID="?([^"\n]*)"?$/im,t=/^ID_LIKE="?([^"\n]*)"?$/im,n=r.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=t.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=hr({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return ee(`Found distro info: -${JSON.stringify(a,null,2)}`),a}async function tc(){let e="/etc/os-release";try{let r=await fi.default.readFile(e,{encoding:"utf-8"});return rc(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function nc(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let t=`${r[1]}.x`;return Xo(t)}}function Ho(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let t=`${r[1]}${r[2]??".0"}.x`;return Xo(t)}}function Xo(e){let r=(()=>{if(rs(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(ec.includes(r))return r}function ic(e){return hr(e).with({familyDistro:"musl"},()=>(ee('Trying platform-specific paths for "alpine"'),["/lib","/usr/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(ee('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(ee('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:t,archFromUname:n})=>(ee(`Don't know any platform-specific paths for "${r}" on ${t} (${n})`),[]))}async function oc(e){let r='grep -v "libssl.so.0"',t=await Ko(e);if(t){ee(`Found libssl.so file using platform-specific paths: ${t}`);let o=Ho(t);if(ee(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}ee('Falling back to "ldconfig" and other generic paths');let n=await Yt(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(n||(n=await Ko(["/lib64","/usr/lib64","/lib","/usr/lib"])),n){ee(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=Ho(n);if(ee(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Yt("openssl version -v");if(i){ee(`Found openssl binary with version: ${i}`);let o=nc(i);if(ee(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return ee("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Ko(e){for(let r of e){let t=await sc(r);if(t)return t}}async function sc(e){try{return(await fi.default.readdir(e)).find(t=>t.startsWith("libssl.so.")&&!t.startsWith("libssl.so.0"))}catch(r){if(r.code==="ENOENT")return;throw r}}async function ir(){let{binaryTarget:e}=await es();return e}function ac(e){return e.binaryTarget!==void 0}async function gi(){let{memoized:e,...r}=await es();return r}var Ht={};async function es(){if(ac(Ht))return Promise.resolve({...Ht,memoized:!0});let e=await Zo(),r=lc(e);return Ht={...e,binaryTarget:r},{...Ht,memoized:!1}}function lc(e){let{platform:r,arch:t,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;r==="linux"&&!["x64","arm64"].includes(t)&&Jt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(r==="linux"&&i===void 0){let c=hr({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");Jt(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". -${c}`)}let u="debian";if(r==="linux"&&o===void 0&&ee(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),r==="darwin"&&t==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return o;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&o==="nixos")return"linux-nixos";if(r==="linux"&&t==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(r==="linux"&&t==="arm")return`linux-arm-openssl-${i||l}`;if(r==="linux"&&o==="musl"){let c="linux-musl";return!i||rs(i)?c:`${c}-openssl-${i}`}return r==="linux"&&o&&i?`${o}-openssl-${i}`:(r!=="linux"&&Jt(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function uc(e){try{return await e()}catch{return}}function Yt(e){return uc(async()=>{let r=await Xu(e);return ee(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function cc(){return typeof Kt.default.machine=="function"?Kt.default.machine():(await Yt("uname -m"))?.trim()}function rs(e){return e.startsWith("1.")}var Xt={};tr(Xt,{beep:()=>Fc,clearScreen:()=>Oc,clearTerminal:()=>_c,cursorBackward:()=>yc,cursorDown:()=>gc,cursorForward:()=>hc,cursorGetPosition:()=>wc,cursorHide:()=>Pc,cursorLeft:()=>is,cursorMove:()=>fc,cursorNextLine:()=>xc,cursorPrevLine:()=>vc,cursorRestorePosition:()=>Ec,cursorSavePosition:()=>bc,cursorShow:()=>Tc,cursorTo:()=>mc,cursorUp:()=>ns,enterAlternativeScreen:()=>Nc,eraseDown:()=>Cc,eraseEndLine:()=>Rc,eraseLine:()=>os,eraseLines:()=>Sc,eraseScreen:()=>hi,eraseStartLine:()=>Ac,eraseUp:()=>Ic,exitAlternativeScreen:()=>Lc,iTerm:()=>qc,image:()=>$c,link:()=>Mc,scrollDown:()=>Dc,scrollUp:()=>kc});var Zt=C(require("node:process"),1);var zt=globalThis.window?.document!==void 0,bg=globalThis.process?.versions?.node!==void 0,Eg=globalThis.process?.versions?.bun!==void 0,wg=globalThis.Deno?.version?.deno!==void 0,xg=globalThis.process?.versions?.electron!==void 0,vg=globalThis.navigator?.userAgent?.includes("jsdom")===!0,Pg=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Tg=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,Sg=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Rg=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,Xr=globalThis.navigator?.userAgentData?.platform,Ag=Xr==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",Cg=Xr==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",Ig=Xr==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",kg=Xr==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),Dg=Xr==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var k="\x1B[",rt="\x1B]",yr="\x07",et=";",ts=!zt&&Zt.default.env.TERM_PROGRAM==="Apple_Terminal",pc=!zt&&Zt.default.platform==="win32",dc=zt?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:Zt.default.cwd,mc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?k+(e+1)+"G":k+(r+1)+et+(e+1)+"H"},fc=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=k+-e+"D":e>0&&(t+=k+e+"C"),r<0?t+=k+-r+"A":r>0&&(t+=k+r+"B"),t},ns=(e=1)=>k+e+"A",gc=(e=1)=>k+e+"B",hc=(e=1)=>k+e+"C",yc=(e=1)=>k+e+"D",is=k+"G",bc=ts?"\x1B7":k+"s",Ec=ts?"\x1B8":k+"u",wc=k+"6n",xc=k+"E",vc=k+"F",Pc=k+"?25l",Tc=k+"?25h",Sc=e=>{let r="";for(let t=0;t[rt,"8",et,et,r,yr,e,rt,"8",et,et,yr].join(""),$c=(e,r={})=>{let t=`${rt}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+Buffer.from(e).toString("base64")+yr},qc={setCwd:(e=dc())=>`${rt}50;CurrentDir=${e}${yr}`,annotation(e,r={}){let t=`${rt}1337;`,n=r.x!==void 0,i=r.y!==void 0;if((n||i)&&!(n&&i&&r.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(n?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+yr}};var en=C(ds(),1);function or(e,r,{target:t="stdout",...n}={}){return en.default[t]?Xt.link(e,r):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,r):`${e} (\u200B${r}\u200B)`}or.isSupported=en.default.stdout;or.stderr=(e,r,t={})=>or(e,r,{target:"stderr",...t});or.stderr.isSupported=en.default.stderr;function xi(e){return or(e,e,{fallback:Y})}var Gc=ms(),vi=Gc.version;function Er(e){let r=Qc();return r||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Wc(e))}function Qc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Wc(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}function Pi(e){return e.name==="DriverAdapterError"&&typeof e.cause=="object"}function rn(e){return{ok:!0,value:e,map(r){return rn(r(e))},flatMap(r){return r(e)}}}function sr(e){return{ok:!1,error:e,map(){return sr(e)},flatMap(){return sr(e)}}}var fs=N("driver-adapter-utils"),Ti=class{registeredErrors=[];consumeError(r){return this.registeredErrors[r]}registerNewError(r){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:r},t}};var tn=(e,r=new Ti)=>{let t={adapterName:e.adapterName,errorRegistry:r,queryRaw:_e(r,e.queryRaw.bind(e)),executeRaw:_e(r,e.executeRaw.bind(e)),executeScript:_e(r,e.executeScript.bind(e)),dispose:_e(r,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await _e(r,e.startTransaction.bind(e))(...n)).map(o=>Jc(r,o))};return e.getConnectionInfo&&(t.getConnectionInfo=Hc(r,e.getConnectionInfo.bind(e))),t},Jc=(e,r)=>({adapterName:r.adapterName,provider:r.provider,options:r.options,queryRaw:_e(e,r.queryRaw.bind(r)),executeRaw:_e(e,r.executeRaw.bind(r)),commit:_e(e,r.commit.bind(r)),rollback:_e(e,r.rollback.bind(r))});function _e(e,r){return async(...t)=>{try{return rn(await r(...t))}catch(n){if(fs("[error@wrapAsync]",n),Pi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}function Hc(e,r){return(...t)=>{try{return rn(r(...t))}catch(n){if(fs("[error@wrapSync]",n),Pi(n))return sr(n.cause);let i=e.registerNewError(n);return sr({kind:"GenericJs",id:i})}}}var Yc=C(on());var M=C(require("node:path")),zc=C(on()),Ph=N("prisma:engines");function gs(){return M.default.join(__dirname,"../")}var Th="libquery-engine";M.default.join(__dirname,"../query-engine-darwin");M.default.join(__dirname,"../query-engine-darwin-arm64");M.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");M.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");M.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");M.default.join(__dirname,"../query-engine-linux-static-x64");M.default.join(__dirname,"../query-engine-linux-static-arm64");M.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");M.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");M.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");M.default.join(__dirname,"../libquery_engine-darwin.dylib.node");M.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");M.default.join(__dirname,"../query_engine-windows.dll.node");var Ri=C(require("node:fs")),hs=gr("chmodPlusX");function Ai(e){if(process.platform==="win32")return;let r=Ri.default.statSync(e),t=r.mode|64|8|1;if(r.mode===t){hs(`Execution permissions of ${e} are fine`);return}let n=t.toString(8).slice(-3);hs(`Have to call chmodPlusX on ${e}`),Ri.default.chmodSync(e,n)}function Ci(e){let r=e.e,t=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=r.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${xi("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ie(e.id)}\`).`,s=hr({message:r.message,code:r.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${t("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${t("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${t("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} -${s} - -Details: ${r.message}`}var Es=C(bs(),1);function Ii(e){let r=(0,Es.default)(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}var ws="prisma+postgres",sn=`${ws}:`;function an(e){return e?.toString().startsWith(`${sn}//`)??!1}function ki(e){if(!an(e))return!1;let{host:r}=new URL(e);return r.includes("localhost")||r.includes("127.0.0.1")||r.includes("[::1]")}var vs=C(Di());function _i(e){return String(new Oi(e))}var Oi=class{constructor(r){this.config=r}toString(){let{config:r}=this,t=r.provider.fromEnvVar?`env("${r.provider.fromEnvVar}")`:r.provider.value,n=JSON.parse(JSON.stringify({provider:t,binaryTargets:Zc(r.binaryTargets)}));return`generator ${r.name} { -${(0,vs.default)(Xc(n),2)} -}`}};function Zc(e){let r;if(e.length>0){let t=e.find(n=>n.fromEnvVar!==null);t?r=`env("${t.fromEnvVar}")`:r=e.map(n=>n.native?"native":n.value)}else r=void 0;return r}function Xc(e){let r=Object.keys(e).reduce((t,n)=>Math.max(t,n.length),0);return Object.entries(e).map(([t,n])=>`${t.padEnd(r)} = ${ep(n)}`).join(` -`)}function ep(e){return JSON.parse(JSON.stringify(e,(r,t)=>Array.isArray(t)?`[${t.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(t)))}var nt={};tr(nt,{error:()=>np,info:()=>tp,log:()=>rp,query:()=>ip,should:()=>Ps,tags:()=>tt,warn:()=>Ni});var tt={error:ce("prisma:error"),warn:ke("prisma:warn"),info:De("prisma:info"),query:nr("prisma:query")},Ps={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function rp(...e){console.log(...e)}function Ni(e,...r){Ps.warn()&&console.warn(`${tt.warn} ${e}`,...r)}function tp(e,...r){console.info(`${tt.info} ${e}`,...r)}function np(e,...r){console.error(`${tt.error} ${e}`,...r)}function ip(e,...r){console.log(`${tt.query} ${e}`,...r)}function ln(e,r){if(!e)throw new Error(`${r}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function Ne(e,r){throw new Error(r)}var it=C(require("node:path"));function Fi(e){return it.default.sep===it.default.posix.sep?e:e.split(it.default.sep).join(it.default.posix.sep)}var ji=C(Os()),un=C(require("node:fs"));var wr=C(require("node:path"));function _s(e){let r=e.ignoreProcessEnv?{}:process.env,t=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(r,p)?r[p]:e.parsed[p]||"",u=t(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(r,n)?r[n]:e.parsed[n];e.parsed[n]=t(i)}for(let n in e.parsed)r[n]=e.parsed[n];return e}var qi=gr("prisma:tryLoadEnv");function st({rootEnvPath:e,schemaEnvPath:r},t={conflictCheck:"none"}){let n=Ns(e);t.conflictCheck!=="none"&&wp(n,r,t.conflictCheck);let i=null;return Ls(n?.path,r)||(i=Ns(r)),!n&&!i&&qi("No Environment variables loaded"),i?.dotenvResult.error?console.error(ce(W("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` -`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function wp(e,r,t){let n=e?.dotenvResult.parsed,i=!Ls(e?.path,r);if(n&&r&&i&&un.default.existsSync(r)){let o=ji.default.parse(un.default.readFileSync(r)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=wr.default.relative(process.cwd(),e.path),l=wr.default.relative(process.cwd(),r);if(t==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${Y(a)} and ${Y(l)} -Conflicting env vars: -${s.map(c=>` ${W(c)}`).join(` -`)} - -We suggest to move the contents of ${Y(l)} to ${Y(a)} to consolidate your env vars. -`;throw new Error(u)}else if(t==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>W(c)).join(", ")} in ${Y(a)} and ${Y(l)} -Env vars from ${Y(l)} overwrite the ones from ${Y(a)} - `;console.warn(`${ke("warn(prisma)")} ${u}`)}}}}function Ns(e){if(xp(e)){qi(`Environment variables loaded from ${e}`);let r=ji.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:_s(r),message:Ie(`Environment variables loaded from ${wr.default.relative(process.cwd(),e)}`),path:e}}else qi(`Environment variables not found at ${e}`);return null}function Ls(e,r){return e&&r&&wr.default.resolve(e)===wr.default.resolve(r)}function xp(e){return!!(e&&un.default.existsSync(e))}function Vi(e,r){return Object.prototype.hasOwnProperty.call(e,r)}function xr(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function Bi(e,r){if(e.length===0)return;let t=e[0];for(let n=1;n{Ms.has(e)||(Ms.add(e),Ni(r,...t))};var T=class e extends Error{clientVersion;errorCode;retryable;constructor(r,t,n){super(r),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};x(T,"PrismaClientInitializationError");var z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(r,{code:t,clientVersion:n,meta:i,batchRequestIdx:o}){super(r),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};x(z,"PrismaClientKnownRequestError");var le=class extends Error{clientVersion;constructor(r,t){super(r),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};x(le,"PrismaClientRustPanicError");var j=class extends Error{clientVersion;batchRequestIdx;constructor(r,{clientVersion:t,batchRequestIdx:n}){super(r),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};x(j,"PrismaClientUnknownRequestError");var Z=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(r,{clientVersion:t}){super(r),this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};x(Z,"PrismaClientValidationError");var vr=9e15,Ke=1e9,Ui="0123456789abcdef",fn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",gn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Gi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-vr,maxE:vr,crypto:!1},Vs,Fe,w=!0,yn="[DecimalError] ",He=yn+"Invalid argument: ",Bs=yn+"Precision limit exceeded",Us=yn+"crypto unavailable",Gs="[object Decimal]",X=Math.floor,U=Math.pow,vp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Pp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Tp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Qs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,E=7,Sp=9007199254740991,Rp=fn.length-1,Qi=gn.length-1,m={toStringTag:Gs};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(He+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};m.comparedTo=m.cmp=function(e){var r,t,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,r=0,t=na[r]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Ap(n,Ys(n,t)),n.precision=e,n.rounding=r,y(Fe==2||Fe==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,r,t,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(w=!1,o=c.s*U(c.s*c,1/3),!o||Math.abs(o)==1/0?(t=J(c.d),e=c.e,(o=(e-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=U(t,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=L(u.plus(c).times(a),u.plus(l),s+2,1),J(a.d).slice(0,s)===(t=J(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,e+1,1),r=!n.times(n).times(n).eq(c));break}return w=!0,y(n,e,p.rounding,r)};m.decimalPlaces=m.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-X(this.e/E))*E,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};m.dividedBy=m.div=function(e){return L(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var r=this,t=r.constructor;return y(L(r,new t(e),0,1,1),t.precision,t.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var r=this.cmp(e);return r==1||r===0};m.hyperbolicCosine=m.cosh=function(){var e,r,t,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;t=s.precision,n=s.rounding,s.precision=t+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),r=(1/En(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),o=Pr(s,1,o.times(r),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=t,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,r,t,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(r=o.precision,t=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Pr(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/En(5,e)),i=Pr(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=r,o.rounding=t,y(i,r,t,!0)};m.hyperbolicTangent=m.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,L(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};m.inverseCosine=m.acos=function(){var e=this,r=e.constructor,t=e.abs().cmp(1),n=r.precision,i=r.rounding;return t!==-1?t===0?e.isNeg()?we(r,n,i):new r(0):new r(NaN):e.isZero()?we(r,n+4,i).times(.5):(r.precision=n+6,r.rounding=1,e=new r(1).minus(e).div(e.plus(1)).sqrt().atan(),r.precision=n,r.rounding=i,e.times(2))};m.inverseHyperbolicCosine=m.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,w=!1,t=t.times(t).minus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};m.inverseHyperbolicSine=m.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,w=!1,t=t.times(t).plus(1).sqrt().plus(t),w=!0,n.precision=e,n.rounding=r,t.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,r,t,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,r=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,r,!0):(o.precision=t=n-i.e,i=L(i.plus(1),new o(1).minus(i),t+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=r,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,r,t,n,i=this,o=i.constructor;return i.isZero()?new o(i):(r=i.abs().cmp(1),t=o.precision,n=o.rounding,r!==-1?r===0?(e=we(o,t+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=t+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=t,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Qi)return s=we(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Qi)return s=we(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,t=Math.min(28,a/E+2|0),e=t;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(w=!1,r=Math.ceil(a/E),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[r]!==void 0)for(e=r;s.d[e]===o.d[e]&&e--;);return t&&(s=s.times(2<this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),r=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new c(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)o=!0;else{for(i=t[0];i%10===0;)i/=10;o=i!==1}if(w=!1,a=p+f,s=Je(u,a),n=r?hn(c,a+10):Je(e,a),l=L(s,n,a,1),lt(l.d,i=p,d))do if(a+=10,s=Je(u,a),n=r?hn(c,a+10):Je(e,a),l=L(s,n,a,1),!o){+J(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(lt(l.d,i+=10,d));return w=!0,y(l,p,d)};m.minus=m.sub=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.constructor;if(e=new h(e),!f.d||!e.d)return!f.s||!e.s?e=new h(NaN):f.d?e.s=-e.s:e=new h(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=h.precision,l=h.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new h(f);else return new h(l===3?-0:0);return w?y(e,a,l):e}if(t=X(e.e/E),c=X(f.e/E),u=u.slice(),o=c-t,o){for(p=o<0,p?(r=u,o=-o,s=d.length):(r=d,t=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,r.length=1),r.reverse(),n=o;n--;)r.push(0);r.reverse()}else{for(n=u.length,s=d.length,p=n0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,t=c,c=u,u=t),r=0;i;)r=(u[--i]=u[i]+c[i]+r)/fe|0,u[i]%=fe;for(r&&(u.unshift(r),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=bn(u,n),w?y(e,a,l):e};m.precision=m.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(He+e);return t.d?(r=Ws(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};m.round=function(){var e=this,r=e.constructor;return y(new r(e),e.e+1,r.rounding)};m.sine=m.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=Ip(n,Ys(n,t)),n.precision=e,n.rounding=r,y(Fe>2?t.neg():t,e,r,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,r,t,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(w=!1,u=Math.sqrt(+s),u==0||u==1/0?(r=J(a),(r.length+l)%2==0&&(r+="0"),u=Math.sqrt(r),l=X((l+1)/2)-(l<0||l%2),u==1/0?r="5e"+l:(r=u.toExponential(),r=r.slice(0,r.indexOf("e")+1)+l),n=new c(r)):n=new c(u.toString()),t=(l=c.precision)+3;;)if(o=n,n=o.plus(L(s,o,t+2,1)).times(.5),J(o.d).slice(0,t)===(r=J(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}t+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return w=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=L(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,y(Fe==2||Fe==4?t.neg():t,e,r,!0)):new n(NaN)};m.times=m.mul=function(e){var r,t,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(t=X(c.e/E)+X(e.e/E),l=d.length,u=f.length,l=0;){for(r=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+r,o[i--]=a%fe|0,r=a/fe|0;o[i]=(o[i]+r)%fe|0}for(;!o[--s];)o.pop();return r?++t:o.shift(),e.d=o,e.e=bn(o,t),w?y(e,p.precision,p.rounding):e};m.toBinary=function(e,r){return Ji(this,2,e,r)};m.toDecimalPlaces=m.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(ie(e,0,Ke),r===void 0?r=n.rounding:ie(r,0,8),y(t,e+t.e+1,r))};m.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=xe(n,!0):(ie(e,0,Ke),r===void 0?r=i.rounding:ie(r,0,8),n=y(new i(n),e+1,r),t=xe(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toFixed=function(e,r){var t,n,i=this,o=i.constructor;return e===void 0?t=xe(i):(ie(e,0,Ke),r===void 0?r=o.rounding:ie(r,0,8),n=y(new o(i),e+i.e+1,r),t=xe(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};m.toFraction=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,h=f.d,g=f.constructor;if(!h)return new g(f);if(u=t=new g(1),n=l=new g(0),r=new g(n),o=r.e=Ws(h)-f.e-1,s=o%E,r.d[0]=U(10,s<0?E+s:s),e==null)e=o>0?r:u;else{if(a=new g(e),!a.isInt()||a.lt(u))throw Error(He+a);e=a.gt(r)?o>0?r:u:a}for(w=!1,a=new g(J(h)),c=g.precision,g.precision=o=h.length*E*2;p=L(a,r,0,1,1),i=t.plus(p.times(n)),i.cmp(e)!=1;)t=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=r,r=a.minus(p.times(i)),a=i;return i=L(e.minus(t),n,0,1,1),l=l.plus(i.times(u)),t=t.plus(i.times(n)),l.s=u.s=f.s,d=L(u,n,o,1).minus(f).abs().cmp(L(l,t,o,1).minus(f).abs())<1?[u,n]:[l,t],g.precision=c,w=!0,d};m.toHexadecimal=m.toHex=function(e,r){return Ji(this,16,e,r)};m.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:ie(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(w=!1,t=L(t,e,0,r,1).times(e),w=!0,y(t)):(e.s=t.s,t=e),t};m.toNumber=function(){return+this};m.toOctal=function(e,r){return Ji(this,8,e,r)};m.toPower=m.pow=function(e){var r,t,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(U(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(r=X(e.e/E),r>=e.d.length-1&&(t=u<0?-u:u)<=Sp)return i=Js(l,a,t,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(rl.maxE+1||r0?s/0:0):(w=!1,l.rounding=a.s=1,t=Math.min(12,(r+"").length),i=Wi(e.times(Je(a,n+t)),n),i.d&&(i=y(i,n+5,1),lt(i.d,n,o)&&(r=n+10,i=y(Wi(e.times(Je(a,r+t)),r),r+5,1),+J(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,w=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=xe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ie(e,1,Ke),r===void 0?r=i.rounding:ie(r,0,8),n=y(new i(n),e,r),t=xe(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toSignificantDigits=m.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(ie(e,1,Ke),r===void 0?r=n.rounding:ie(r,0,8)),y(new n(t),e,r)};m.toString=function(){var e=this,r=e.constructor,t=xe(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,r=e.constructor,t=xe(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function J(e){var r,t,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;rt)throw Error(He+e)}function lt(e,r,t,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--r;return--r<0?(r+=E,i=0):(i=Math.ceil((r+1)/E),r%=E),o=U(10,E-r),a=e[i]%o|0,n==null?r<3?(r==0?a=a/100|0:r==1&&(a=a/10|0),s=t<4&&a==99999||t>3&&a==49999||a==5e4||a==0):s=(t<4&&a+1==o||t>3&&a+1==o/2)&&(e[i+1]/o/100|0)==U(10,r-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:r<4?(r==0?a=a/1e3|0:r==1?a=a/100|0:r==2&&(a=a/10|0),s=(n||t<4)&&a==9999||!n&&t>3&&a==4999):s=((n||t<4)&&a+1==o||!n&&t>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==U(10,r-3)-1,s}function dn(e,r,t){for(var n,i=[0],o,s=0,a=e.length;st-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function Ap(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/En(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),e.precision+=t,r=Pr(e,1,r.times(i),new e(1));for(var o=t;o--;){var s=r.times(r);r=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,r}var L=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function r(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function t(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,d,f,h,g,S,P,R,b,D,me,ae,Hr,V,te,Ce,H,fr,jt=n.constructor,ni=n.s==i.s?1:-1,K=n.d,_=i.d;if(!K||!K[0]||!_||!_[0])return new jt(!n.s||!i.s||(K?_&&K[0]==_[0]:!_)?NaN:K&&K[0]==0||!_?ni*0:ni/0);for(l?(f=1,c=n.e-i.e):(l=fe,f=E,c=X(n.e/f)-X(i.e/f)),H=_.length,te=K.length,P=new jt(ni),R=P.d=[],p=0;_[p]==(K[p]||0);p++);if(_[p]>(K[p]||0)&&c--,o==null?(ae=o=jt.precision,s=jt.rounding):a?ae=o+(n.e-i.e)+1:ae=o,ae<0)R.push(1),h=!0;else{if(ae=ae/f+2|0,p=0,H==1){for(d=0,_=_[0],ae++;(p1&&(_=e(_,d,l),K=e(K,d,l),H=_.length,te=K.length),V=H,b=K.slice(0,H),D=b.length;D=l/2&&++Ce;do d=0,u=r(_,b,H,D),u<0?(me=b[0],H!=D&&(me=me*l+(b[1]||0)),d=me/Ce|0,d>1?(d>=l&&(d=l-1),g=e(_,d,l),S=g.length,D=b.length,u=r(g,b,S,D),u==1&&(d--,t(g,H=10;d/=10)p++;P.e=p+c*f-1,y(P,a?o+P.e+1:o,s,h)}return P}}();function y(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(r!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=r-i,o<0)o+=E,s=r,c=p[d=0],l=c/U(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:c/U(10,i-s-1)%10|0}if(n=n||r<0||p[d+1]!==void 0||(s<0?c:c%U(10,i-s-1)),u=t<4?(l||n)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||n||t==6&&(o>0?s>0?c/U(10,i-s):0:p[d-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,u?(r-=e.e+1,p[0]=U(10,(E-r%E)%E),e.e=-r||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=U(10,E-o),p[d]=s>0?(c/U(10,i-s)%U(10,s)|0)*a:0),u)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==fe&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=fe)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return w&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+We(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+We(-i-1)+o,t&&(n=t-s)>0&&(o+=We(n))):i>=s?(o+=We(i+1-s),t&&(n=t-i-1)>0&&(o=o+"."+We(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=We(n))),o}function bn(e,r){var t=e[0];for(r*=E;t>=10;t/=10)r++;return r}function hn(e,r,t){if(r>Rp)throw w=!0,t&&(e.precision=t),Error(Bs);return y(new e(fn),r,1,!0)}function we(e,r,t){if(r>Qi)throw Error(Bs);return y(new e(gn),r,t,!0)}function Ws(e){var r=e.length-1,t=r*E+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function We(e){for(var r="";e--;)r+="0";return r}function Js(e,r,t,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(w=!1;;){if(t%2&&(o=o.times(r),qs(o.d,s)&&(i=!0)),t=X(t/2),t===0){t=o.d.length-1,i&&o.d[t]===0&&++o.d[t];break}r=r.times(r),qs(r.d,s)}return w=!0,o}function $s(e){return e.d[e.d.length-1]&1}function Hs(e,r,t){for(var n,i,o=new e(r[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(r==null?(w=!1,l=h):l=r,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(U(2,p))/Math.LN10*2+5|0,l+=n,t=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),t=t.times(++c),a=s.plus(L(o,t,l,1)),J(a.d).slice(0,l)===J(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(r==null)if(u<3&<(s.d,l-n,f,u))d.precision=l+=10,t=o=a=new d(1),c=0,u++;else return y(s,d.precision=h,f,w=!0);else return d.precision=h,s}s=a}}function Je(e,r){var t,n,i,o,s,a,l,u,c,p,d,f=1,h=10,g=e,S=g.d,P=g.constructor,R=P.rounding,b=P.precision;if(g.s<0||!S||!S[0]||!g.e&&S[0]==1&&S.length==1)return new P(S&&!S[0]?-1/0:g.s!=1?NaN:S?0:g);if(r==null?(w=!1,c=b):c=r,P.precision=c+=h,t=J(S),n=t.charAt(0),Math.abs(o=g.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)g=g.times(e),t=J(g.d),n=t.charAt(0),f++;o=g.e,n>1?(g=new P("0."+t),o++):g=new P(n+"."+t.slice(1))}else return u=hn(P,c+2,b).times(o+""),g=Je(new P(n+"."+t.slice(1)),c-h).plus(u),P.precision=b,r==null?y(g,b,R,w=!0):g;for(p=g,l=s=g=L(g.minus(1),g.plus(1),c,1),d=y(g.times(g),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(L(s,new P(i),c,1)),J(u.d).slice(0,c)===J(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(hn(P,c+2,b).times(o+""))),l=L(l,new P(f),c,1),r==null)if(lt(l.d,c-h,R,a))P.precision=c+=h,u=s=g=L(p.minus(1),p.plus(1),c,1),d=y(g.times(g),c,1),i=a=1;else return y(l,P.precision=b,R,w=!0);else return P.precision=b,l;l=u,i+=2}}function Ks(e){return String(e.s*e.s/0)}function mn(e,r){var t,n,i;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(i=r.length;r.charCodeAt(i-1)===48;--i);if(r=r.slice(n,i),r){if(i-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%E,t<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),Qs.test(r))return mn(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(Pp.test(r))t=16,r=r.toLowerCase();else if(vp.test(r))t=2;else if(Tp.test(r))t=8;else throw Error(He+r);for(o=r.search(/p/i),o>0?(l=+r.slice(o+1),r=r.substring(2,o)):r=r.slice(2),o=r.indexOf("."),s=o>=0,n=e.constructor,s&&(r=r.replace(".",""),a=r.length,o=a-o,i=Js(n,new n(t),o,o*2)),u=dn(r,t,fe),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=bn(u,c),e.d=u,w=!1,s&&(e=L(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?U(2,l):ar.pow(2,l))),w=!0,e)}function Ip(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:Pr(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/En(5,t)),r=Pr(e,2,r,r);for(var i,o=new e(5),s=new e(16),a=new e(20);t--;)i=r.times(r),r=r.times(o.plus(i.times(s.times(i).minus(a))));return r}function Pr(e,r,t,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/E);for(w=!1,l=t.times(t),a=new e(n);;){if(s=L(a.times(l),new e(r++*r++),c,1),a=i?n.plus(s):n.minus(s),n=L(s.times(l),new e(r++*r++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return w=!0,s.d.length=p+1,s}function En(e,r){for(var t=e;--r;)t*=e;return t}function Ys(e,r){var t,n=r.s<0,i=we(e,e.precision,1),o=i.times(.5);if(r=r.abs(),r.lte(o))return Fe=n?4:1,r;if(t=r.divToInt(i),t.isZero())Fe=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(o))return Fe=$s(t)?n?2:3:n?4:1,r;Fe=$s(t)?n?1:4:n?3:2}return r.minus(i).abs()}function Ji(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,h=t!==void 0;if(h?(ie(t,1,Ke),n===void 0?n=f.rounding:ie(n,0,8)):(t=f.precision,n=f.rounding),!e.isFinite())c=Ks(e);else{for(c=xe(e),s=c.indexOf("."),h?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=dn(xe(d),10,i),d.e=d.d.length),p=dn(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=h?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=L(e,d,t,n,0,i),p=e.d,o=e.e,u=Vs),s=p[t],a=i/2,u=u||p[t+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[t-1]&1||n===(e.s<0?8:7)),p.length=t,u)for(;++p[--t]>i-1;)p[t]=0,t||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(r==16||r==8){for(s=r==16?4:3,--l;l%s;l++)c+="0";for(p=dn(c,i,r),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else or)return e.length=r,!0}function kp(e){return new this(e).abs()}function Dp(e){return new this(e).acos()}function Op(e){return new this(e).acosh()}function _p(e,r){return new this(e).plus(r)}function Np(e){return new this(e).asin()}function Lp(e){return new this(e).asinh()}function Fp(e){return new this(e).atan()}function Mp(e){return new this(e).atanh()}function $p(e,r){e=new this(e),r=new this(r);var t,n=this.precision,i=this.rounding,o=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=we(this,o,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?we(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=we(this,o,1).times(.5),t.s=e.s):r.s<0?(this.precision=o,this.rounding=1,t=this.atan(L(e,r,o,1)),r=we(this,o,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(L(e,r,o,1)),t}function qp(e){return new this(e).cbrt()}function jp(e){return y(e=new this(e),e.e+1,2)}function Vp(e,r,t){return new this(e).clamp(r,t)}function Bp(e){if(!e||typeof e!="object")throw Error(yn+"Object expected");var r,t,n,i=e.defaults===!0,o=["precision",1,Ke,"rounding",0,8,"toExpNeg",-vr,0,"toExpPos",0,vr,"maxE",0,vr,"minE",-vr,0,"modulo",0,9];for(r=0;r=o[r+1]&&n<=o[r+2])this[t]=n;else throw Error(He+t+": "+n);if(t="crypto",i&&(this[t]=Gi[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Us);else this[t]=!1;else throw Error(He+t+": "+n);return this}function Up(e){return new this(e).cos()}function Gp(e){return new this(e).cosh()}function zs(e){var r,t,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,js(o)){u.s=o.s,w?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;w?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?r[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(r,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Us);else for(;o=10;i/=10)n++;nAr,datamodelEnumToSchemaEnum:()=>yd});function yd(e){return{name:e.name,values:e.values.map(r=>r.name)}}var Ar=(b=>(b.findUnique="findUnique",b.findUniqueOrThrow="findUniqueOrThrow",b.findFirst="findFirst",b.findFirstOrThrow="findFirstOrThrow",b.findMany="findMany",b.create="create",b.createMany="createMany",b.createManyAndReturn="createManyAndReturn",b.update="update",b.updateMany="updateMany",b.updateManyAndReturn="updateManyAndReturn",b.upsert="upsert",b.delete="delete",b.deleteMany="deleteMany",b.groupBy="groupBy",b.count="count",b.aggregate="aggregate",b.findRaw="findRaw",b.aggregateRaw="aggregateRaw",b))(Ar||{});var ia=C(Di());var na=C(require("node:fs"));var ea={keyword:De,entity:De,value:e=>W(nr(e)),punctuation:nr,directive:De,function:De,variable:e=>W(nr(e)),string:e=>W(qe(e)),boolean:ke,number:De,comment:Kr};var bd=e=>e,xn={},Ed=0,v={manual:xn.Prism&&xn.Prism.manual,disableWorkerMessageHandler:xn.Prism&&xn.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ge){let r=e;return new ge(r.type,v.util.encode(r.content),r.alias)}else return Array.isArray(e)?e.map(v.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ce instanceof ge)continue;if(me&&V!=r.length-1){R.lastIndex=te;var p=R.exec(e);if(!p)break;var c=p.index+(D?p[1].length:0),d=p.index+p[0].length,a=V,l=te;for(let _=r.length;a<_&&(l=l&&(++V,te=l);if(r[V]instanceof ge)continue;u=a-V,Ce=e.slice(te,l),p.index-=te}else{R.lastIndex=0;var p=R.exec(Ce),u=1}if(!p){if(o)break;continue}D&&(ae=p[1]?p[1].length:0);var c=p.index+ae,p=p[0].slice(ae),d=c+p.length,f=Ce.slice(0,c),h=Ce.slice(d);let H=[V,u];f&&(++V,te+=f.length,H.push(f));let fr=new ge(g,b?v.tokenize(p,b):p,Hr,p,me);if(H.push(fr),h&&H.push(h),Array.prototype.splice.apply(r,H),u!=1&&v.matchGrammar(e,r,t,V,te,!0,g),o)break}}}},tokenize:function(e,r){let t=[e],n=r.rest;if(n){for(let i in n)r[i]=n[i];delete r.rest}return v.matchGrammar(e,t,r,0,0,!1),t},hooks:{all:{},add:function(e,r){let t=v.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){let t=v.hooks.all[e];if(!(!t||!t.length))for(var n=0,i;i=t[n++];)i(r)}},Token:ge};v.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};v.languages.javascript=v.languages.extend("clike",{"class-name":[v.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});v.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;v.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:v.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:v.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:v.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:v.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});v.languages.markup&&v.languages.markup.tag.addInlined("script","javascript");v.languages.js=v.languages.javascript;v.languages.typescript=v.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});v.languages.ts=v.languages.typescript;function ge(e,r,t,n,i){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0,this.greedy=!!i}ge.stringify=function(e,r){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return ge.stringify(t,r)}).join(""):wd(e.type)(e.content)};function wd(e){return ea[e]||bd}function ra(e){return xd(e,v.languages.javascript)}function xd(e,r){return v.tokenize(e,r).map(n=>ge.stringify(n)).join("")}function ta(e){return Ii(e)}var vn=class e{firstLineNumber;lines;static read(r){let t;try{t=na.default.readFileSync(r,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(r){let t=r.split(/\r?\n/);return new e(1,t)}constructor(r,t){this.firstLineNumber=r,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(r,t){if(rthis.lines.length+this.firstLineNumber)return this;let n=r-this.firstLineNumber,i=[...this.lines];return i[n]=t(i[n]),new e(this.firstLineNumber,i)}mapLines(r){return new e(this.firstLineNumber,this.lines.map((t,n)=>r(t,this.firstLineNumber+n)))}lineAt(r){return this.lines[r-this.firstLineNumber]}prependSymbolAt(r,t){return this.mapLines((n,i)=>i===r?`${t} ${n}`:` ${n}`)}slice(r,t){let n=this.lines.slice(r-1,t).join(` -`);return new e(r,ta(n).split(` -`))}highlight(){let r=ra(this.toString());return new e(this.firstLineNumber,r.split(` -`))}toString(){return this.lines.join(` -`)}};var vd={red:ce,gray:Kr,dim:Ie,bold:W,underline:Y,highlightSource:e=>e.highlight()},Pd={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Td({message:e,originalMethod:r,isPanic:t,callArguments:n}){return{functionName:`prisma.${r}()`,message:e,isPanic:t??!1,callArguments:n}}function Sd({callsite:e,message:r,originalMethod:t,isPanic:n,callArguments:i},o){let s=Td({message:r,originalMethod:t,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=vn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Ad(c),d=Rd(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,h=>h.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((h,g)=>o.gray(String(g).padStart(f))+" "+h).mapLines(h=>o.dim(h)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let h=p+f+1;h+=2,s.callArguments=(0,ia.default)(i,h).slice(h)}}return s}function Rd(e){let r=Object.keys(Ar).join("|"),n=new RegExp(String.raw`\.(${r})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Ad(e){let r=0;for(let t=0;t"Unknown error")}function ua(e){return e.errors.flatMap(r=>r.kind==="Union"?ua(r):[r])}function kd(e){let r=new Map,t=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){t.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=r.get(i);o?r.set(i,{...n,argument:{...n.argument,typeNames:Dd(o.argument.typeNames,n.argument.typeNames)}}):r.set(i,n)}return t.push(...r.values()),t}function Dd(e,r){return[...new Set(e.concat(r))]}function Od(e){return Bi(e,(r,t)=>{let n=sa(r),i=sa(t);return n!==i?n-i:aa(r)-aa(t)})}function sa(e){let r=0;return Array.isArray(e.selectionPath)&&(r+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(r+=e.argumentPath.length),r}function aa(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var ue=class{constructor(r,t){this.name=r;this.value=t}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(r){let{colors:{green:t}}=r.context;r.addMarginSymbol(t(this.isRequired?"+":"?")),r.write(t(this.name)),this.isRequired||r.write(t("?")),r.write(t(": ")),typeof this.value=="string"?r.write(t(this.value)):r.write(this.value)}};pa();var Cr=class{constructor(r=0,t){this.context=t;this.currentIndent=r}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(r){return typeof r=="string"?this.currentLine+=r:r.write(this),this}writeJoined(r,t,n=(i,o)=>o.write(i)){let i=t.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(r){return this.marginSymbol=r,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let r=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+r.slice(1):r}};ca();var Sn=class{constructor(r){this.value=r}write(r){r.write(this.value)}markAsError(){this.value.markAsError()}};var Rn=e=>e,An={bold:Rn,red:Rn,green:Rn,dim:Rn,enabled:!1},da={bold:W,red:ce,green:qe,dim:Ie,enabled:!0},Ir={write(e){e.writeLine(",")}};var Te=class{constructor(r){this.contents=r}isUnderlined=!1;color=r=>r;underline(){return this.isUnderlined=!0,this}setColor(r){return this.color=r,this}write(r){let t=r.getCurrentLineLength();r.write(this.color(this.contents)),this.isUnderlined&&r.afterNextNewline(()=>{r.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var ze=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var kr=class extends ze{items=[];addItem(r){return this.items.push(new Sn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(t=>t.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let t=new Te("[]");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithItems(r){let{colors:t}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Ir,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(t.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Dr=class e extends ze{fields={};suggestions=[];addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[t,...n]=r,i=this.getField(t);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof kr&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let t=this;for(let n of r){if(!(t instanceof e))return;let i=t.getSubSelectionValue(n);if(!i)return;t=i}return t}getDeepSelectionParent(r){let t=this.getSelectionParent();if(!t)return;let n=t;for(let i of r){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let t=this.getField("include")?.value.asObject();if(t)return{kind:"include",value:t}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(n=>n.getPrintWidth()))+2}write(r){let t=Object.values(this.fields);if(t.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,t)}asObject(){return this}writeEmpty(r){let t=new Te("{}");this.hasError&&t.setColor(r.context.colors.red).underline(),r.write(t)}writeWithContents(r,t){r.writeLine("{").withIndent(()=>{r.writeJoined(Ir,[...t,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var Q=class extends ze{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let n=new Te(this.text);this.hasError&&n.underline().setColor(t.context.colors.red),t.write(n)}asObject(){}};var pt=class{fields=[];addField(r,t){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${r}: ${t}`))).addMarginSymbol(i(o("+")))}}),this}write(r){let{colors:{green:t}}=r.context;r.writeLine(t("{")).withIndent(()=>{r.writeJoined(Ir,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function Tn(e,r,t){switch(e.kind){case"MutuallyExclusiveFields":_d(e,r);break;case"IncludeOnScalar":Nd(e,r);break;case"EmptySelection":Ld(e,r,t);break;case"UnknownSelectionField":qd(e,r);break;case"InvalidSelectionValue":jd(e,r);break;case"UnknownArgument":Vd(e,r);break;case"UnknownInputField":Bd(e,r);break;case"RequiredArgumentMissing":Ud(e,r);break;case"InvalidArgumentType":Gd(e,r);break;case"InvalidArgumentValue":Qd(e,r);break;case"ValueTooLarge":Wd(e,r);break;case"SomeFieldsMissing":Jd(e,r);break;case"TooManyFieldsGiven":Hd(e,r);break;case"Union":la(e,r,t);break;default:throw new Error("not implemented: "+e.kind)}}function _d(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),r.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Nd(e,r){let[t,n]=Or(e.selectionPath),i=e.outputType,o=r.arguments.getDeepSelectionParent(t)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));r.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${dt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ld(e,r,t){let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Fd(e,r,i);return}if(n.hasField("select")){Md(e,r);return}}if(t?.[Ye(e.outputType.name)]){$d(e,r);return}r.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Fd(e,r,t){t.removeAllFields();for(let n of e.outputType.fields)t.addSuggestion(new ue(n.name,"false"));r.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Md(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ha(n,t)),r.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(t.name)} must not be empty. ${dt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(t.name)} needs ${o.bold("at least one truthy value")}.`)}function $d(e,r){let t=new pt;for(let i of e.outputType.fields)i.isRelation||t.addField(i.name,"false");let n=new ue("omit",t).makeRequired();if(e.selectionPath.length===0)r.arguments.addSuggestion(n);else{let[i,o]=Or(e.selectionPath),a=r.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new Dr;l.addSuggestion(n),a.value=l}}r.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function qd(e,r){let t=ya(e.selectionPath,r);if(t.parentKind!=="unknown"){t.field.markAsError();let n=t.parent;switch(t.parentKind){case"select":ha(n,e.outputType);break;case"include":Kd(n,e.outputType);break;case"omit":Yd(n,e.outputType);break}}r.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&i.push(`for ${n.bold(t.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(dt(n)),i.join(" ")})}function jd(e,r){let t=ya(e.selectionPath,r);t.parentKind!=="unknown"&&t.field.value.markAsError(),r.addErrorMessage(n=>`Invalid value for selection field \`${n.red(t.fieldName)}\`: ${e.underlyingError}`)}function Vd(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(t)?.markAsError(),zd(n,e.arguments)),r.addErrorMessage(i=>fa(i,t,e.arguments.map(o=>o.name)))}function Bd(e,r){let[t,n]=Or(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t)?.asObject();o&&ba(o,e.inputType)}r.addErrorMessage(o=>fa(o,n,e.inputType.fields.map(s=>s.name)))}function fa(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=Xd(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(dt(e)),n.join(" ")}function Ud(e,r){let t;r.addErrorMessage(l=>t?.value instanceof Q&&t.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Or(e.argumentPath),s=new pt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(t=a.getField(o),t&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ue(o,s).makeRequired())}else{let l=e.inputTypes.map(ga).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=Or(e.dependentArgumentPath);r.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function ga(e){return e.kind==="list"?`${ga(e.elementType)}[]`:e.name}function Gd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=Cn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Qd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(t)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Cn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Wd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof Q&&(i=s.text)}r.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(t)}\``),s.join(" ")})}function Jd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ba(i,e.inputType)}r.addErrorMessage(i=>{let o=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Cn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(dt(i)),o.join(" ")})}function Hd(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}r.addErrorMessage(o=>{let s=[`Argument \`${o.bold(t)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Cn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ha(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ue(t.name,"true"))}function Kd(e,r){for(let t of r.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new ue(t.name,"true"))}function Yd(e,r){for(let t of r.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new ue(t.name,"true"))}function zd(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new ue(t.name,t.typeNames.join(" | ")))}function ya(e,r){let[t,n]=Or(e),i=r.arguments.getDeepSubSelectionValue(t)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ba(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new ue(t.name,t.typeNames.join(" | ")))}function Or(e){let r=[...e],t=r.pop();if(!t)throw new Error("unexpected empty path");return[r,t]}function dt({green:e,enabled:r}){return"Available options are "+(r?`listed in ${e("green")}`:"marked with ?")+"."}function Cn(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var Zd=3;function Xd(e,r){let t=1/0,n;for(let i of r){let o=(0,ma.default)(e,i);o>Zd||o`}};function _r(e){return e instanceof mt}var In=Symbol(),zi=new WeakMap,Me=class{constructor(r){r===In?zi.set(this,`Prisma.${this._getName()}`):zi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return zi.get(this)}},ft=class extends Me{_getNamespace(){return"NullTypes"}},gt=class extends ft{#e};Zi(gt,"DbNull");var ht=class extends ft{#e};Zi(ht,"JsonNull");var yt=class extends ft{#e};Zi(yt,"AnyNull");var kn={classes:{DbNull:gt,JsonNull:ht,AnyNull:yt},instances:{DbNull:new gt(In),JsonNull:new ht(In),AnyNull:new yt(In)}};function Zi(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}var Ea=": ",Dn=class{constructor(r,t){this.name=r;this.value=t}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ea.length}write(r){let t=new Te(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(Ea).write(this.value)}};var Xi=class{arguments;errorMessages=[];constructor(r){this.arguments=r}write(r){r.write(this.arguments)}addErrorMessage(r){this.errorMessages.push(r)}renderAllMessages(r){return this.errorMessages.map(t=>t(r)).join(` -`)}};function Nr(e){return new Xi(wa(e))}function wa(e){let r=new Dr;for(let[t,n]of Object.entries(e)){let i=new Dn(t,xa(n));r.addField(i)}return r}function xa(e){if(typeof e=="string")return new Q(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new Q(String(e));if(typeof e=="bigint")return new Q(`${e}n`);if(e===null)return new Q("null");if(e===void 0)return new Q("undefined");if(Rr(e))return new Q(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new Q(`Buffer.alloc(${e.byteLength})`):new Q(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let r=wn(e)?e.toISOString():"Invalid Date";return new Q(`new Date("${r}")`)}return e instanceof Me?new Q(`Prisma.${e._getName()}`):_r(e)?new Q(`prisma.${Ye(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?em(e):typeof e=="object"?wa(e):new Q(Object.prototype.toString.call(e))}function em(e){let r=new kr;for(let t of e)r.addItem(xa(t));return r}function On(e,r){let t=r==="pretty"?da:An,n=e.renderAllMessages(t),i=new Cr(0,{colors:t}).write(e).toString();return{message:n,args:i}}function _n({args:e,errors:r,errorFormat:t,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Nr(e);for(let p of r)Tn(p,a,s);let{message:l,args:u}=On(a,t),c=Pn({message:l,callsite:n,originalMethod:i,showColors:t==="pretty",callArguments:u});throw new Z(c,{clientVersion:o})}function Se(e){return e.replace(/^./,r=>r.toLowerCase())}function Pa(e,r,t){let n=Se(t);return!r.result||!(r.result.$allModels||r.result[n])?e:rm({...e,...va(r.name,e,r.result.$allModels),...va(r.name,e,r.result[n])})}function rm(e){let r=new Pe,t=(n,i)=>r.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>t(o,i)):[n]));return xr(e,n=>({...n,needs:t(n.name,new Set)}))}function va(e,r,t){return t?xr(t,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:tm(r,o,i)})):{}}function tm(e,r,t){let n=e?.[r]?.compute;return n?i=>t({...i,[r]:n(i)}):t}function Ta(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(e[n.name])for(let i of n.needs)t[i]=!0;return t}function Sa(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(!e[n.name])for(let i of n.needs)delete t[i];return t}var Nn=class{constructor(r,t){this.extension=r;this.previous=t}computedFieldsCache=new Pe;modelExtensionsCache=new Pe;queryCallbacksCache=new Pe;clientExtensions=ut(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=ut(()=>{let r=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?r.concat(t):r});getAllComputedFields(r){return this.computedFieldsCache.getOrCreate(r,()=>Pa(this.previous?.getAllComputedFields(r),this.extension,r))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(r){return this.modelExtensionsCache.getOrCreate(r,()=>{let t=Se(r);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(r):{...this.previous?.getAllModelExtensions(r),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(r,t){return this.queryCallbacksCache.getOrCreate(`${r}:${t}`,()=>{let n=this.previous?.getAllQueryCallbacks(r,t)??[],i=[],o=this.extension.query;return!o||!(o[r]||o.$allModels||o[t]||o.$allOperations)?n:(o[r]!==void 0&&(o[r][t]!==void 0&&i.push(o[r][t]),o[r].$allOperations!==void 0&&i.push(o[r].$allOperations)),r!=="$none"&&o.$allModels!==void 0&&(o.$allModels[t]!==void 0&&i.push(o.$allModels[t]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[t]!==void 0&&i.push(o[t]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Lr=class e{constructor(r){this.head=r}static empty(){return new e}static single(r){return new e(new Nn(r))}isEmpty(){return this.head===void 0}append(r){return new e(new Nn(r,this.head))}getAllComputedFields(r){return this.head?.getAllComputedFields(r)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(r){return this.head?.getAllModelExtensions(r)}getAllQueryCallbacks(r,t){return this.head?.getAllQueryCallbacks(r,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Ln=class{constructor(r){this.name=r}};function Ra(e){return e instanceof Ln}function Aa(e){return new Ln(e)}var Ca=Symbol(),bt=class{constructor(r){if(r!==Ca)throw new Error("Skip instance can not be constructed directly")}ifUndefined(r){return r===void 0?Fn:r}},Fn=new bt(Ca);function Re(e){return e instanceof bt}var nm={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Ia="explicitly `undefined` values are not allowed";function Mn({modelName:e,action:r,args:t,runtimeDataModel:n,extensions:i=Lr.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new eo({runtimeDataModel:n,modelName:e,action:r,rootArgs:t,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:nm[r],query:Et(t,p)}}function Et({select:e,include:r,...t}={},n){let i=t.omit;return delete t.omit,{arguments:Da(t,n),selection:im(e,r,i,n)}}function im(e,r,t,n){return e?(r?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):t&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),lm(e,n)):om(n,r,t)}function om(e,r,t){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),r&&sm(n,r,e),am(n,t,e),n}function sm(e,r,t){for(let[n,i]of Object.entries(r)){if(Re(i))continue;let o=t.nestSelection(n);if(ro(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=t.findField(n);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(n),outputType:t.getOutputTypeDescription()}),s){e[n]=Et(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Et(i,o)}}function am(e,r,t){let n=t.getComputedFields(),i={...t.getGlobalOmit(),...r},o=Sa(i,n);for(let[s,a]of Object.entries(o)){if(Re(a))continue;ro(a,t.nestSelection(s));let l=t.findField(s);n?.[s]&&!l||(e[s]=!a)}}function lm(e,r){let t={},n=r.getComputedFields(),i=Ta(e,n);for(let[o,s]of Object.entries(i)){if(Re(s))continue;let a=r.nestSelection(o);ro(s,a);let l=r.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Re(s)){t[o]=!1;continue}if(s===!0){l?.kind==="object"?t[o]=Et({},a):t[o]=!0;continue}t[o]=Et(s,a)}}return t}function ka(e,r){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Sr(e)){if(wn(e))return{$type:"DateTime",value:e.toISOString()};r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ra(e))return{$type:"Param",value:e.name};if(_r(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return um(e,r);if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:Buffer.from(t,n,i).toString("base64")}}if(cm(e))return e.values;if(Rr(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Me){if(e!==kn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(pm(e))return e.toJSON();if(typeof e=="object")return Da(e,r);r.throwValidationError({kind:"InvalidArgumentValue",selectionPath:r.getSelectionPath(),argumentPath:r.getArgumentPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Da(e,r){if(e.$type)return{$type:"Raw",value:e};let t={};for(let n in e){let i=e[n],o=r.nestArgument(n);Re(i)||(i!==void 0?t[n]=ka(i,o):r.isPreviewFeatureOn("strictUndefinedChecks")&&r.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:r.getSelectionPath(),argument:{name:r.getArgumentName(),typeNames:[]},underlyingError:Ia}))}return t}function um(e,r){let t=[];for(let n=0;n({name:r.name,typeName:"boolean",isRelation:r.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(r){return this.params.previewFeatures.includes(r)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(r){return this.modelOrType?.fields.find(t=>t.name===r)}nestSelection(r){let t=this.findField(r),n=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(r)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ye(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ne(this.params.action,"Unknown action")}}nestArgument(r){return new e({...this.params,argumentPath:this.params.argumentPath.concat(r)})}};function Oa(e){if(!e._hasPreviewFlag("metrics"))throw new Z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Fr=class{_client;constructor(r){this._client=r}prometheus(r){return Oa(this._client),this._client._engine.metrics({format:"prometheus",...r})}json(r){return Oa(this._client),this._client._engine.metrics({format:"json",...r})}};function _a(e,r){let t=ut(()=>dm(r));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function dm(e){return{datamodel:{models:to(e.models),enums:to(e.enums),types:to(e.types)}}}function to(e){return Object.entries(e).map(([r,t])=>({name:r,...t}))}var no=new WeakMap,$n="$$PrismaTypedSql",wt=class{constructor(r,t){no.set(this,{sql:r,values:t}),Object.defineProperty(this,$n,{value:$n})}get sql(){return no.get(this).sql}get values(){return no.get(this).values}};function Na(e){return(...r)=>new wt(e,r)}function qn(e){return e!=null&&e[$n]===$n}var fu=C(Si());var gu=require("node:async_hooks"),hu=require("node:events"),yu=C(require("node:fs")),ti=C(require("node:path"));var oe=class e{constructor(r,t){if(r.length-1!==t.length)throw r.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${r.length} strings to have ${r.length-1} values`);let n=t.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=r[0];let i=0,o=0;for(;ie.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var jn={enumerable:!0,configurable:!0,writable:!0};function Vn(e){let r=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>jn,has:(t,n)=>r.has(n),set:(t,n,i)=>r.add(n)&&Reflect.set(t,n,i),ownKeys:()=>[...r]}}var Ma=Symbol.for("nodejs.util.inspect.custom");function he(e,r){let t=mm(r),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=t.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=t.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=$a(Reflect.ownKeys(o),t),a=$a(Array.from(t.keys()),t);return[...new Set([...s,...a,...n])]},set(o,s,a){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=t.get(s);return l?l.getPropertyDescriptor?{...jn,...l?.getPropertyDescriptor(s)}:jn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Ma]=function(){let o={...this};return delete o[Ma],o},i}function mm(e){let r=new Map;for(let t of e){let n=t.getKeys();for(let i of n)r.set(i,t)}return r}function $a(e,r){return e.filter(t=>r.get(t)?.has?.(t)??!0)}function Mr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function $r(e,r){return{batch:e,transaction:r?.kind==="batch"?{isolationLevel:r.options.isolationLevel}:void 0}}function qa(e){if(e===void 0)return"";let r=Nr(e);return new Cr(0,{colors:An}).write(r).toString()}var fm="P2037";function qr({error:e,user_facing_error:r},t,n){return r.error_code?new z(gm(r,n),{code:r.error_code,clientVersion:t,meta:r.meta,batchRequestIdx:r.batch_request_idx}):new j(e,{clientVersion:t,batchRequestIdx:r.batch_request_idx})}function gm(e,r){let t=e.message;return(r==="postgresql"||r==="postgres"||r==="mysql")&&e.error_code===fm&&(t+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var vt="";function ja(e){var r=e.split(` -`);return r.reduce(function(t,n){var i=bm(n)||wm(n)||Pm(n)||Am(n)||Sm(n);return i&&t.push(i),t},[])}var hm=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ym=/\((\S*)(?::(\d+))(?::(\d+))\)/;function bm(e){var r=hm.exec(e);if(!r)return null;var t=r[2]&&r[2].indexOf("native")===0,n=r[2]&&r[2].indexOf("eval")===0,i=ym.exec(r[2]);return n&&i!=null&&(r[2]=i[1],r[3]=i[2],r[4]=i[3]),{file:t?null:r[2],methodName:r[1]||vt,arguments:t?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var Em=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function wm(e){var r=Em.exec(e);return r?{file:r[2],methodName:r[1]||vt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var xm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,vm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Pm(e){var r=xm.exec(e);if(!r)return null;var t=r[3]&&r[3].indexOf(" > eval")>-1,n=vm.exec(r[3]);return t&&n!=null&&(r[3]=n[1],r[4]=n[2],r[5]=null),{file:r[3],methodName:r[1]||vt,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var Tm=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Sm(e){var r=Tm.exec(e);return r?{file:r[3],methodName:r[1]||vt,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}:null}var Rm=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Am(e){var r=Rm.exec(e);return r?{file:r[2],methodName:r[1]||vt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var so=class{getLocation(){return null}},ao=class{_error;constructor(){this._error=new Error}getLocation(){let r=this._error.stack;if(!r)return null;let n=ja(r).find(i=>{if(!i.file)return!1;let o=Fi(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ze(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new so:new ao}var Va={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function jr(e={}){let r=Im(e);return Object.entries(r).reduce((n,[i,o])=>(Va[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Im(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Bn(e={}){return r=>(typeof e._count=="boolean"&&(r._count=r._count._all),r)}function Ba(e,r){let t=Bn(e);return r({action:"aggregate",unpacker:t,argsMapper:jr})(e)}function km(e={}){let{select:r,...t}=e;return typeof r=="object"?jr({...t,_count:r}):jr({...t,_count:{_all:!0}})}function Dm(e={}){return typeof e.select=="object"?r=>Bn(e)(r)._count:r=>Bn(e)(r)._count._all}function Ua(e,r){return r({action:"count",unpacker:Dm(e),argsMapper:km})(e)}function Om(e={}){let r=jr(e);if(Array.isArray(r.by))for(let t of r.by)typeof t=="string"&&(r.select[t]=!0);else typeof r.by=="string"&&(r.select[r.by]=!0);return r}function _m(e={}){return r=>(typeof e?._count=="boolean"&&r.forEach(t=>{t._count=t._count._all}),r)}function Ga(e,r){return r({action:"groupBy",unpacker:_m(e),argsMapper:Om})(e)}function Qa(e,r,t){if(r==="aggregate")return n=>Ba(n,t);if(r==="count")return n=>Ua(n,t);if(r==="groupBy")return n=>Ga(n,t)}function Wa(e,r){let t=r.fields.filter(i=>!i.relationName),n=Zs(t,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new mt(e,o,s.type,s.isList,s.kind==="enum")},...Vn(Object.keys(n))})}var Ja=e=>Array.isArray(e)?e:e.split("."),lo=(e,r)=>Ja(r).reduce((t,n)=>t&&t[n],e),Ha=(e,r,t)=>Ja(r).reduceRight((n,i,o,s)=>Object.assign({},lo(e,s.slice(0,o)),{[i]:n}),t);function Nm(e,r){return e===void 0||r===void 0?[]:[...r,"select",e]}function Lm(e,r,t){return r===void 0?e??{}:Ha(r,t,e||!0)}function uo(e,r,t,n,i,o){let a=e._runtimeDataModel.models[r].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=Nm(n,i),p=Lm(l,o,c),d=t({dataPath:c,callsite:u})(p),f=Fm(e,r);return new Proxy(d,{get(h,g){if(!f.includes(g))return h[g];let P=[a[g].type,t,g],R=[c,p];return uo(e,...P,...R)},...Vn([...f,...Object.getOwnPropertyNames(d)])})}}function Fm(e,r){return e._runtimeDataModel.models[r].fields.filter(t=>t.kind==="object").map(t=>t.name)}var Mm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],$m=["aggregate","count","groupBy"];function co(e,r){let t=e._extensions.getAllModelExtensions(r)??{},n=[qm(e,r),Vm(e,r),xt(t),re("name",()=>r),re("$name",()=>r),re("$parent",()=>e._appliedParent)];return he({},n)}function qm(e,r){let t=Se(r),n=Object.keys(Ar).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ze(e._errorFormat);return e._createPrismaPromise(c=>{let p={args:l,dataPath:[],action:o,model:r,clientMethod:`${t}.${i}`,jsModelName:t,transaction:c,callsite:u};return e._request({...p,...a})},{action:o,args:l,model:r})};return Mm.includes(o)?uo(e,r,s):jm(i)?Qa(e,i,s):s({})}}}function jm(e){return $m.includes(e)}function Vm(e,r){return lr(re("fields",()=>{let t=e._runtimeDataModel.models[r];return Wa(r,t)}))}function Ka(e){return e.replace(/^./,r=>r.toUpperCase())}var po=Symbol();function Pt(e){let r=[Bm(e),Um(e),re(po,()=>e),re("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&r.push(xt(t)),he(e,r)}function Bm(e){let r=Object.getPrototypeOf(e._originalClient),t=[...new Set(Object.getOwnPropertyNames(r))];return{getKeys(){return t},getPropertyValue(n){return e[n]}}}function Um(e){let r=Object.keys(e._runtimeDataModel.models),t=r.map(Se),n=[...new Set(r.concat(t))];return lr({getKeys(){return n},getPropertyValue(i){let o=Ka(i);if(e._runtimeDataModel.models[o]!==void 0)return co(e,o);if(e._runtimeDataModel.models[i]!==void 0)return co(e,i)},getPropertyDescriptor(i){if(!t.includes(i))return{enumerable:!1}}})}function Ya(e){return e[po]?e[po]:e}function za(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let r=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Pt(r)}function Za({result:e,modelName:r,select:t,omit:n,extensions:i}){let o=i.getAllComputedFields(r);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(c=>n[c]);u.length>0&&a.push(Mr(u))}else if(t){if(!t[l.name])continue;let u=l.needs.filter(c=>!t[c]);u.length>0&&a.push(Mr(u))}Gm(e,l.needs)&&s.push(Qm(l,he(e,s)))}return s.length>0||a.length>0?he(e,[...s,...a]):e}function Gm(e,r){return r.every(t=>Vi(e,t))}function Qm(e,r){return lr(re(e.name,()=>e.compute(r)))}function Un({visitor:e,result:r,args:t,runtimeDataModel:n,modelName:i}){if(Array.isArray(r)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};r[o]=Un({visitor:i,result:r[o],args:u,modelName:l.type,runtimeDataModel:n})}}function el({result:e,modelName:r,args:t,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[r]?e:Un({result:e,args:t??{},modelName:r,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Se(l);return Za({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}var Wm=["$connect","$disconnect","$on","$transaction","$use","$extends"],rl=Wm;function tl(e){if(e instanceof oe)return Jm(e);if(qn(e))return Hm(e);if(Array.isArray(e)){let t=[e[0]];for(let n=1;n{let o=r.customDataProxyFetch;return"transaction"in r&&i!==void 0&&(r.transaction?.kind==="batch"&&r.transaction.lock.then(),r.transaction=i),n===t.length?e._executeRequest(r):t[n]({model:r.model,operation:r.model?r.action:r.clientMethod,args:tl(r.args??{}),__internalParams:r,query:(s,a=r)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=ll(o,l),a.args=s,il(e,a,t,n+1)}})})}function ol(e,r){let{jsModelName:t,action:n,clientMethod:i}=r,o=t?n:i;if(e._extensions.isEmpty())return e._executeRequest(r);let s=e._extensions.getAllQueryCallbacks(t??"$none",o);return il(e,r,s)}function sl(e){return r=>{let t={requests:r},n=r[0].extensions.getAllBatchQueryCallbacks();return n.length?al(t,n,0,e):e(t)}}function al(e,r,t,n){if(t===r.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return r[t]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=ll(i,l),al(a,r,t+1,n)}})}var nl=e=>e;function ll(e=nl,r=nl){return t=>e(r(t))}var ul=N("prisma:client"),cl={Vercel:"vercel","Netlify CI":"netlify"};function pl({postinstall:e,ciName:r,clientVersion:t}){if(ul("checkPlatformCaching:postinstall",e),ul("checkPlatformCaching:ciName",r),e===!0&&r&&r in cl){let n=`Prisma has detected that this project was built on ${r}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${cl[r]}-build`;throw console.error(n),new T(n,t)}}function dl(e,r){return e?e.datasources?e.datasources:e.datasourceUrl?{[r[0]]:{url:e.datasourceUrl}}:{}:{}}var Km=()=>globalThis.process?.release?.name==="node",Ym=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,zm=()=>!!globalThis.Deno,Zm=()=>typeof globalThis.Netlify=="object",Xm=()=>typeof globalThis.EdgeRuntime=="object",ef=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function rf(){return[[Zm,"netlify"],[Xm,"edge-light"],[ef,"workerd"],[zm,"deno"],[Ym,"bun"],[Km,"node"]].flatMap(t=>t[0]()?[t[1]]:[]).at(0)??""}var tf={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Gn(){let e=rf();return{id:e,prettyName:tf[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var yl=C(require("node:fs")),St=C(require("node:path"));function Qn(e){let{runtimeBinaryTarget:r}=e;return`Add "${r}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: - -${nf(e)}`}function nf(e){let{generator:r,generatorBinaryTargets:t,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...t,i];return _i({...r,binaryTargets:o})}function Xe(e){let{runtimeBinaryTarget:r}=e;return`Prisma Client could not locate the Query Engine for runtime "${r}".`}function er(e){let{searchedLocations:r}=e;return`The following locations have been searched: -${[...new Set(r)].map(i=>` ${i}`).join(` -`)}`}function ml(e){let{runtimeBinaryTarget:r}=e;return`${Xe(e)} - -This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${r}". -${Qn(e)} - -${er(e)}`}function Wn(e){return`We would appreciate if you could take the time to share some information with us. -Please help us by answering a few questions: https://pris.ly/${e}`}function Jn(e){let{errorStack:r}=e;return r?.match(/\/\.next|\/next@|\/next\//)?` - -We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function fl(e){let{queryEngineName:r}=e;return`${Xe(e)}${Jn(e)} - -This is likely caused by a bundler that has not copied "${r}" next to the resulting bundle. -Ensure that "${r}" has been copied next to the bundle or in "${e.expectedLocation}". - -${Wn("engine-not-found-bundler-investigation")} - -${er(e)}`}function gl(e){let{runtimeBinaryTarget:r,generatorBinaryTargets:t}=e,n=t.find(i=>i.native);return`${Xe(e)} - -This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${r}". -${Qn(e)} - -${er(e)}`}function hl(e){let{queryEngineName:r}=e;return`${Xe(e)}${Jn(e)} - -This is likely caused by tooling that has not copied "${r}" to the deployment folder. -Ensure that you ran \`prisma generate\` and that "${r}" has been copied to "${e.expectedLocation}". - -${Wn("engine-not-found-tooling-investigation")} - -${er(e)}`}var of=N("prisma:client:engines:resolveEnginePath"),sf=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function bl(e,r){let t={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??r.prismaPath;if(t!==void 0)return t;let{enginePath:n,searchedLocations:i}=await af(e,r);if(of("enginePath",n),n!==void 0&&e==="binary"&&Ai(n),n!==void 0)return r.prismaPath=n;let o=await ir(),s=r.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(sf())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:r.generator,runtimeBinaryTarget:o,queryEngineName:El(e,o),expectedLocation:St.default.relative(process.cwd(),r.dirname),errorStack:new Error().stack},p;throw a&&l?p=gl(c):l?p=ml(c):u?p=fl(c):p=hl(c),new T(p,r.clientVersion)}async function af(e,r){let t=await ir(),n=[],i=[r.dirname,St.default.resolve(__dirname,".."),r.generator?.output?.value??__dirname,St.default.resolve(__dirname,"../../../.prisma/client"),"/tmp/prisma-engines",r.cwd];__filename.includes("resolveEnginePath")&&i.push(gs());for(let o of i){let s=El(e,t),a=St.default.join(o,s);if(n.push(o),yl.default.existsSync(a))return{enginePath:a,searchedLocations:n}}return{enginePath:void 0,searchedLocations:n}}function El(e,r){return e==="library"?Gt(r,"fs"):`query-engine-${r}${r==="windows"?".exe":""}`}var mo=C(Li());function wl(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,r=>`${r[0]}5`):""}function xl(e){return e.split(` -`).map(r=>r.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}var vl=C(Fs());function Pl({title:e,user:r="prisma",repo:t="prisma",template:n="bug_report.yml",body:i}){return(0,vl.default)({user:r,repo:t,template:n,title:e,body:i})}function Tl({version:e,binaryTarget:r,title:t,description:n,engineVersion:i,database:o,query:s}){let a=Go(6e3-(s?.length??0)),l=xl((0,mo.default)(a)),u=n?`# Description -\`\`\` -${n} -\`\`\``:"",c=(0,mo.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${process.version?.padEnd(19)}| -| OS | ${r?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?wl(s):""} -\`\`\` -`),p=Pl({title:t,body:c});return`${t} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${Y(p)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}var Sl="6.13.0";function Vr({inlineDatasources:e,overrideDatasources:r,env:t,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=r[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new T(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new T("error: Missing URL environment variable, value, or override.",n);return i}var Hn=class extends Error{clientVersion;cause;constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends Hn{isRetryable;constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function A(e,r){return{...e,isRetryable:r}}var ur=class extends se{name="InvalidDatasourceError";code="P6001";constructor(r,t){super(r,A(t,!1))}};x(ur,"InvalidDatasourceError");function Rl(e){let r={clientVersion:e.clientVersion},t=Object.keys(e.inlineDatasources)[0],n=Vr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof process<"u"?process.env:{}}}),i;try{i=new URL(n)}catch{throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==sn)throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,r);let a=s.get("api_key");if(a===null||a.length<1)throw new ur(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,r);let l=ki(i)?"http:":"https:",u=new URL(i.href.replace(o,l));return{apiKey:a,url:u}}var Al=C(on()),Kn=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:r,tracingHelper:t,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=r,this.tracingHelper=t,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:r,transactionId:t}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":Al.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=r??this.tracingHelper.getTraceParent()),t&&(n["X-Transaction-Id"]=t);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let r=[];return this.tracingHelper.isEnabled()&&r.push("tracing"),this.logLevel&&r.push(this.logLevel),this.logQueries&&r.push("query"),r}};function uf(e){return e[0]*1e3+e[1]/1e6}function fo(e){return new Date(uf(e))}var Br=class extends se{name="ForcedRetryError";code="P5001";constructor(r){super("This request must be retried",A(r,!0))}};x(Br,"ForcedRetryError");var cr=class extends se{name="NotImplementedYetError";code="P5004";constructor(r,t){super(r,A(t,!1))}};x(cr,"NotImplementedYetError");var $=class extends se{response;constructor(r,t){super(r,t),this.response=t.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var pr=class extends ${name="SchemaMissingError";code="P5005";constructor(r){super("Schema needs to be uploaded",A(r,!0))}};x(pr,"SchemaMissingError");var go="This request could not be understood by the server",Rt=class extends ${name="BadRequestError";code="P5000";constructor(r,t,n){super(t||go,A(r,!1)),n&&(this.code=n)}};x(Rt,"BadRequestError");var At=class extends ${name="HealthcheckTimeoutError";code="P5013";logs;constructor(r,t){super("Engine not started: healthcheck timeout",A(r,!0)),this.logs=t}};x(At,"HealthcheckTimeoutError");var Ct=class extends ${name="EngineStartupError";code="P5014";logs;constructor(r,t,n){super(t,A(r,!0)),this.logs=n}};x(Ct,"EngineStartupError");var It=class extends ${name="EngineVersionNotSupportedError";code="P5012";constructor(r){super("Engine version is not supported",A(r,!1))}};x(It,"EngineVersionNotSupportedError");var ho="Request timed out",kt=class extends ${name="GatewayTimeoutError";code="P5009";constructor(r,t=ho){super(t,A(r,!1))}};x(kt,"GatewayTimeoutError");var cf="Interactive transaction error",Dt=class extends ${name="InteractiveTransactionError";code="P5015";constructor(r,t=cf){super(t,A(r,!1))}};x(Dt,"InteractiveTransactionError");var pf="Request parameters are invalid",Ot=class extends ${name="InvalidRequestError";code="P5011";constructor(r,t=pf){super(t,A(r,!1))}};x(Ot,"InvalidRequestError");var yo="Requested resource does not exist",_t=class extends ${name="NotFoundError";code="P5003";constructor(r,t=yo){super(t,A(r,!1))}};x(_t,"NotFoundError");var bo="Unknown server error",Ur=class extends ${name="ServerError";code="P5006";logs;constructor(r,t,n){super(t||bo,A(r,!0)),this.logs=n}};x(Ur,"ServerError");var Eo="Unauthorized, check your connection string",Nt=class extends ${name="UnauthorizedError";code="P5007";constructor(r,t=Eo){super(t,A(r,!1))}};x(Nt,"UnauthorizedError");var wo="Usage exceeded, retry again later",Lt=class extends ${name="UsageExceededError";code="P5008";constructor(r,t=wo){super(t,A(r,!0))}};x(Lt,"UsageExceededError");async function df(e){let r;try{r=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(r);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let n=Object.values(t)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return r===""?{type:"EmptyError"}:{type:"UnknownTextError",body:r}}}async function Ft(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await df(e);if(n.type==="QueryEngineError")throw new z(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Ur(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new pr(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new It(t);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Ct(t,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new T(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new At(t,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Dt(t,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ot(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Nt(t,Gr(Eo,n));if(e.status===404)return new _t(t,Gr(yo,n));if(e.status===429)throw new Lt(t,Gr(wo,n));if(e.status===504)throw new kt(t,Gr(ho,n));if(e.status>=500)throw new Ur(t,Gr(bo,n));if(e.status>=400)throw new Rt(t,Gr(go,n))}function Gr(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function Cl(e){let r=Math.pow(2,e)*50,t=Math.ceil(Math.random()*r)-Math.ceil(r/2),n=r+t;return new Promise(i=>setTimeout(()=>i(n),n))}var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Il(e){let r=new TextEncoder().encode(e),t="",n=r.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,t+=$e[s]+$e[a]+$e[l]+$e[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=$e[s]+$e[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=$e[s]+$e[a]+$e[l]+"="),t}function kl(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new T("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}var Dl={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Mt=class extends se{name="RequestError";code="P5010";constructor(r,t){super(`Cannot fetch data from service: -${r}`,A(t,!0))}};x(Mt,"RequestError");async function dr(e,r,t=n=>n){let{clientVersion:n,...i}=r,o=t(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new Mt(a,{clientVersion:n,cause:s})}}var ff=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Ol=N("prisma:client:dataproxyEngine");async function gf(e,r){let t=Dl["@prisma/engines-version"],n=r.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&ff.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=t.split("-")??[],[a,l,u]=s.split("."),c=hf(`<=${a}.${l}.${u}`),p=await dr(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();Ol("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(h){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),h}return f.version}throw new cr("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function _l(e,r){let t=await gf(e,r);return Ol("version",t),t}function hf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Nl=3,$t=N("prisma:client:dataproxyEngine"),qt=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(r){kl(r),this.config=r,this.env=r.env,this.inlineSchema=Il(r.inlineSchema),this.inlineDatasources=r.inlineDatasources,this.inlineSchemaHash=r.inlineSchemaHash,this.clientVersion=r.clientVersion,this.engineHash=r.engineVersion,this.logEmitter=r.logEmitter,this.tracingHelper=r.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:r,url:t}=this.getURLAndAPIKey();this.host=t.host,this.protocol=t.protocol,this.headerBuilder=new Kn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await _l(this.host,this.config),$t("host",this.host),$t("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(t=>{switch(t.level){case"debug":case"trace":$t(t);break;case"error":case"warn":case"info":{this.logEmitter.emit(t.level,{timestamp:fo(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.logEmitter.emit("query",{query:t.attributes.query??"",timestamp:fo(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:t.level}}),r?.traces?.length&&this.tracingHelper.dispatchEngineSpans(r.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(r){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let t=await dr(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||$t("schema response status",t.status);let n=await Ft(t,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(r,{traceparent:t,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:t,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(r,{traceparent:t,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=$r(r,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:t})).map(l=>(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l?this.convertProtocolErrorsToClientError(l.errors):l))}requestInternal({body:r,traceparent:t,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,transactionId:i?.id}),body:JSON.stringify(r),clientVersion:this.clientVersion},n);a.ok||$t("graphql response status",a.status),await this.handleError(await Ft(a,this.clientVersion));let l=await a.json();if(l.extensions&&this.propagateResponseExtensions(l.extensions),"errors"in l)throw this.convertProtocolErrorsToClientError(l.errors);return"batchResult"in l?l.batchResult:l}})}async transaction(r,t,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:o})=>{if(r==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await dr(a,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Ft(l,this.clientVersion));let u=await l.json(),{extensions:c}=u;c&&this.propagateResponseExtensions(c);let p=u.id,d=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${r}`;o(s);let a=await dr(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Ft(a,this.clientVersion));let l=await a.json(),{extensions:u}=l;u&&this.propagateResponseExtensions(u);return}}})}getURLAndAPIKey(){return Rl({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new cr("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){for(let t=0;;t++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${t})`,timestamp:new Date,target:""})};try{return await r.callback({logHttpCall:n})}catch(i){if(!(i instanceof se)||!i.isRetryable)throw i;if(t>=Nl)throw i instanceof Br?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${Nl} failed for ${r.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Cl(t);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(r){if(r instanceof pr)throw await this.uploadSchema(),new Br({clientVersion:this.clientVersion,cause:r});if(r)throw r}convertProtocolErrorsToClientError(r){return r.length===1?qr(r[0],this.config.clientVersion,this.config.activeProvider):new j(JSON.stringify(r),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ll(e){if(e?.kind==="itx")return e.options.id}var vo=C(require("node:os")),Fl=C(require("node:path"));var xo=Symbol("PrismaLibraryEngineCache");function yf(){let e=globalThis;return e[xo]===void 0&&(e[xo]={}),e[xo]}function bf(e){let r=yf();if(r[e]!==void 0)return r[e];let t=Fl.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=vo.default.constants.dlopen.RTLD_LAZY|vo.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,t,i),r[e]=n.exports,n.exports}var Ml={async loadLibrary(e){let r=await gi(),t=await bl("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>bf(t))}catch(n){let i=Ci({e:n,platformInfo:r,id:t});throw new T(i,e.clientVersion)}}};var Po,$l={async loadLibrary(e){let{clientVersion:r,adapter:t,engineWasm:n}=e;if(t===void 0)throw new T(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Gn().prettyName})`,r);if(n===void 0)throw new T("WASM engine was unexpectedly `undefined`",r);Po===void 0&&(Po=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new T("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",r);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a),u=l.exports.__wbindgen_start;return o.__wbg_set_wasm(l.exports),u(),o.QueryEngine})());let i=await Po;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ef="P2036",Ae=N("prisma:client:libraryEngine");function wf(e){return e.item_type==="query"&&"query"in e}function xf(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var ql=[...ui,"native"],vf=0xffffffffffffffffn,To=1n;function Pf(){let e=To++;return To>vf&&(To=1n),e}var Qr=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(r,t){this.libraryLoader=t??Ml,r.engineWasm!==void 0&&(this.libraryLoader=t??$l),this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.logEmitter=r.logEmitter,this.datamodel=r.inlineSchema,this.tracingHelper=r.tracingHelper,r.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(r.overrideDatasources)[0],i=r.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(r){return{applyPendingMigrations:r.applyPendingMigrations?.bind(r),commitTransaction:this.withRequestId(r.commitTransaction.bind(r)),connect:this.withRequestId(r.connect.bind(r)),disconnect:this.withRequestId(r.disconnect.bind(r)),metrics:r.metrics?.bind(r),query:this.withRequestId(r.query.bind(r)),rollbackTransaction:this.withRequestId(r.rollbackTransaction.bind(r)),sdlSchema:r.sdlSchema?.bind(r),startTransaction:this.withRequestId(r.startTransaction.bind(r)),trace:r.trace.bind(r),free:r.free?.bind(r)}}withRequestId(r){return async(...t)=>{let n=Pf().toString();try{return await r(...t,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(r,t,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(t),s;if(r==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else r==="commit"?s=await this.engine?.commitTransaction(n.id,o):r==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Tf(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new j(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Ae("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;li(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let r=await this.tracingHelper.runInChildSpan("detect_platform",()=>ir());if(!ql.includes(r))throw new T(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(W(r))}. Possible binaryTargets: ${qe(ql.join(", "))} or a path to the query engine library. -You may have to run ${qe("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}}parseEngineResponse(r){if(!r)throw new j("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}catch{throw new j("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let r=new WeakRef(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(tn));let t=await this.adapterPromise;t&&Ae("Using driver adapter: %O",t),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{r.deref()?.logger(n)},t))}catch(r){let t=r,n=this.parseInitError(t.message);throw typeof n=="string"?t:new T(n.message,this.config.clientVersion,n.error_code)}}}logger(r){let t=this.parseEngineResponse(r);t&&(t.level=t?.level.toLowerCase()??"unknown",wf(t)?this.logEmitter.emit("query",{timestamp:new Date,query:t.query,params:t.params,duration:Number(t.duration_ms),target:t.module_path}):xf(t)?this.loggerRustPanic=new le(So(this,`${t.message}: ${t.reason} in ${t.file}:${t.line}:${t.column}`),this.config.clientVersion):this.logEmitter.emit(t.level,{timestamp:new Date,message:t.message,target:t.module_path}))}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ae(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Ae("library starting");try{let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(t)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(tn)),await this.adapterPromise,Ae("library started")}catch(t){let n=this.parseInitError(t.message);throw typeof n=="string"?t:new T(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ae("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let r=async()=>{await new Promise(n=>setImmediate(n)),Ae("library stopping");let t={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(t)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Ae("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",r),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(r){return this.library?.debugPanic(r)}async request(r,{traceparent:t,interactiveTransaction:n}){Ae(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:t}),o=JSON.stringify(r);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new j(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof T)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new le(So(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new j(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:t,traceparent:n}){Ae("requestBatch");let i=$r(r,t);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Ll(t));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new j(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(c=>c.errors&&c.errors.length>0?this.loggerRustPanic??this.buildQueryError(c.errors[0],o?.errorRegistry):{data:c});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(r,t){if(r.user_facing_error.is_panic)return new le(So(this,r.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(r.user_facing_error,t);return n?n.error:qr(r,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(r,t){if(r.error_code===Ef&&t){let n=r.meta?.id;ln(typeof n=="number","Malformed external JS error received from the engine");let i=t.consumeError(n);return ln(i,"External error with reported id was not registered"),i}}async metrics(r){await this.start();let t=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?t:this.parseEngineResponse(t)}};function Tf(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function So(e,r){return Tl({binaryTarget:e.binaryTarget,title:r,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function jl({url:e,adapter:r,copyEngine:t,targetBuildType:n}){let i=[],o=[],s=g=>{i.push({_tag:"warning",value:g})},a=g=>{let S=g.join(` -`);o.push({_tag:"error",value:S})},l=!!e?.startsWith("prisma://"),u=an(e),c=!!r,p=l||u;!c&&t&&p&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let d=p||!t;c&&(d||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):t?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let f={accelerate:d,ppg:u,driverAdapters:c};function h(g){return g.length>0}return h(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:f}:{ok:!0,diagnostics:{warnings:i},isUsing:f}}function Vl({copyEngine:e=!0},r){let t;try{t=Vr({inlineDatasources:r.inlineDatasources,overrideDatasources:r.overrideDatasources,env:{...r.env,...process.env},clientVersion:r.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=jl({url:t,adapter:r.adapter,copyEngine:e,targetBuildType:"library"});for(let p of o.warnings)at(...p.value);if(!n){let p=o.errors[0];throw new Z(p.value,{clientVersion:r.clientVersion})}let s=Er(r.generator),a=s==="library",l=s==="binary",u=s==="client",c=(i.accelerate||i.ppg)&&!i.driverAdapters;return i.accelerate?new qt(r):(i.driverAdapters,a?new Qr(r):(i.accelerate,new Qr(r)))}function Yn({generator:e}){return e?.previewFeatures??[]}var Bl=e=>({command:e});var Ul=e=>e.strings.reduce((r,t,n)=>`${r}@P${n}${t}`);function Wr(e){try{return Gl(e,"fast")}catch{return Gl(e,"slow")}}function Gl(e,r){return JSON.stringify(e.map(t=>Wl(t,r)))}function Wl(e,r){if(Array.isArray(e))return e.map(t=>Wl(t,r));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(Sr(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ve.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Sf(e))return{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:Buffer.from(t,n,i).toString("base64")}}return typeof e=="object"&&r==="slow"?Jl(e):e}function Sf(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Jl(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ql);let r={};for(let t of Object.keys(e))r[t]=Ql(e[t]);return r}function Ql(e){return typeof e=="bigint"?e.toString():Jl(e)}var Rf=/^(\s*alter\s)/i,Hl=N("prisma:client");function Ro(e,r,t,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&Rf.exec(r))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Ao=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(qn(t))n=t.sql,i={values:Wr(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:Wr(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:Wr(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:Wr(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ul(t),i={values:Wr(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?Hl(`prisma.${e}(${n}, ${i.values})`):Hl(`prisma.${e}(${n})`),{query:n,parameters:i}},Kl={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new oe(r,t)}},Yl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Co(e){return function(t,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=zl(t(s)):zl(t(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function zl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Af=vi.split(".")[0],Cf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,r){return r()}},Io=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}dispatchEngineSpans(r){return this.getGlobalTracingHelper().dispatchEngineSpans(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){let r=globalThis[`V${Af}_PRISMA_INSTRUMENTATION`],t=globalThis.PRISMA_INSTRUMENTATION;return r?.helper??t?.helper??Cf}};function Zl(){return new Io}function Xl(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}function eu(e){return typeof e=="string"?e:e.reduce((r,t)=>{let n=typeof t=="string"?t:t.level;return n==="query"?r:r&&(t==="info"||r==="info")?"info":n},void 0)}var zn=class{_middlewares=[];use(r){this._middlewares.push(r)}get(r){return this._middlewares[r]}has(r){return!!this._middlewares[r]}length(){return this._middlewares.length}};var tu=C(Li());function Zn(e){return typeof e.batchRequestIdx=="number"}function ru(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(ko(e.query.arguments)),r.push(ko(e.query.selection)),r.join("")}function ko(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${ko(n)})`:t}).join(" ")})`}var If={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Do(e){return If[e]}var Xn=class{constructor(r){this.options=r;this.batches={}}batches;tickActive=!1;request(r){let t=this.options.batchBy(r);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[t].push({request:r,resolve:n,reject:i})})):this.options.singleLoader(r)}dispatchBatches(){for(let r in this.batches){let t=this.batches[r];delete this.batches[r],t.length===1?this.options.singleLoader(t[0].request).then(n=>{n instanceof Error?t[0].reject(n):t[0].resolve(n)}).catch(n=>{t[0].reject(n)}):(t.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(t.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;imr("bigint",t));case"bytes-array":return r.map(t=>mr("bytes",t));case"decimal-array":return r.map(t=>mr("decimal",t));case"datetime-array":return r.map(t=>mr("datetime",t));case"date-array":return r.map(t=>mr("date",t));case"time-array":return r.map(t=>mr("time",t));default:return r}}function ei(e){let r=[],t=kf(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>Do(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Of(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?nu(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Do(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:ru(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(r){try{return await this.dataloader.request(r)}catch(t){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=r;this.handleAndLogRequestError({error:t,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:r.globalOmit})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(r){try{this.handleRequestError(r)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:r.clientMethod,timestamp:new Date}),t}}handleRequestError({error:r,clientMethod:t,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Df(r),_f(r,i))throw r;if(r instanceof z&&Nf(r)){let u=iu(r.meta);_n({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:a})}let l=r.message;if(n&&(l=Pn({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),r.code){let u=s?{modelName:s,...r.meta}:r.meta;throw new z(l,{code:r.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new le(l,this.client._clientVersion);if(r instanceof j)throw new j(l,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof T)throw new T(l,this.client._clientVersion);if(r instanceof le)throw new le(l,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,tu.default)(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.keys(r)[0],o=Object.values(r)[0],s=t.filter(u=>u!=="select"&&u!=="include"),a=lo(o,s),l=i==="queryRaw"?ei(a):Tr(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Of(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:nu(e)};Ne(e,"Unknown transaction kind")}}function nu(e){return{id:e.id,payload:e.payload}}function _f(e,r){return Zn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function Nf(e){return e.code==="P2009"||e.code==="P2012"}function iu(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(iu)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var ou=Sl;var cu=C(Ki());var O=class extends Error{constructor(r){super(r+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};x(O,"PrismaClientConstructorValidationError");var su=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],au=["pretty","colorless","minimal"],lu=["info","query","warn","error"],Lf={datasources:(e,{datasourceNames:r})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new O(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,n]of Object.entries(e)){if(!r.includes(t)){let i=Jr(t,r)||` Available datasources: ${r.join(", ")}`;throw new O(`Unknown datasource ${t} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new O(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new O(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new O(`Invalid value ${JSON.stringify(o)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,r)=>{if(!e&&Er(r.generator)==="client")throw new O('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new O('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Yn(r).includes("driverAdapters"))throw new O('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Er(r.generator)==="binary")throw new O('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new O(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new O(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!au.includes(e)){let r=Jr(e,au);throw new O(`Invalid errorFormat ${e} provided to PrismaClient constructor.${r}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new O(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function r(t){if(typeof t=="string"&&!lu.includes(t)){let n=Jr(t,lu);throw new O(`Invalid log level "${t}" provided to PrismaClient constructor.${n}`)}}for(let t of e){r(t);let n={level:r,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Jr(i,o);throw new O(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(t&&typeof t=="object")for(let[i,o]of Object.entries(t))if(n[i])n[i](o);else throw new O(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let r=e.maxWait;if(r!=null&&r<=0)throw new O(`Invalid value ${r} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let t=e.timeout;if(t!=null&&t<=0)throw new O(`Invalid value ${t} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,r)=>{if(typeof e!="object")throw new O('"omit" option is expected to be an object.');if(e===null)throw new O('"omit" option can not be `null`');let t=[];for(let[n,i]of Object.entries(e)){let o=Mf(n,r.runtimeDataModel);if(!o){t.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){t.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){t.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&t.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(t.length>0)throw new O($f(e,t))},__internal:e=>{if(!e)return;let r=["debug","engine","configOverride"];if(typeof e!="object")throw new O(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[t]of Object.entries(e))if(!r.includes(t)){let n=Jr(t,r);throw new O(`Invalid property ${JSON.stringify(t)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function pu(e,r){for(let[t,n]of Object.entries(e)){if(!su.includes(t)){let i=Jr(t,su);throw new O(`Unknown property ${t} provided to PrismaClient constructor.${i}`)}Lf[t](n,r)}if(e.datasourceUrl&&e.datasources)throw new O('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Jr(e,r){if(r.length===0||typeof e!="string")return"";let t=Ff(e,r);return t?` Did you mean "${t}"?`:""}function Ff(e,r){if(r.length===0)return null;let t=r.map(i=>({value:i,distance:(0,cu.default)(e,i)}));t.sort((i,o)=>i.distanceYe(n)===r);if(t)return e[t]}function $f(e,r){let t=Nr(e);for(let o of r)switch(o.kind){case"UnknownModel":t.arguments.getField(o.modelKey)?.markAsError(),t.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":t.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":t.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":t.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),t.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=On(t,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}function du(e){return e.length===0?Promise.resolve([]):new Promise((r,t)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?t(i):r(n)))},l=u=>{o||(o=!0,t(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!Zn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var rr=N("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var qf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},jf=Symbol.for("prisma.client.transaction.id"),Vf={id:0,nextId(){return++this.id}};function bu(e){class r{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new zn;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Co();constructor(n){e=n?.__internal?.configOverride?.(e)??e,pl(e),n&&pu(n,e);let i=new hu.EventEmitter().on("error",()=>{});this._extensions=Lr.empty(),this._previewFeatures=Yn(e),this._clientVersion=e.clientVersion??ou,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Zl();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&ti.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&ti.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new T(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new T("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=!s&&o&&st(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&N.enable("prisma:client");let p=ti.default.resolve(e.dirname,e.relativePath);yu.default.existsSync(p)||(p=e.dirname),rr("dirname",e.dirname),rr("relativePath",e.relativePath),rr("cwd",p);let d=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:c,allowTriggerPanic:d.allowTriggerPanic,prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&eu(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(f=>typeof f=="string"?f==="query":f.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:dl(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Vr,getBatchRequestPayload:$r,prismaGraphQLToJSError:qr,PrismaClientUnknownRequestError:j,PrismaClientInitializationError:T,PrismaClientKnownRequestError:z,debug:N("prisma:client:accelerateEngine"),engineVersion:fu.version,clientVersion:e.clientVersion}},rr("clientVersion",e.clientVersion),this._engine=Vl(e,this._engineConfig),this._requestHandler=new ri(this,i),l.log)for(let f of l.log){let h=typeof f=="string"?f:f.emit==="stdout"?f.level:null;h&&this.$on(h,g=>{nt.log(`${nt.tags[h]??""}`,g.message||g.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Pt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Qo()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ao({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=mu(n,i);return Ro(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Z("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Ro(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Z(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Bl,callsite:Ze(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Ao({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...mu(n,i));throw new Z("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new Z("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Vf.nextId(),s=Xl(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let c=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return du(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return he(Pt(he(Ya(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>Co(n)),re(jf,()=>n.id)])),[Mr(rl)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??qf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let c=this._middlewares.get(++a);if(c)return this._tracingHelper.runInChildSpan(s.middleware,S=>c(u,P=>(S?.end(),l(P))));let{runInTransaction:p,args:d,...f}=u,h={...n,...f};d&&(h.args=i.middlewareArgsToRequestArgs(d)),n.transaction!==void 0&&p===!1&&delete h.transaction;let g=await ol(this,h);return h.model?el({result:g,modelName:h.model,args:h.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):g};return this._tracingHelper.runInChildSpan(s.operation,()=>new gu.AsyncResource("prisma-client-request").runInAsyncScope(()=>l(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:c,unpacker:p,otelParentCtx:d,customDataProxyFetch:f}){try{n=u?u(n):n;let h={name:"serialize"},g=this._tracingHelper.runInChildSpan(h,()=>Mn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return N.enabled("prisma:client")&&(rr("Prisma Client call:"),rr(`prisma.${i}(${qa(n)})`),rr("Generated request:"),rr(JSON.stringify(g,null,2)+` -`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:g,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:f})}catch(h){throw h.clientVersion=this._clientVersion,h}}$metrics=new Fr(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=za}return r}function mu(e,r){return Bf(e)?[new oe(e,r),Kl]:[e,Yl]}function Bf(e){return Array.isArray(e)&&Array.isArray(e.raw)}var Uf=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Eu(e){return new Proxy(e,{get(r,t){if(t in r)return r[t];if(!Uf.has(t))throw new TypeError(`Invalid enum value: ${String(t)}`)}})}function wu(e){st(e,{conflictCheck:"warn"})}0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -/*! Bundled license information: - -decimal.js/decimal.mjs: - (*! - * decimal.js v10.5.0 - * An arbitrary-precision Decimal type for JavaScript. - * https://github.com/MikeMcl/decimal.js - * Copyright (c) 2025 Michael Mclaughlin - * MIT Licence - *) -*/ -//# sourceMappingURL=library.js.map diff --git a/backend/generated/prisma/runtime/react-native.js b/backend/generated/prisma/runtime/react-native.js deleted file mode 100644 index 49a0900..0000000 --- a/backend/generated/prisma/runtime/react-native.js +++ /dev/null @@ -1,83 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -"use strict";var Ea=Object.create;var rr=Object.defineProperty;var xa=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var va=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty;var he=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xe=(e,t)=>{for(var r in t)rr(e,r,{get:t[r],enumerable:!0})},oi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Pa(t))!Ta.call(e,i)&&i!==r&&rr(e,i,{get:()=>t[i],enumerable:!(n=xa(t,i))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?Ea(va(e)):{},oi(t||!e||!e.__esModule?rr(r,"default",{value:e,enumerable:!0}):r,e)),Ca=e=>oi(rr({},"__esModule",{value:!0}),e);var y,x,c=he(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=y});var P,p=he(()=>{"use strict";P=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=he(()=>{"use strict";E=()=>{};E.prototype=E});var b,m=he(()=>{"use strict";b=class{value;constructor(t){this.value=t}deref(){return this.value}}});var Ti=Se(nt=>{"use strict";f();c();p();d();m();var ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Aa=ci(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=k;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var I=A.indexOf("=");I===-1&&(I=S);var _=I===S?0:4-I%4;return[I,_]}function l(A){var S=a(A),I=S[0],_=S[1];return(I+_)*3/4-_}function u(A,S,I){return(S+I)*3/4-I}function g(A){var S,I=a(A),_=I[0],D=I[1],O=new n(u(A,_,D)),q=0,Y=D>0?_-4:_,U;for(U=0;U>16&255,O[q++]=S>>8&255,O[q++]=S&255;return D===2&&(S=r[A.charCodeAt(U)]<<2|r[A.charCodeAt(U+1)]>>4,O[q++]=S&255),D===1&&(S=r[A.charCodeAt(U)]<<10|r[A.charCodeAt(U+1)]<<4|r[A.charCodeAt(U+2)]>>2,O[q++]=S>>8&255,O[q++]=S&255),O}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function T(A,S,I){for(var _,D=[],O=S;OY?Y:q+O));return _===1?(S=A[I-1],D.push(t[S>>2]+t[S<<4&63]+"==")):_===2&&(S=(A[I-2]<<8)+A[I-1],D.push(t[S>>10]+t[S>>4&63]+t[S<<2&63]+"=")),D.join("")}}),Sa=ci(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,T=n?o-1:0,k=n?-1:1,A=t[r+T];for(T+=k,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+T],T+=k,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+T],T+=k,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,k=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,S=i?1:-1,I=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+T>=1?r+=k/u:r+=k*Math.pow(2,1-T),r*u>=2&&(a++,u/=2),a+T>=h?(l=0,a=h):a+T>=1?(l=(r*u-1)*Math.pow(2,o),a=a+T):(l=r*Math.pow(2,T-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=S,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=S,a/=256,g-=8);t[n+A-S]|=I*128}}),en=Aa(),tt=Sa(),si=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nt.Buffer=C;nt.SlowBuffer=Ma;nt.INSPECT_MAX_BYTES=50;var nr=2147483647;nt.kMaxLength=nr;C.TYPED_ARRAY_SUPPORT=Ra();!C.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ra(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}});Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function ke(e){if(e>nr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,C.prototype),t}function C(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return nn(e)}return pi(e,t,r)}C.poolSize=8192;function pi(e,t,r){if(typeof e=="string")return Oa(e,t);if(ArrayBuffer.isView(e))return Ia(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return mi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return C.from(n,t,r);let i=Fa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return C.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}C.from=function(e,t,r){return pi(e,t,r)};Object.setPrototypeOf(C.prototype,Uint8Array.prototype);Object.setPrototypeOf(C,Uint8Array);function di(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ka(e,t,r){return di(e),e<=0?ke(e):t!==void 0?typeof r=="string"?ke(e).fill(t,r):ke(e).fill(t):ke(e)}C.alloc=function(e,t,r){return ka(e,t,r)};function nn(e){return di(e),ke(e<0?0:on(e)|0)}C.allocUnsafe=function(e){return nn(e)};C.allocUnsafeSlow=function(e){return nn(e)};function Oa(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!C.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=ke(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function tn(e){let t=e.length<0?0:on(e.length)|0,r=ke(t);for(let n=0;n=nr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+nr.toString(16)+" bytes");return e|0}function Ma(e){return+e!=e&&(e=0),C.alloc(+e)}C.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==C.prototype};C.compare=function(e,t){if(ye(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=C.from(t,t.offset,t.byteLength)),!C.isBuffer(e)||!C.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(C.isBuffer(o)||(o=C.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(C.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(C.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return rn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return vi(e).length;default:if(i)return n?-1:rn(e).length;t=(""+t).toLowerCase(),i=!0}}C.byteLength=fi;function _a(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qa(this,t,r);case"utf8":case"utf-8":return hi(this,t,r);case"ascii":return Ua(this,t,r);case"latin1":case"binary":return Va(this,t,r);case"base64":return Ba(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ga(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}C.prototype._isBuffer=!0;function Ge(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}C.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};si&&(C.prototype[si]=C.prototype.inspect);C.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=C.from(e,e.offset,e.byteLength)),!C.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,an(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=C.from(t,n)),C.isBuffer(t))return t.length===0?-1:ai(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ai(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ai(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return La(this,e,t,r);case"utf8":case"utf-8":return Da(this,e,t,r);case"ascii":case"latin1":case"binary":return Na(this,e,t,r);case"base64":return qa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $a(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ba(e,t,r){return t===0&&r===e.length?en.fromByteArray(e):en.fromByteArray(e.slice(t,r))}function hi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return ja(n)}var li=4096;function ja(e){let t=e.length;if(t<=li)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}C.prototype.readUintLE=C.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};C.prototype.readUint8=C.prototype.readUInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]};C.prototype.readUint16LE=C.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]|this[e+1]<<8};C.prototype.readUint16BE=C.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||K(e,2,this.length),this[e]<<8|this[e+1]};C.prototype.readUint32LE=C.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};C.prototype.readUint32BE=C.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};C.prototype.readBigUInt64LE=De(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||K(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};C.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||K(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};C.prototype.readInt8=function(e,t){return e=e>>>0,t||K(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};C.prototype.readInt16LE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};C.prototype.readInt16BE=function(e,t){e=e>>>0,t||K(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};C.prototype.readInt32LE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};C.prototype.readInt32BE=function(e,t){return e=e>>>0,t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};C.prototype.readBigInt64LE=De(function(e){e=e>>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,rt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&At(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||K(e,4,this.length),tt.read(this,e,!0,23,4)};C.prototype.readFloatBE=function(e,t){return e=e>>>0,t||K(e,4,this.length),tt.read(this,e,!1,23,4)};C.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!0,52,8)};C.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||K(e,8,this.length),tt.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!C.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}C.prototype.writeUintLE=C.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};C.prototype.writeUint8=C.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,255,0),this[t]=e&255,t+1};C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function yi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function wi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}C.prototype.writeBigUInt64LE=De(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeBigUInt64BE=De(function(e,t=0){return wi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});C.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};C.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};C.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};C.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};C.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};C.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};C.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};C.prototype.writeBigInt64LE=De(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});C.prototype.writeBigInt64BE=De(function(e,t=0){return wi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function bi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Ei(e,t,r,n,i){return t=+t,r=r>>>0,i||bi(e,t,r,4,34028234663852886e22,-34028234663852886e22),tt.write(e,t,r,n,23,4),r+4}C.prototype.writeFloatLE=function(e,t,r){return Ei(this,e,t,!0,r)};C.prototype.writeFloatBE=function(e,t,r){return Ei(this,e,t,!1,r)};function xi(e,t,r,n,i){return t=+t,r=r>>>0,i||bi(e,t,r,8,17976931348623157e292,-17976931348623157e292),tt.write(e,t,r,n,52,8),r+8}C.prototype.writeDoubleLE=function(e,t,r){return xi(this,e,t,!0,r)};C.prototype.writeDoubleBE=function(e,t,r){return xi(this,e,t,!1,r)};C.prototype.copy=function(e,t,r,n){if(!C.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ui(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ui(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ui(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ja(e,t,r){rt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&At(t,e.length-(r+1))}function Pi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new et.ERR_OUT_OF_RANGE("value",a,e)}Ja(n,i,o)}function rt(e,t){if(typeof e!="number")throw new et.ERR_INVALID_ARG_TYPE(t,"number",e)}function At(e,t,r){throw Math.floor(e)!==e?(rt(e,r),new et.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new et.ERR_BUFFER_OUT_OF_BOUNDS:new et.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Wa=/[^+/0-9A-Za-z-_]/g;function Ka(e){if(e=e.split("=")[0],e=e.trim().replace(Wa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function rn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ha(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function vi(e){return en.toByteArray(Ka(e))}function ir(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function an(e){return e!==e}var Ya=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function De(e){return typeof BigInt>"u"?Za:e}function Za(){throw new Error("BigInt not supported")}});var w,f=he(()=>{"use strict";w=Re(Ti())});function El(){return!1}function dn(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function xl(){return dn()}function Pl(){return[]}function vl(e){e(null,[])}function Tl(){return""}function Cl(){return""}function Al(){}function Sl(){}function Rl(){}function kl(){}function Ol(){}function Il(){}function Fl(){}function Ml(){}function _l(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Ll(e,t){t(null,dn())}var Dl,Nl,sr,mn=he(()=>{"use strict";f();c();p();d();m();Dl={},Nl={existsSync:El,lstatSync:dn,stat:Ll,statSync:xl,readdirSync:Pl,readdir:vl,readlinkSync:Tl,realpathSync:Cl,chmodSync:Al,renameSync:Sl,mkdirSync:Rl,rmdirSync:kl,rmSync:Ol,unlinkSync:Il,watchFile:Fl,unwatchFile:Ml,watch:_l,promises:Dl},sr=Nl});function ql(...e){return e.join("/")}function $l(...e){return e.join("/")}function Bl(e){let t=Ni(e),r=qi(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function Ni(e){let t=e.split("/");return t[t.length-1]}function qi(e){return e.split("/").slice(0,-1).join("/")}function Ul(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var $i,jl,Vl,Ql,Ie,gn=he(()=>{"use strict";f();c();p();d();m();$i="/",jl=":";Vl={sep:$i},Ql={basename:Ni,delimiter:jl,dirname:qi,join:$l,normalize:Ul,parse:Bl,posix:Vl,resolve:ql,sep:$i},Ie=Ql});var Bi=Se(($m,Gl)=>{Gl.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Vi=Se((qf,Ui)=>{"use strict";f();c();p();d();m();Ui.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Ki=Se((rg,Wi)=>{"use strict";f();c();p();d();m();Wi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Yi=Se((fg,zi)=>{"use strict";f();c();p();d();m();zi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Pn=Se((Eg,Zi)=>{"use strict";f();c();p();d();m();var tu=Yi();Zi.exports=e=>typeof e=="string"?e.replace(tu(),""):e});var Xi=Se((Gg,cr)=>{"use strict";f();c();p();d();m();cr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};cr.exports.default=cr.exports});var Fn=Se((g0,vo)=>{"use strict";f();c();p();d();m();vo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";f();c();p();d();m()});var ko=he(()=>{"use strict";f();c();p();d();m()});var Xo=Se(($v,Wc)=>{Wc.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var $r,es=he(()=>{"use strict";f();c();p();d();m();$r=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var cd={};Xe(cd,{DMMF:()=>$t,Debug:()=>H,Decimal:()=>Ee,Extensions:()=>ln,MetricsClient:()=>Et,PrismaClientInitializationError:()=>Q,PrismaClientKnownRequestError:()=>se,PrismaClientRustPanicError:()=>ce,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>te,Public:()=>un,Sql:()=>le,createParam:()=>Go,defineDmmfProperty:()=>Yo,deserializeJsonResponse:()=>lt,deserializeRawResult:()=>Yr,dmmfToRuntimeDataModel:()=>wo,empty:()=>rs,getPrismaClient:()=>ya,getRuntime:()=>Ms,join:()=>ts,makeStrictEnum:()=>wa,makeTypedQueryFactory:()=>Zo,objectEnumValues:()=>kr,raw:()=>jn,serializeJsonQuery:()=>Dr,skip:()=>Lr,sqltag:()=>Un,warnEnvConflicts:()=>void 0,warnOnce:()=>Dt});module.exports=Ca(cd);f();c();p();d();m();var ln={};Xe(ln,{defineExtension:()=>Ci,getExtensionContext:()=>Ai});f();c();p();d();m();f();c();p();d();m();function Ci(e){return typeof e=="function"?e:t=>t.$extends(e)}f();c();p();d();m();function Ai(e){return e}var un={};Xe(un,{validator:()=>Si});f();c();p();d();m();f();c();p();d();m();function Si(...e){return t=>t}f();c();p();d();m();f();c();p();d();m();var or={};Xe(or,{$:()=>Fi,bgBlack:()=>ll,bgBlue:()=>dl,bgCyan:()=>fl,bgGreen:()=>cl,bgMagenta:()=>ml,bgRed:()=>ul,bgWhite:()=>gl,bgYellow:()=>pl,black:()=>il,blue:()=>We,bold:()=>de,cyan:()=>Oe,dim:()=>St,gray:()=>It,green:()=>kt,grey:()=>al,hidden:()=>rl,inverse:()=>tl,italic:()=>el,magenta:()=>ol,red:()=>Je,reset:()=>Xa,strikethrough:()=>nl,underline:()=>Rt,white:()=>sl,yellow:()=>Ot});f();c();p();d();m();var cn,Ri,ki,Oi,Ii=!0;typeof y<"u"&&({FORCE_COLOR:cn,NODE_DISABLE_COLORS:Ri,NO_COLOR:ki,TERM:Oi}=y.env||{},Ii=y.stdout&&y.stdout.isTTY);var Fi={enabled:!Ri&&ki==null&&Oi!=="dumb"&&(cn!=null&&cn!=="0"||Ii)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Fi.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xa=V(0,0),de=V(1,22),St=V(2,22),el=V(3,23),Rt=V(4,24),tl=V(7,27),rl=V(8,28),nl=V(9,29),il=V(30,39),Je=V(31,39),kt=V(32,39),Ot=V(33,39),We=V(34,39),ol=V(35,39),Oe=V(36,39),sl=V(37,39),It=V(90,39),al=V(90,39),ll=V(40,49),ul=V(41,49),cl=V(42,49),pl=V(43,49),dl=V(44,49),ml=V(45,49),fl=V(46,49),gl=V(47,49);f();c();p();d();m();var hl=100,Mi=["green","yellow","blue","magenta","cyan","red"],Ft=[],_i=Date.now(),yl=0,pn=typeof y<"u"?y.env:{};globalThis.DEBUG??=pn.DEBUG??"";globalThis.DEBUG_COLORS??=pn.DEBUG_COLORS?pn.DEBUG_COLORS==="true":!0;var Mt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function wl(e){let t={color:Mi[yl++%Mi.length],enabled:Mt.enabled(e),namespace:e,log:Mt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Ft.push([o,...n]),Ft.length>hl&&Ft.shift(),Mt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:bl(g)),u=`+${Date.now()-_i}ms`;_i=Date.now(),globalThis.DEBUG_COLORS?a(or[s](de(o)),...l,or[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var H=new Proxy(wl,{get:(e,t)=>Mt[t],set:(e,t,r)=>Mt[t]=r});function bl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Li(e=7500){let t=Ft.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.length{let r={adapterName:e.adapterName,errorRegistry:t,queryRaw:Fe(t,e.queryRaw.bind(e)),executeRaw:Fe(t,e.executeRaw.bind(e)),executeScript:Fe(t,e.executeScript.bind(e)),dispose:Fe(t,e.dispose.bind(e)),provider:e.provider,startTransaction:async(...n)=>(await Fe(t,e.startTransaction.bind(e))(...n)).map(o=>Hl(t,o))};return e.getConnectionInfo&&(r.getConnectionInfo=zl(t,e.getConnectionInfo.bind(e))),r},Hl=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Fe(e,t.queryRaw.bind(t)),executeRaw:Fe(e,t.executeRaw.bind(t)),commit:Fe(e,t.commit.bind(t)),rollback:Fe(e,t.rollback.bind(t))});function Fe(e,t){return async(...r)=>{try{return ar(await t(...r))}catch(n){if(ji("[error@wrapAsync]",n),yn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}function zl(e,t){return(...r)=>{try{return ar(t(...r))}catch(n){if(ji("[error@wrapSync]",n),yn(n))return Ke(n.cause);let i=e.registerNewError(n);return Ke({kind:"GenericJs",id:i})}}}f();c();p();d();m();var Qi=Re(Vi(),1);function bn(e){let t=(0,Qi.default)(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}f();c();p();d();m();var Gi="prisma+postgres",Ji=`${Gi}:`;function En(e){return e?.toString().startsWith(`${Ji}//`)??!1}var Lt={};Xe(Lt,{error:()=>Xl,info:()=>Zl,log:()=>Yl,query:()=>eu,should:()=>Hi,tags:()=>_t,warn:()=>xn});f();c();p();d();m();var _t={error:Je("prisma:error"),warn:Ot("prisma:warn"),info:Oe("prisma:info"),query:We("prisma:query")},Hi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Yl(...e){console.log(...e)}function xn(e,...t){Hi.warn()&&console.warn(`${_t.warn} ${e}`,...t)}function Zl(e,...t){console.info(`${_t.info} ${e}`,...t)}function Xl(e,...t){console.error(`${_t.error} ${e}`,...t)}function eu(e,...t){console.log(`${_t.query} ${e}`,...t)}f();c();p();d();m();function ur(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}f();c();p();d();m();function Me(e,t){throw new Error(t)}f();c();p();d();m();gn();function vn(e){return Ie.sep===Ie.posix.sep?e:e.split(Ie.sep).join(Ie.posix.sep)}f();c();p();d();m();function Tn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();c();p();d();m();function ot(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();c();p();d();m();function Cn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{eo.has(e)||(eo.add(e),xn(t,...r))};var Q=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};ue(Q,"PrismaClientInitializationError");f();c();p();d();m();var se=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};ue(se,"PrismaClientKnownRequestError");f();c();p();d();m();var ce=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};ue(ce,"PrismaClientRustPanicError");f();c();p();d();m();var J=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};ue(J,"PrismaClientUnknownRequestError");f();c();p();d();m();var te=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};ue(te,"PrismaClientValidationError");f();c();p();d();m();f();c();p();d();m();var st=9e15,Be=1e9,An="0123456789abcdef",mr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",fr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Sn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-st,maxE:st,crypto:!1},oo,_e,L=!0,hr="[DecimalError] ",$e=hr+"Invalid argument: ",so=hr+"Precision limit exceeded",ao=hr+"crypto unavailable",lo="[object Decimal]",re=Math.floor,W=Math.pow,ru=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,nu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,iu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,me=1e7,M=7,ou=9007199254740991,su=mr.length-1,Rn=fr.length-1,R={toStringTag:lo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),F(e)};R.ceil=function(){return F(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error($e+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=au(n,go(n,r)),n.precision=e,n.rounding=t,F(_e==2||_e==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(L=!1,o=g.s*W(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=W(r,1/3),e=re((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=j(u.plus(g).times(a),u.plus(l),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(F(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(F(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return L=!0,F(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-re(this.e/M))*M,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return j(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return F(j(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return F(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/wr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=at(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return F(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=at(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/wr(5,e)),i=at(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,F(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,j(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?we(t,n,i):new t(0):new t(NaN):e.isZero()?we(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,L=!1,r=r.times(r).minus(1).sqrt().plus(r),L=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,L=!1,r=r.times(r).plus(1).sqrt().plus(r),L=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?F(new o(i),e,t,!0):(o.precision=r=n-i.e,i=j(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=we(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,T=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=Rn)return s=we(g,h+4,T).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=Rn)return s=we(g,h+4,T).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/M+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(L=!1,t=Math.ceil(a/M),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,T=g.rounding,k=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(L=!1,a=h+k,s=qe(u,a),n=t?gr(g,a+10):qe(e,a),l=j(s,n,a,1),Nt(l.d,i=h,T))do if(a+=10,s=qe(u,a),n=t?gr(g,a+10):qe(e,a),l=j(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=F(l,h+1,0));break}while(Nt(l.d,i+=10,T));return L=!0,F(l,h,T)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,k=this,A=k.constructor;if(e=new A(e),!k.d||!e.d)return!k.s||!e.s?e=new A(NaN):k.d?e.s=-e.s:e=new A(e.d||k.s!==e.s?k:NaN),e;if(k.s!=e.s)return e.s=-e.s,k.plus(e);if(u=k.d,T=e.d,a=A.precision,l=A.rounding,!u[0]||!T[0]){if(T[0])e.s=-e.s;else if(u[0])e=new A(k);else return new A(l===3?-0:0);return L?F(e,a,l):e}if(r=re(e.e/M),g=re(k.e/M),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=T.length):(t=T,r=g,s=u.length),n=Math.max(Math.ceil(a/M),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=T.length,h=n0;--n)u[s++]=0;for(n=T.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/me|0,u[i]%=me;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=yr(u,n),L?F(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($e+e);return r.d?(t=co(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return F(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+M,n.rounding=1,r=uu(n,go(n,r)),n.precision=e,n.rounding=t,F(_e>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(L=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=re((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(j(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(F(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(F(n,l+1,1),e=!n.times(n).eq(s));break}return L=!0,F(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=j(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,F(_e==2||_e==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,T=g.d,k=(e=new h(e)).d;if(e.s*=g.s,!T||!T[0]||!k||!k[0])return new h(!e.s||T&&!T[0]&&!k||k&&!k[0]&&!T?NaN:!T||!k?e.s/0:e.s*0);for(r=re(g.e/M)+re(e.e/M),l=T.length,u=k.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+k[n]*T[i-n-1]+t,o[i--]=a%me|0,t=a/me|0;o[i]=(o[i]+t)%me|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=yr(o,r),L?F(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return On(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ae(e,0,Be),t===void 0?t=n.rounding:ae(t,0,8),F(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,!0):(ae(e,0,Be),t===void 0?t=i.rounding:ae(t,0,8),n=F(new i(n),e+1,t),r=be(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=be(i):(ae(e,0,Be),t===void 0?t=o.rounding:ae(t,0,8),n=F(new o(i),e+i.e+1,t),r=be(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,T,k=this,A=k.d,S=k.constructor;if(!A)return new S(k);if(u=r=new S(1),n=l=new S(0),t=new S(n),o=t.e=co(A)-k.e-1,s=o%M,t.d[0]=W(10,s<0?M+s:s),e==null)e=o>0?t:u;else{if(a=new S(e),!a.isInt()||a.lt(u))throw Error($e+a);e=a.gt(t)?o>0?t:u:a}for(L=!1,a=new S(Z(A)),g=S.precision,S.precision=o=A.length*M*2;h=j(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=j(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=k.s,T=j(u,n,o,1).minus(k).abs().cmp(j(l,r,o,1).minus(k).abs())<1?[u,n]:[l,r],S.precision=g,L=!0,T};R.toHexadecimal=R.toHex=function(e,t){return On(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ae(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(L=!1,r=j(r,e,0,t,1).times(e),L=!0,F(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return On(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(W(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return F(a,n,o);if(t=re(e.e/M),t>=e.d.length-1&&(r=u<0?-u:u)<=ou)return i=po(l,a,r,n),e.s<0?new l(1).div(i):F(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(L=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=kn(e.times(qe(a,n+r)),n),i.d&&(i=F(i,n+5,1),Nt(i.d,n,o)&&(t=n+10,i=F(kn(e.times(qe(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=F(i,n+1,0)))),i.s=s,L=!0,l.rounding=o,F(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Be),t===void 0?t=i.rounding:ae(t,0,8),n=F(new i(n),e,t),r=be(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ae(e,1,Be),t===void 0?t=n.rounding:ae(t,0,8)),F(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return F(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error($e+e)}function Nt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=M,i=0):(i=Math.ceil((t+1)/M),t%=M),o=W(10,M-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==W(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==W(10,t-3)-1,s}function pr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function au(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/wr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=at(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var j=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,T,k,A,S,I,_,D,O,q,Y,U,Ct,G,ie,Ae,X,Ze,tr=n.constructor,Xr=n.s==i.s?1:-1,ee=n.d,B=i.d;if(!ee||!ee[0]||!B||!B[0])return new tr(!n.s||!i.s||(ee?B&&ee[0]==B[0]:!B)?NaN:ee&&ee[0]==0||!B?Xr*0:Xr/0);for(l?(k=1,g=n.e-i.e):(l=me,k=M,g=re(n.e/k)-re(i.e/k)),X=B.length,ie=ee.length,_=new tr(Xr),D=_.d=[],h=0;B[h]==(ee[h]||0);h++);if(B[h]>(ee[h]||0)&&g--,o==null?(U=o=tr.precision,s=tr.rounding):a?U=o+(n.e-i.e)+1:U=o,U<0)D.push(1),A=!0;else{if(U=U/k+2|0,h=0,X==1){for(T=0,B=B[0],U++;(h1&&(B=e(B,T,l),ee=e(ee,T,l),X=B.length,ie=ee.length),G=X,O=ee.slice(0,X),q=O.length;q=l/2&&++Ae;do T=0,u=t(B,O,X,q),u<0?(Y=O[0],X!=q&&(Y=Y*l+(O[1]||0)),T=Y/Ae|0,T>1?(T>=l&&(T=l-1),S=e(B,T,l),I=S.length,q=O.length,u=t(S,O,I,q),u==1&&(T--,r(S,X=10;T/=10)h++;_.e=h+g*k-1,F(_,a?o+_.e+1:o,s,A)}return _}}();function F(e,t,r,n){var i,o,s,a,l,u,g,h,T,k=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=M,s=t,g=h[T=0],l=g/W(10,i-s-1)%10|0;else if(T=Math.ceil((o+1)/M),a=h.length,T>=a)if(n){for(;a++<=T;)h.push(0);g=l=0,i=1,o%=M,s=o-M+1}else break e;else{for(g=a=h[T],i=1;a>=10;a/=10)i++;o%=M,s=o-M+i,l=s<0?0:g/W(10,i-s-1)%10|0}if(n=n||t<0||h[T+1]!==void 0||(s<0?g:g%W(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/W(10,i-s):0:h[T-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=W(10,(M-t%M)%M),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=T,a=1,T--):(h.length=T+1,a=W(10,M-o),h[T]=s>0?(g/W(10,i-s)%W(10,s)|0)*a:0),u)for(;;)if(T==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==me&&(h[0]=1));break}else{if(h[T]+=a,h[T]!=me)break;h[T--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return L&&(e.e>k.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ne(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ne(-i-1)+o,r&&(n=r-s)>0&&(o+=Ne(n))):i>=s?(o+=Ne(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ne(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ne(n))),o}function yr(e,t){var r=e[0];for(t*=M;r>=10;r/=10)t++;return t}function gr(e,t,r){if(t>su)throw L=!0,r&&(e.precision=r),Error(so);return F(new e(mr),t,1,!0)}function we(e,t,r){if(t>Rn)throw Error(so);return F(new e(fr),t,r,!0)}function co(e){var t=e.length-1,r=t*M+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ne(e){for(var t="";e--;)t+="0";return t}function po(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/M+4);for(L=!1;;){if(r%2&&(o=o.times(t),no(o.d,s)&&(i=!0)),r=re(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),no(t.d,s)}return L=!0,o}function ro(e){return e.d[e.d.length-1]&1}function mo(e,t,r){for(var n,i,o=new e(t[0]),s=0;++s17)return new T(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(L=!1,l=A):l=t,a=new T(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(W(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new T(1),T.precision=l;;){if(o=F(o.times(e),l,1),r=r.times(++g),a=s.plus(j(o,r,l,1)),Z(a.d).slice(0,l)===Z(s.d).slice(0,l)){for(i=h;i--;)s=F(s.times(s),l,1);if(t==null)if(u<3&&Nt(s.d,l-n,k,u))T.precision=l+=10,r=o=a=new T(1),g=0,u++;else return F(s,T.precision=A,k,L=!0);else return T.precision=A,s}s=a}}function qe(e,t){var r,n,i,o,s,a,l,u,g,h,T,k=1,A=10,S=e,I=S.d,_=S.constructor,D=_.rounding,O=_.precision;if(S.s<0||!I||!I[0]||!S.e&&I[0]==1&&I.length==1)return new _(I&&!I[0]?-1/0:S.s!=1?NaN:I?0:S);if(t==null?(L=!1,g=O):g=t,_.precision=g+=A,r=Z(I),n=r.charAt(0),Math.abs(o=S.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)S=S.times(e),r=Z(S.d),n=r.charAt(0),k++;o=S.e,n>1?(S=new _("0."+r),o++):S=new _(n+"."+r.slice(1))}else return u=gr(_,g+2,O).times(o+""),S=qe(new _(n+"."+r.slice(1)),g-A).plus(u),_.precision=O,t==null?F(S,O,D,L=!0):S;for(h=S,l=s=S=j(S.minus(1),S.plus(1),g,1),T=F(S.times(S),g,1),i=3;;){if(s=F(s.times(T),g,1),u=l.plus(j(s,new _(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(gr(_,g+2,O).times(o+""))),l=j(l,new _(k),g,1),t==null)if(Nt(l.d,g-A,D,a))_.precision=g+=A,u=s=S=j(h.minus(1),h.plus(1),g,1),T=F(S.times(S),g,1),i=a=1;else return F(l,_.precision=O,D,L=!0);else return _.precision=O,l;l=u,i+=2}}function fo(e){return String(e.s*e.s/0)}function dr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%M,r<0&&(n+=M),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),uo.test(t))return dr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(nu.test(t))r=16,t=t.toLowerCase();else if(ru.test(t))r=2;else if(iu.test(t))r=8;else throw Error($e+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=po(n,new n(r),o,o*2)),u=pr(t,r,me),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=yr(u,g),e.d=u,L=!1,s&&(e=j(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?W(2,l):He.pow(2,l))),L=!0,e)}function uu(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:at(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/wr(5,r)),t=at(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function at(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/M);for(L=!1,l=r.times(r),a=new e(n);;){if(s=j(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=j(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return L=!0,s.d.length=h+1,s}function wr(e,t){for(var r=e;--t;)r*=e;return r}function go(e,t){var r,n=t.s<0,i=we(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return _e=n?4:1,t;if(r=t.divToInt(i),r.isZero())_e=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return _e=ro(r)?n?2:3:n?4:1,t;_e=ro(r)?n?1:4:n?3:2}return t.minus(i).abs()}function On(e,t,r,n){var i,o,s,a,l,u,g,h,T,k=e.constructor,A=r!==void 0;if(A?(ae(r,1,Be),n===void 0?n=k.rounding:ae(n,0,8)):(r=k.precision,n=k.rounding),!e.isFinite())g=fo(e);else{for(g=be(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),T=new k(1),T.e=g.length-s,T.d=pr(be(T),10,i),T.e=T.d.length),h=pr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new k(e),e.d=h,e.e=o,e=j(e,T,r,n,0,i),h=e.d,o=e.e,u=oo),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=pr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function cu(e){return new this(e).abs()}function pu(e){return new this(e).acos()}function du(e){return new this(e).acosh()}function mu(e,t){return new this(e).plus(t)}function fu(e){return new this(e).asin()}function gu(e){return new this(e).asinh()}function hu(e){return new this(e).atan()}function yu(e){return new this(e).atanh()}function wu(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=we(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?we(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=we(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(j(e,t,o,1)),t=we(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(j(e,t,o,1)),r}function bu(e){return new this(e).cbrt()}function Eu(e){return F(e=new this(e),e.e+1,2)}function xu(e,t,r){return new this(e).clamp(t,r)}function Pu(e){if(!e||typeof e!="object")throw Error(hr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Be,"rounding",0,8,"toExpNeg",-st,0,"toExpPos",0,st,"maxE",0,st,"minE",-st,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error($e+r+": "+n);if(r="crypto",i&&(this[r]=Sn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ao);else this[r]=!1;else throw Error($e+r+": "+n);return this}function vu(e){return new this(e).cos()}function Tu(e){return new this(e).cosh()}function ho(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,io(o)){u.s=o.s,L?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;L?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(ao);else for(;o=10;i/=10)n++;npt,datamodelEnumToSchemaEnum:()=>Yu});f();c();p();d();m();f();c();p();d();m();function Yu(e){return{name:e.name,values:e.values.map(t=>t.name)}}f();c();p();d();m();var pt=(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.updateManyAndReturn="updateManyAndReturn",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw",O))(pt||{});var Po=Re(Ki());f();c();p();d();m();mn();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var bo={keyword:Oe,entity:Oe,value:e=>de(We(e)),punctuation:We,directive:Oe,function:Oe,variable:e=>de(We(e)),string:e=>de(kt(e)),boolean:Ot,number:Oe,comment:It};var Zu=e=>e,Er={},Xu=0,N={manual:Er.Prism&&Er.Prism.manual,disableWorkerMessageHandler:Er.Prism&&Er.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof fe){let t=e;return new fe(t.type,N.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(N.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof fe)continue;if(Y&&G!=t.length-1){D.lastIndex=ie;var h=D.exec(e);if(!h)break;var g=h.index+(q?h[1].length:0),T=h.index+h[0].length,a=G,l=ie;for(let B=t.length;a=l&&(++G,ie=l);if(t[G]instanceof fe)continue;u=a-G,Ae=e.slice(ie,l),h.index-=ie}else{D.lastIndex=0;var h=D.exec(Ae),u=1}if(!h){if(o)break;continue}q&&(U=h[1]?h[1].length:0);var g=h.index+U,h=h[0].slice(U),T=g+h.length,k=Ae.slice(0,g),A=Ae.slice(T);let X=[G,u];k&&(++G,ie+=k.length,X.push(k));let Ze=new fe(S,O?N.tokenize(h,O):h,Ct,h,Y);if(X.push(Ze),A&&X.push(A),Array.prototype.splice.apply(t,X),u!=1&&N.matchGrammar(e,t,r,G,ie,!0,S),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return N.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=N.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=N.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:fe};N.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};N.languages.javascript=N.languages.extend("clike",{"class-name":[N.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});N.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;N.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:N.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:N.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:N.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:N.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});N.languages.markup&&N.languages.markup.tag.addInlined("script","javascript");N.languages.js=N.languages.javascript;N.languages.typescript=N.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});N.languages.ts=N.languages.typescript;function fe(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}fe.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return fe.stringify(r,t)}).join(""):ec(e.type)(e.content)};function ec(e){return bo[e]||Zu}function Eo(e){return tc(e,N.languages.javascript)}function tc(e,t){return N.tokenize(e,t).map(n=>fe.stringify(n)).join("")}f();c();p();d();m();function xo(e){return bn(e)}var xr=class e{firstLineNumber;lines;static read(t){let r;try{r=sr.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,xo(n).split(` -`))}highlight(){let t=Eo(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var rc={red:Je,gray:It,dim:St,bold:de,underline:Rt,highlightSource:e=>e.highlight()},nc={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function ic({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function oc({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=ic({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=xr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=ac(g),T=sc(g);if(!T)return s;s.functionName=`${T.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,A=>A.slice(0,T.openingBraceIndex))),u=o.highlightSource(u);let k=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((A,S)=>o.gray(String(S).padStart(k))+" "+A).mapLines(A=>o.dim(A)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let A=h+k+1;A+=2,s.callArguments=(0,Po.default)(i,A).slice(A)}}return s}function sc(e){let t=Object.keys(pt).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function ac(e){let t=0;for(let r=0;r"Unknown error")}function So(e){return e.errors.flatMap(t=>t.kind==="Union"?So(t):[t])}function cc(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:pc(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function pc(e,t){return[...new Set(e.concat(t))]}function dc(e){return Cn(e,(t,r)=>{let n=To(t),i=To(r);return n!==i?n-i:Co(t)-Co(r)})}function To(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Co(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();c();p();d();m();var pe=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();c();p();d();m();f();c();p();d();m();ko();f();c();p();d();m();var dt=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};Ro();f();c();p();d();m();f();c();p();d();m();var Tr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();c();p();d();m();var Cr=e=>e,Ar={bold:Cr,red:Cr,green:Cr,dim:Cr,enabled:!1},Oo={bold:de,red:Je,green:kt,dim:St,enabled:!0},mt={write(e){e.writeLine(",")}};f();c();p();d();m();var Pe=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();c();p();d();m();var Ue=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var ft=class extends Ue{items=[];addItem(t){return this.items.push(new Tr(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Pe("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(mt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var gt=class e extends Ue{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof ft&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Pe("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(mt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();c();p();d();m();var z=class extends Ue{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();c();p();d();m();var Bt=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(mt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function vr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":mc(e,t);break;case"IncludeOnScalar":fc(e,t);break;case"EmptySelection":gc(e,t,r);break;case"UnknownSelectionField":bc(e,t);break;case"InvalidSelectionValue":Ec(e,t);break;case"UnknownArgument":xc(e,t);break;case"UnknownInputField":Pc(e,t);break;case"RequiredArgumentMissing":vc(e,t);break;case"InvalidArgumentType":Tc(e,t);break;case"InvalidArgumentValue":Cc(e,t);break;case"ValueTooLarge":Ac(e,t);break;case"SomeFieldsMissing":Sc(e,t);break;case"TooManyFieldsGiven":Rc(e,t);break;case"Union":Ao(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function mc(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function fc(e,t){let[r,n]=ht(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${jt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function gc(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){hc(e,t,i);return}if(n.hasField("select")){yc(e,t);return}}if(r?.[je(e.outputType.name)]){wc(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function hc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function yc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),_o(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${jt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function wc(e,t){let r=new Bt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new pe("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=ht(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new gt;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function bc(e,t){let r=Lo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":_o(n,e.outputType);break;case"include":kc(n,e.outputType);break;case"omit":Oc(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(jt(n)),i.join(" ")})}function Ec(e,t){let r=Lo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function xc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ic(n,e.arguments)),t.addErrorMessage(i=>Fo(i,r,e.arguments.map(o=>o.name)))}function Pc(e,t){let[r,n]=ht(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Do(o,e.inputType)}t.addErrorMessage(o=>Fo(o,n,e.inputType.fields.map(s=>s.name)))}function Fo(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Mc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(jt(e)),n.join(" ")}function vc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof z&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=ht(e.argumentPath),s=new Bt,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new pe(o,s).makeRequired())}else{let l=e.inputTypes.map(Mo).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,l]=ht(e.dependentArgumentPath);t.addErrorMessage(u=>`Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.`)}}}function Mo(e){return e.kind==="list"?`${Mo(e.elementType)}[]`:e.name}function Tc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Sr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Cc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Sr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ac(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof z&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Sc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Do(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Sr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(jt(i)),o.join(" ")})}function Rc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function _o(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function kc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function Oc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function Ic(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function Lo(e,t){let[r,n]=ht(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Do(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function ht(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function jt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Fc=3;function Mc(e,t){let r=1/0,n;for(let i of t){let o=(0,Io.default)(e,i);o>Fc||o`}};function yt(e){return e instanceof Ut}f();c();p();d();m();var Rr=Symbol(),_n=new WeakMap,Le=class{constructor(t){t===Rr?_n.set(this,`Prisma.${this._getName()}`):_n.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return _n.get(this)}},Vt=class extends Le{_getNamespace(){return"NullTypes"}},Qt=class extends Vt{#e};Ln(Qt,"DbNull");var Gt=class extends Vt{#e};Ln(Gt,"JsonNull");var Jt=class extends Vt{#e};Ln(Jt,"AnyNull");var kr={classes:{DbNull:Qt,JsonNull:Gt,AnyNull:Jt},instances:{DbNull:new Qt(Rr),JsonNull:new Gt(Rr),AnyNull:new Jt(Rr)}};function Ln(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();c();p();d();m();var No=": ",Or=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+No.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(No).write(this.value)}};var Dn=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function wt(e){return new Dn(qo(e))}function qo(e){let t=new gt;for(let[r,n]of Object.entries(e)){let i=new Or(r,$o(n));t.addField(i)}return t}function $o(e){if(typeof e=="string")return new z(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new z(String(e));if(typeof e=="bigint")return new z(`${e}n`);if(e===null)return new z("null");if(e===void 0)return new z("undefined");if(ct(e))return new z(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new z(`Buffer.alloc(${e.byteLength})`):new z(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=br(e)?e.toISOString():"Invalid Date";return new z(`new Date("${t}")`)}return e instanceof Le?new z(`Prisma.${e._getName()}`):yt(e)?new z(`prisma.${je(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?_c(e):typeof e=="object"?qo(e):new z(Object.prototype.toString.call(e))}function _c(e){let t=new ft;for(let r of e)t.addItem($o(r));return t}function Ir(e,t){let r=t==="pretty"?Oo:Ar,n=e.renderAllMessages(r),i=new dt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=wt(e);for(let h of t)vr(h,a,s);let{message:l,args:u}=Ir(a,r),g=Pr({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new te(g,{clientVersion:o})}f();c();p();d();m();f();c();p();d();m();function ve(e){return e.replace(/^./,t=>t.toLowerCase())}f();c();p();d();m();function jo(e,t,r){let n=ve(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Lc({...e,...Bo(t.name,e,t.result.$allModels),...Bo(t.name,e,t.result[n])})}function Lc(e){let t=new xe,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return ot(e,n=>({...n,needs:r(n.name,new Set)}))}function Bo(e,t,r){return r?ot(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Dc(t,o,i)})):{}}function Dc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Uo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Vo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Mr=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new xe;modelExtensionsCache=new xe;queryCallbacksCache=new xe;clientExtensions=qt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=qt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>jo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=ve(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},bt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Mr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Mr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();c();p();d();m();var _r=class{constructor(t){this.name=t}};function Qo(e){return e instanceof _r}function Go(e){return new _r(e)}f();c();p();d();m();f();c();p();d();m();var Jo=Symbol(),Wt=class{constructor(t){if(t!==Jo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Lr:t}},Lr=new Wt(Jo);function Te(e){return e instanceof Wt}var Nc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Wo="explicitly `undefined` values are not allowed";function Dr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=bt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Nn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Nc[t],query:Kt(r,h)}}function Kt({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Ho(r,n),selection:qc(e,t,i,n)}}function qc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Uc(e,n)):$c(n,t,r)}function $c(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Bc(n,t,e),jc(n,r,e),n}function Bc(e,t,r){for(let[n,i]of Object.entries(t)){if(Te(i))continue;let o=r.nestSelection(n);if(qn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Kt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Kt(i,o)}}function jc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=Vo(i,n);for(let[s,a]of Object.entries(o)){if(Te(a))continue;qn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Uc(e,t){let r={},n=t.getComputedFields(),i=Uo(e,n);for(let[o,s]of Object.entries(i)){if(Te(s))continue;let a=t.nestSelection(o);qn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Te(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Kt({},a):r[o]=!0;continue}r[o]=Kt(s,a)}}return r}function Ko(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(ut(e)){if(br(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Qo(e))return{$type:"Param",value:e.name};if(yt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Vc(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:w.Buffer.from(r,n,i).toString("base64")}}if(Qc(e))return e.values;if(ct(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Le){if(e!==kr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Gc(e))return e.toJSON();if(typeof e=="object")return Ho(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Ho(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Te(i)||(i!==void 0?r[n]=Ko(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:Wo}))}return r}function Vc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[je(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Me(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();c();p();d();m();function zo(e){if(!e._hasPreviewFlag("metrics"))throw new te("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var Et=class{_client;constructor(t){this._client=t}prometheus(t){return zo(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return zo(this._client),this._client._engine.metrics({format:"json",...t})}};f();c();p();d();m();function Yo(e,t){let r=qt(()=>Jc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Jc(e){return{datamodel:{models:$n(e.models),enums:$n(e.enums),types:$n(e.types)}}}function $n(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();c();p();d();m();var Bn=new WeakMap,Nr="$$PrismaTypedSql",Ht=class{constructor(t,r){Bn.set(this,{sql:t,values:r}),Object.defineProperty(this,Nr,{value:Nr})}get sql(){return Bn.get(this).sql}get values(){return Bn.get(this).values}};function Zo(e){return(...t)=>new Ht(e,t)}function qr(e){return e!=null&&e[Nr]===Nr}f();c();p();d();m();var ha=Re(Xo());f();c();p();d();m();es();mn();gn();f();c();p();d();m();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();c();p();d();m();f();c();p();d();m();var Br={enumerable:!0,configurable:!0,writable:!0};function jr(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Br,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var ns=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=Kc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=is(Reflect.ownKeys(o),r),a=is(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Br,...l?.getPropertyDescriptor(s)}:Br:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[ns]=function(){let o={...this};return delete o[ns],o},i}function Kc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function is(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();c();p();d();m();function xt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();c();p();d();m();function Ur(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();c();p();d();m();function os(e){if(e===void 0)return"";let t=wt(e);return new dt(0,{colors:Ar}).write(t).toString()}f();c();p();d();m();var Hc="P2037";function Vr({error:e,user_facing_error:t},r,n){return t.error_code?new se(zc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new J(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function zc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Hc&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Yt="";function ss(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=Xc(n)||tp(n)||ip(n)||lp(n)||sp(n);return i&&r.push(i),r},[])}var Yc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Zc=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Xc(e){var t=Yc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Zc.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||Yt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var ep=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function tp(e){var t=ep.exec(e);return t?{file:t[2],methodName:t[1]||Yt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var rp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,np=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function ip(e){var t=rp.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=np.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Yt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var op=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function sp(e){var t=op.exec(e);return t?{file:t[3],methodName:t[1]||Yt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var ap=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function lp(e){var t=ap.exec(e);return t?{file:t[2],methodName:t[1]||Yt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Vn=class{getLocation(){return null}},Qn=class{_error;constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ss(t).find(i=>{if(!i.file)return!1;let o=vn(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ve(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Vn:new Qn}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var as={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Pt(e={}){let t=cp(e);return Object.entries(t).reduce((n,[i,o])=>(as[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function cp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ls(e,t){let r=Qr(e);return t({action:"aggregate",unpacker:r,argsMapper:Pt})(e)}f();c();p();d();m();function pp(e={}){let{select:t,...r}=e;return typeof t=="object"?Pt({...r,_count:t}):Pt({...r,_count:{_all:!0}})}function dp(e={}){return typeof e.select=="object"?t=>Qr(e)(t)._count:t=>Qr(e)(t)._count._all}function us(e,t){return t({action:"count",unpacker:dp(e),argsMapper:pp})(e)}f();c();p();d();m();function mp(e={}){let t=Pt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function fp(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function cs(e,t){return t({action:"groupBy",unpacker:fp(e),argsMapper:mp})(e)}function ps(e,t,r){if(t==="aggregate")return n=>ls(n,r);if(t==="count")return n=>us(n,r);if(t==="groupBy")return n=>cs(n,r)}f();c();p();d();m();function ds(e,t){let r=t.fields.filter(i=>!i.relationName),n=yo(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ut(e,o,s.type,s.isList,s.kind==="enum")},...jr(Object.keys(n))})}f();c();p();d();m();f();c();p();d();m();var ms=e=>Array.isArray(e)?e:e.split("."),Gn=(e,t)=>ms(t).reduce((r,n)=>r&&r[n],e),fs=(e,t,r)=>ms(t).reduceRight((n,i,o,s)=>Object.assign({},Gn(e,s.slice(0,o)),{[i]:n}),r);function gp(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function hp(e,t,r){return t===void 0?e??{}:fs(t,r,e||!0)}function Jn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ve(e._errorFormat),g=gp(n,i),h=hp(l,o,g),T=r({dataPath:g,callsite:u})(h),k=yp(e,t);return new Proxy(T,{get(A,S){if(!k.includes(S))return A[S];let _=[a[S].type,r,S],D=[g,h];return Jn(e,..._,...D)},...jr([...k,...Object.getOwnPropertyNames(T)])})}}function yp(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var wp=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],bp=["aggregate","count","groupBy"];function Wn(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Ep(e,t),Pp(e,t),zt(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function Ep(e,t){let r=ve(t),n=Object.keys(pt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>l=>{let u=Ve(e._errorFormat);return e._createPrismaPromise(g=>{let h={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:g,callsite:u};return e._request({...h,...a})},{action:o,args:l,model:t})};return wp.includes(o)?Jn(e,t,s):xp(i)?ps(e,i,s):s({})}}}function xp(e){return bp.includes(e)}function Pp(e,t){return ze(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return ds(t,r)}))}f();c();p();d();m();function gs(e){return e.replace(/^./,t=>t.toUpperCase())}var Kn=Symbol();function Zt(e){let t=[vp(e),Tp(e),ne(Kn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(zt(r)),ge(e,t)}function vp(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function Tp(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ve),n=[...new Set(t.concat(r))];return ze({getKeys(){return n},getPropertyValue(i){let o=gs(i);if(e._runtimeDataModel.models[o]!==void 0)return Wn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Wn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function hs(e){return e[Kn]?e[Kn]:e}function ys(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Zt(t)}f();c();p();d();m();f();c();p();d();m();function ws({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(xt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(xt(u))}Cp(e,l.needs)&&s.push(Ap(l,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function Cp(e,t){return t.every(r=>Tn(e,r))}function Ap(e,t){return ze(ne(e.name,()=>e.compute(t)))}f();c();p();d();m();function Gr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Gr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Es({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Gr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=ve(l);return ws({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Sp=["$connect","$disconnect","$on","$transaction","$use","$extends"],xs=Sp;function Ps(e){if(e instanceof le)return Rp(e);if(qr(e))return kp(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Ps(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Rs(o,l),a.args=s,Ts(e,a,r,n+1)}})})}function Cs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Ts(e,t,s)}function As(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ss(r,n,0,e):e(r)}}function Ss(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Rs(i,l),Ss(a,t,r+1,n)}})}var vs=e=>e;function Rs(e=vs,t=vs){return r=>e(t(r))}f();c();p();d();m();var ks=H("prisma:client"),Os={Vercel:"vercel","Netlify CI":"netlify"};function Is({postinstall:e,ciName:t,clientVersion:r}){if(ks("checkPlatformCaching:postinstall",e),ks("checkPlatformCaching:ciName",t),e===!0&&t&&t in Os){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Os[t]}-build`;throw console.error(n),new Q(n,r)}}f();c();p();d();m();function Fs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();c();p();d();m();f();c();p();d();m();var Op=()=>globalThis.process?.release?.name==="node",Ip=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Fp=()=>!!globalThis.Deno,Mp=()=>typeof globalThis.Netlify=="object",_p=()=>typeof globalThis.EdgeRuntime=="object",Lp=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Dp(){return[[Mp,"netlify"],[_p,"edge-light"],[Lp,"workerd"],[Fp,"deno"],[Ip,"bun"],[Op,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Np={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ms(){let e=Dp();return{id:e,prettyName:Np[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();c();p();d();m();f();c();p();d();m();var Hn=Re(Pn());f();c();p();d();m();function _s(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}f();c();p();d();m();function Ls(e){return e.split(` -`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}f();c();p();d();m();var Ds=Re(Xi());function Ns({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Ds.default)({user:t,repo:r,template:n,title:e,body:i})}function qs({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=Li(6e3-(s?.length??0)),l=Ls((0,Hn.default)(a)),u=n?`# Description -\`\`\` -${n} -\`\`\``:"",g=(0,Hn.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${y.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?_s(s):""} -\`\`\` -`),h=Ns({title:r,body:g});return`${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${Rt(h)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}var $s="6.13.0";f();c();p();d();m();function Jr({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new Q(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new Q("error: Missing URL environment variable, value, or override.",n);return i}f();c();p();d();m();f();c();p();d();m();function Bs(e){if(e?.kind==="itx")return e.options.id}f();c();p();d();m();var zn=class{engineObject;constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r,enableTracing:t.enableTracing})}async connect(t,r){return __PrismaProxy.connect(this.engineObject,t,r)}async disconnect(t,r){return __PrismaProxy.disconnect(this.engineObject,t,r)}query(t,r,n,i){return __PrismaProxy.execute(this.engineObject,t,r,n,i)}compile(){throw new Error("not implemented")}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r,n){return __PrismaProxy.startTransaction(this.engineObject,t,r,n)}async commitTransaction(t,r,n){return __PrismaProxy.commitTransaction(this.engineObject,t,r,n)}async rollbackTransaction(t,r,n){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r,n)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}trace(t){return __PrismaProxy.trace(this.engineObject,t)}},js={async loadLibrary(e){if(!__PrismaProxy)throw new Q("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:zn}}};var $p="P2036",Ce=H("prisma:client:libraryEngine");function Bp(e){return e.item_type==="query"&&"query"in e}function jp(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var lk=[...fn,"native"],Up=0xffffffffffffffffn,Yn=1n;function Vp(){let e=Yn++;return Yn>Up&&(Yn=1n),e}var er=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(t,r){this.libraryLoader=js,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(t){return{applyPendingMigrations:t.applyPendingMigrations?.bind(t),commitTransaction:this.withRequestId(t.commitTransaction.bind(t)),connect:this.withRequestId(t.connect.bind(t)),disconnect:this.withRequestId(t.disconnect.bind(t)),metrics:t.metrics?.bind(t),query:this.withRequestId(t.query.bind(t)),rollbackTransaction:this.withRequestId(t.rollbackTransaction.bind(t)),sdlSchema:t.sdlSchema?.bind(t),startTransaction:this.withRequestId(t.startTransaction.bind(t)),trace:t.trace.bind(t),free:t.free?.bind(t)}}withRequestId(t){return async(...r)=>{let n=Vp().toString();try{return await t(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(t==="start"){let l=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(l,o)}else t==="commit"?s=await this.engine?.commitTransaction(n.id,o):t==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Qp(a)){let l=this.getExternalAdapterError(a,i?.errorRegistry);throw l?l.error:new se(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new J(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(Ce("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new J("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new J("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(lr));let r=await this.adapterPromise;r&&Ce("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{t.deref()?.logger(n)},r))}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);r&&(r.level=r?.level.toLowerCase()??"unknown",Bp(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):jp(r)?this.loggerRustPanic=new ce(Zn(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ce(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ce("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(lr)),await this.adapterPromise,Ce("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new Q(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ce("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let t=async()=>{await new Promise(n=>setImmediate(n)),Ce("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,Ce("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Ce(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new J(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof Q)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ce(Zn(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new J(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Ce("requestBatch");let i=Ur(t,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),Bs(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new J(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:l,errors:u}=a;if(Array.isArray(l))return l.map(g=>g.errors&&g.errors.length>0?this.loggerRustPanic??this.buildQueryError(g.errors[0],o?.errorRegistry):{data:g});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(a))}buildQueryError(t,r){if(t.user_facing_error.is_panic)return new ce(Zn(this,t.user_facing_error.message),this.config.clientVersion);let n=this.getExternalAdapterError(t.user_facing_error,r);return n?n.error:Vr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t,r){if(t.error_code===$p&&r){let n=t.meta?.id;ur(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return ur(i,"External error with reported id was not registered"),i}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function Qp(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Zn(e,t){return qs({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}f();c();p();d();m();function Us({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=S=>{i.push({_tag:"warning",value:S})},a=S=>{let I=S.join(` -`);o.push({_tag:"error",value:I})},l=!!e?.startsWith("prisma://"),u=En(e),g=!!t,h=l||u;!g&&r&&h&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let T=h||!r;g&&(T||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?l&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let k={accelerate:T,ppg:u,driverAdapters:g};function A(S){return S.length>0}return A(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:k}:{ok:!0,diagnostics:{warnings:i},isUsing:k}}function Vs({copyEngine:e=!0},t){let r;try{r=Jr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=Us({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"react-native"});for(let h of o.warnings)Dt(...h.value);if(!n){let h=o.errors[0];throw new te(h.value,{clientVersion:t.clientVersion})}let s=it(t.generator),a=s==="library",l=s==="binary",u=s==="client",g=(i.accelerate||i.ppg)&&!i.driverAdapters;return new er(t)}f();c();p();d();m();function Wr({generator:e}){return e?.previewFeatures??[]}f();c();p();d();m();var Qs=e=>({command:e});f();c();p();d();m();f();c();p();d();m();var Gs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();c();p();d();m();function vt(e){try{return Js(e,"fast")}catch{return Js(e,"slow")}}function Js(e,t){return JSON.stringify(e.map(r=>Ks(r,t)))}function Ks(e,t){if(Array.isArray(e))return e.map(r=>Ks(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(ut(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(Ee.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(w.Buffer.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(Gp(e))return{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:w.Buffer.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Hs(e):e}function Gp(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Hs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ws);let t={};for(let r of Object.keys(e))t[r]=Ws(e[r]);return t}function Ws(e){return typeof e=="bigint"?e.toString():Hs(e)}var Jp=/^(\s*alter\s)/i,zs=H("prisma:client");function Xn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Jp.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var ei=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(qr(r))n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:vt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:vt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Gs(r),i={values:vt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?zs(`prisma.${e}(${n}, ${i.values})`):zs(`prisma.${e}(${n})`),{query:n,parameters:i}},Ys={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},Zs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();c();p();d();m();function ti(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=Xs(r(s)):Xs(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Xs(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();c();p();d();m();var Wp=hn.split(".")[0],Kp={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ri=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${Wp}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??Kp}};function ea(){return new ri}f();c();p();d();m();function ta(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();c();p();d();m();function ra(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();c();p();d();m();var Kr=class{_middlewares=[];use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};f();c();p();d();m();var ia=Re(Pn());f();c();p();d();m();function Hr(e){return typeof e.batchRequestIdx=="number"}f();c();p();d();m();function na(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ni(e.query.arguments)),t.push(ni(e.query.selection)),t.join("")}function ni(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ni(n)})`:r}).join(" ")})`}f();c();p();d();m();var Hp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function ii(e){return Hp[e]}f();c();p();d();m();var zr=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iYe("bigint",r));case"bytes-array":return t.map(r=>Ye("bytes",r));case"decimal-array":return t.map(r=>Ye("decimal",r));case"datetime-array":return t.map(r=>Ye("datetime",r));case"date-array":return t.map(r=>Ye("date",r));case"time-array":return t.map(r=>Ye("time",r));default:return t}}function Yr(e){let t=[],r=zp(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>ii(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Zp(o),containsWrite:u,customDataProxyFetch:i})).map((h,T)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[T],h)}catch(k){return k}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?oa(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ii(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:na(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Yp(t),Xp(t,i))throw t;if(t instanceof se&&ed(t)){let u=sa(t.meta);Fr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Pr({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new se(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ce(l,this.client._clientVersion);if(t instanceof J)throw new J(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof Q)throw new Q(l,this.client._clientVersion);if(t instanceof ce)throw new ce(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,ia.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Gn(o,s),l=i==="queryRaw"?Yr(a):lt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Zp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:oa(e)};Me(e,"Unknown transaction kind")}}function oa(e){return{id:e.id,payload:e.payload}}function Xp(e,t){return Hr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function ed(e){return e.code==="P2009"||e.code==="P2012"}function sa(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(sa)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();c();p();d();m();var aa=$s;f();c();p();d();m();var da=Re(Fn());f();c();p();d();m();var $=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};ue($,"PrismaClientConstructorValidationError");var la=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],ua=["pretty","colorless","minimal"],ca=["info","query","warn","error"],td={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Tt(r,t)||` Available datasources: ${t.join(", ")}`;throw new $(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new $(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&&it(t.generator)==="client")throw new $('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new $('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Wr(t).includes("driverAdapters"))throw new $('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(it(t.generator)==="binary")throw new $('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!ua.includes(e)){let t=Tt(e,ua);throw new $(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ca.includes(r)){let n=Tt(r,ca);throw new $(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Tt(i,o);throw new $(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new $(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new $(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new $(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new $('"omit" option is expected to be an object.');if(e===null)throw new $('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=nd(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new $(id(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new $(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Tt(r,t);throw new $(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ma(e,t){for(let[r,n]of Object.entries(e)){if(!la.includes(r)){let i=Tt(r,la);throw new $(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}td[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new $('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Tt(e,t){if(t.length===0||typeof e!="string")return"";let r=rd(e,t);return r?` Did you mean "${r}"?`:""}function rd(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,da.default)(e,i)}));r.sort((i,o)=>i.distanceje(n)===t);if(r)return e[r]}function id(e,t){let r=wt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Ir(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}f();c();p();d();m();function fa(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Hr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Qe=H("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var od={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},sd=Symbol.for("prisma.client.transaction.id"),ad={id:0,nextId(){return++this.id}};function ya(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new Kr;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ti();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Is(e),n&&ma(n,e);let i=new $r().on("error",()=>{});this._extensions=bt.empty(),this._previewFeatures=Wr(e),this._clientVersion=e.clientVersion??aa,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=ea();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Ie.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Ie.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let l=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==l)throw new Q(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new Q("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&H.enable("prisma:client");let h=Ie.resolve(e.dirname,e.relativePath);sr.existsSync(h)||(h=e.dirname),Qe("dirname",e.dirname),Qe("relativePath",e.relativePath),Qe("cwd",h);let T=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:T.allowTriggerPanic,prismaPath:T.binaryPath??void 0,engineEndpoint:T.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&ra(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(k=>typeof k=="string"?k==="query":k.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Fs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Jr,getBatchRequestPayload:Ur,prismaGraphQLToJSError:Vr,PrismaClientUnknownRequestError:J,PrismaClientInitializationError:Q,PrismaClientKnownRequestError:se,debug:H("prisma:client:accelerateEngine"),engineVersion:ha.version,clientVersion:e.clientVersion}},Qe("clientVersion",e.clientVersion),this._engine=Vs(e,this._engineConfig),this._requestHandler=new Zr(this,i),l.log)for(let k of l.log){let A=typeof k=="string"?k:k.emit==="stdout"?k.level:null;A&&this.$on(A,S=>{Lt.log(`${Lt.tags[A]??""}`,S.message||S.query)})}}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Zt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Di()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ga(n,i);return Xn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new te("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Xn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new te(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Qs,callsite:Ve(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ga(n,i));throw new te("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new te("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=ad.nextId(),s=ta(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return fa(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return ge(Zt(ge(hs(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>ti(n)),ne(sd,()=>n.id)])),[xt(xs)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??od,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,I=>g(u,_=>(I?.end(),l(_))));let{runInTransaction:h,args:T,...k}=u,A={...n,...k};T&&(A.args=i.middlewareArgsToRequestArgs(T)),n.transaction!==void 0&&h===!1&&delete A.transaction;let S=await Cs(this,A);return A.model?Es({result:S,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:T,customDataProxyFetch:k}){try{n=u?u(n):n;let A={name:"serialize"},S=this._tracingHelper.runInChildSpan(A,()=>Dr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return H.enabled("prisma:client")&&(Qe("Prisma Client call:"),Qe(`prisma.${i}(${os(n)})`),Qe("Generated request:"),Qe(JSON.stringify(S,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:S,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:T,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:k})}catch(A){throw A.clientVersion=this._clientVersion,A}}$metrics=new Et(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=ys}return t}function ga(e,t){return ld(e)?[new le(e,t),Ys]:[e,Zs]}function ld(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();c();p();d();m();var ud=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function wa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!ud.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();c();p();d();m();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=react-native.js.map diff --git a/backend/generated/prisma/runtime/wasm-compiler-edge.js b/backend/generated/prisma/runtime/wasm-compiler-edge.js deleted file mode 100644 index 404b280..0000000 --- a/backend/generated/prisma/runtime/wasm-compiler-edge.js +++ /dev/null @@ -1,83 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -"use strict";var cu=Object.create;var Jr=Object.defineProperty;var uu=Object.getOwnPropertyDescriptor;var pu=Object.getOwnPropertyNames;var mu=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty;var ge=(e,t)=>()=>(e&&(t=e(e=0)),t);var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pt=(e,t)=>{for(var r in t)Jr(e,r,{get:t[r],enumerable:!0})},Fo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pu(t))!du.call(e,i)&&i!==r&&Jr(e,i,{get:()=>t[i],enumerable:!(n=uu(t,i))||n.enumerable});return e};var Ce=(e,t,r)=>(r=e!=null?cu(mu(e)):{},Fo(t||!e||!e.__esModule?Jr(r,"default",{value:e,enumerable:!0}):r,e)),$o=e=>Fo(Jr({},"__esModule",{value:!0}),e);function li(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new w(hu.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new w([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new w([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new w(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(h=0){return Z(h,"offset"),me(h,"offset"),ee(h,"offset",this.length-1),new DataView(this.buffer)[r[a]](h,f)},o=(a,f)=>function(h,A=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),S=yu[C];return Z(A,"offset"),me(A,"offset"),ee(A,"offset",this.length-1),gu(h,"value",S[0],S[1]),new DataView(this.buffer)[r[a]](A,h,f),A+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(e[f.replace("Uint","UInt")]=e[f]),f.includes("Float64")&&(e[f.replace("Float64","Double")]=e[f]),f.includes("Float32")&&(e[f.replace("Float32","Float")]=e[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(e[a]=i(f,!1),e[a+"LE"]=i(f,!0),e[a+"BE"]=i(f,!1)),a.startsWith("write")&&(e[a]=o(f,!1),e[a+"LE"]=o(f,!0),e[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function qo(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function Kr(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function ee(e,t,r=Eu+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function Z(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function me(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function gu(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function Vo(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function xu(e,t="utf8"){return w.from(e,t)}var w,yu,hu,wu,bu,Eu,y,ci,c=ge(()=>{"use strict";w=class e extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(t,r=0,n="utf8"){return Vo(n,"encoding"),e.allocUnsafe(t).fill(r,n)}static allocUnsafe(t){return e.from(t)}static allocUnsafeSlow(t){return e.from(t)}static isBuffer(t){return t&&!!t._isBuffer}static byteLength(t,r="utf8"){if(typeof t=="string")return li(t,r).byteLength;if(t&&t.byteLength)return t.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(t){return bu.includes(t)}static compare(t,r){Kr(t,"buff1"),Kr(r,"buff2");for(let n=0;nr[n])return 1}return t.length===r.length?0:t.length>r.length?1:-1}static from(t,r="utf8"){if(t&&typeof t=="object"&&t.type==="Buffer")return new e(t.data);if(typeof t=="number")return new e(new Uint8Array(t));if(typeof t=="string")return li(t,r);if(ArrayBuffer.isView(t)){let{byteOffset:n,byteLength:i,buffer:o}=t;return"map"in t&&typeof t.map=="function"?new e(t.map(s=>s%256),n,i):new e(o,n,i)}if(t&&typeof t=="object"&&("length"in t||"byteLength"in t||"buffer"in t))return new e(t);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(t,r){if(t.length===0)return e.alloc(0);let n=[].concat(...t.map(o=>[...o])),i=e.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(t=0,r=this.length){return this.subarray(t,r)}subarray(t=0,r=this.length){return Object.setPrototypeOf(super.subarray(t,r),e.prototype)}reverse(){return super.reverse(),this}readIntBE(t,r){Z(t,"offset"),me(t,"offset"),ee(t,"offset",this.length-1),Z(r,"byteLength"),me(r,"byteLength");let n=new DataView(this.buffer,t,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,t&255),t=t/256;return r+n}writeUintBE(t,r,n){return this.writeUIntBE(t,r,n)}writeUIntLE(t,r,n){Z(r,"offset"),me(r,"offset"),ee(r,"offset",this.length-1),Z(n,"byteLength"),me(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===t[n])}copy(t,r=0,n=0,i=this.length){ee(r,"targetStart"),ee(n,"sourceStart",this.length),ee(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:t.length),a);return this}includes(t,r=null,n="utf-8"){return this.indexOf(t,r,n)!==-1}lastIndexOf(t,r=null,n="utf-8"){return this.indexOf(t,r,n,!0)}indexOf(t,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=e.from(typeof t=="number"?[t]:t,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,h)=>(i?h<=a:h>=a)&&this[h]===s[0]&&s.every((C,S)=>this[h+S]===C))}toString(t="utf8",r=0,n=this.length){if(r=r<0?0:r,t=t.toString().toLowerCase(),n<=0)return"";if(t==="utf8"||t==="utf-8")return wu.decode(this.slice(r,n));if(t==="base64"||t==="base64url"){let i=btoa(this.reduce((o,s)=>o+ci(s),""));return t==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return this.slice(r,n).reduce((i,o)=>i+ci(o&(t==="ascii"?127:255)),"");if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");qo(`encoding "${t}"`)}toLocaleString(){return this.toString()}inspect(){return``}};yu={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},hu=new TextEncoder,wu=new TextDecoder,bu=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Eu=4294967295;fu(w.prototype);y=new Proxy(xu,{construct(e,[t,r]){return w.from(t,r)},get(e,t){return w[t]}}),ci=String.fromCodePoint});var g,x,u=ge(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=g});var b,p=ge(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,m=ge(()=>{"use strict";E=()=>{};E.prototype=E});var d=ge(()=>{"use strict"});function Ho(e,t){var r,n,i,o,s,a,f,h,A=e.constructor,C=A.precision;if(!e.s||!t.s)return t.s||(t=new A(e)),W?V(t,C):t;if(f=e.d,h=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=h.length):(n=h,i=s,a=f.length),s=Math.ceil(C/Q),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=h.length,a-o<0&&(o=a,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/te|0,f[o]%=te;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,W?V(t,C):t}function Se(e,t,r){if(e!==~~e||er)throw Error(Ye+e)}function Re(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(pi+X(e));if(!e.s)return new A(ye);for(t==null?(W=!1,a=C):a=t,s=new A(.03125);e.abs().gte(.1);)e=e.times(s),h+=5;for(n=Math.log(ze(2,h))/Math.LN10*2+5|0,a+=n,r=i=o=new A(ye),A.precision=a;;){if(i=V(i.times(e),a),r=r.times(++f),s=o.plus(Le(i,r,a)),Re(s.d).slice(0,a)===Re(o.d).slice(0,a)){for(;h--;)o=V(o.times(o),a);return A.precision=C,t==null?(W=!0,V(o,C)):o}o=s}}function X(e){for(var t=e.e*Q,r=e.d[0];r>=10;r/=10)t++;return t}function ui(e,t,r){if(t>e.LN10.sd())throw W=!0,r&&(e.precision=r),Error(be+"LN10 precision limit exceeded");return V(new e(e.LN10),t)}function Ve(e){for(var t="";e--;)t+="0";return t}function Gt(e,t){var r,n,i,o,s,a,f,h,A,C=1,S=10,R=e,_=R.d,k=R.constructor,L=k.precision;if(R.s<1)throw Error(be+(R.s?"NaN":"-Infinity"));if(R.eq(ye))return new k(0);if(t==null?(W=!1,h=L):h=t,R.eq(10))return t==null&&(W=!0),ui(k,h);if(h+=S,k.precision=h,r=Re(_),n=r.charAt(0),o=X(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=Re(R.d),n=r.charAt(0),C++;o=X(R),n>1?(R=new k("0."+r),o++):R=new k(n+"."+r.slice(1))}else return f=ui(k,h+2,L).times(o+""),R=Gt(new k(n+"."+r.slice(1)),h-S).plus(f),k.precision=L,t==null?(W=!0,V(R,L)):R;for(a=s=R=Le(R.minus(ye),R.plus(ye),h),A=V(R.times(R),h),i=3;;){if(s=V(s.times(A),h),f=a.plus(Le(s,new k(i),h)),Re(f.d).slice(0,h)===Re(a.d).slice(0,h))return a=a.times(2),o!==0&&(a=a.plus(ui(k,h+2,L).times(o+""))),a=Le(a,new k(C),h),k.precision=L,t==null?(W=!0,V(a,L)):a;a=f,i+=2}}function Bo(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=dt(r/Q),e.d=[],n=(r+1)%Q,r<0&&(n+=Q),nzr||e.e<-zr))throw Error(pi+r)}else e.s=0,e.e=0,e.d=[0];return e}function V(e,t,r){var n,i,o,s,a,f,h,A,C=e.d;for(s=1,o=C[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=Q,i=t,h=C[A=0];else{if(A=Math.ceil((n+1)/Q),o=C.length,A>=o)return e;for(h=o=C[A],s=1;o>=10;o/=10)s++;n%=Q,i=n-Q+s}if(r!==void 0&&(o=ze(10,s-i-1),a=h/o%10|0,f=t<0||C[A+1]!==void 0||h%o,f=r<4?(a||f)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?h/ze(10,s-i):0:C[A-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return f?(o=X(e),C.length=1,t=t-o-1,C[0]=ze(10,(Q-t%Q)%Q),e.e=dt(-t/Q)||0):(C.length=1,C[0]=e.e=e.s=0),e;if(n==0?(C.length=A,o=1,A--):(C.length=A+1,o=ze(10,Q-n),C[A]=i>0?(h/ze(10,s-i)%ze(10,i)|0)*o:0),f)for(;;)if(A==0){(C[0]+=o)==te&&(C[0]=1,++e.e);break}else{if(C[A]+=o,C[A]!=te)break;C[A--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(W&&(e.e>zr||e.e<-zr))throw Error(pi+X(e));return e}function Wo(e,t){var r,n,i,o,s,a,f,h,A,C,S=e.constructor,R=S.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new S(e),W?V(t,R):t;if(f=e.d,C=t.d,n=t.e,h=e.e,f=f.slice(),s=h-n,s){for(A=s<0,A?(r=f,s=-s,a=C.length):(r=C,n=h,a=f.length),i=Math.max(Math.ceil(R/Q),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=C.length,A=i0;--i)f[a++]=0;for(i=C.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+Ve(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ve(-i-1)+o,r&&(n=r-s)>0&&(o+=Ve(n))):i>=s?(o+=Ve(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ve(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ve(n))),e.s<0?"-"+o:o}function jo(e,t){if(e.length>t)return e.length=t,!0}function Jo(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ye+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Bo(s,o.toString())}else if(typeof o!="string")throw Error(Ye+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Tu.test(o))Bo(s,o);else throw Error(Ye+o)}if(i.prototype=I,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Jo,i.config=i.set=vu,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ye+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ye+r+": "+n);return this}var mt,Pu,mi,W,be,Ye,pi,dt,ze,Tu,ye,te,Q,Qo,zr,I,Le,mi,Yr,Ko=ge(()=>{"use strict";c();u();p();m();d();l();mt=1e9,Pu={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},W=!0,be="[DecimalError] ",Ye=be+"Invalid argument: ",pi=be+"Exponent out of range: ",dt=Math.floor,ze=Math.pow,Tu=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,te=1e7,Q=7,Qo=9007199254740991,zr=dt(Qo/Q),I={};I.absoluteValue=I.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};I.comparedTo=I.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};I.decimalPlaces=I.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Q;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};I.dividedBy=I.div=function(e){return Le(this,new this.constructor(e))};I.dividedToIntegerBy=I.idiv=function(e){var t=this,r=t.constructor;return V(Le(t,new r(e),0,1),r.precision)};I.equals=I.eq=function(e){return!this.cmp(e)};I.exponent=function(){return X(this)};I.greaterThan=I.gt=function(e){return this.cmp(e)>0};I.greaterThanOrEqualTo=I.gte=function(e){return this.cmp(e)>=0};I.isInteger=I.isint=function(){return this.e>this.d.length-2};I.isNegative=I.isneg=function(){return this.s<0};I.isPositive=I.ispos=function(){return this.s>0};I.isZero=function(){return this.s===0};I.lessThan=I.lt=function(e){return this.cmp(e)<0};I.lessThanOrEqualTo=I.lte=function(e){return this.cmp(e)<1};I.logarithm=I.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(ye))throw Error(be+"NaN");if(r.s<1)throw Error(be+(r.s?"NaN":"-Infinity"));return r.eq(ye)?new n(0):(W=!1,t=Le(Gt(r,o),Gt(e,o),o),W=!0,V(t,i))};I.minus=I.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Wo(t,e):Ho(t,(e.s=-e.s,e))};I.modulo=I.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(be+"NaN");return r.s?(W=!1,t=Le(r,e,0,1).times(e),W=!0,r.minus(t)):V(new n(r),i)};I.naturalExponential=I.exp=function(){return Go(this)};I.naturalLogarithm=I.ln=function(){return Gt(this)};I.negated=I.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};I.plus=I.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ho(t,e):Wo(t,(e.s=-e.s,e))};I.precision=I.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ye+e);if(t=X(i)+1,n=i.d.length-1,r=n*Q+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};I.squareRoot=I.sqrt=function(){var e,t,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(be+"NaN")}for(e=X(a),W=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=Re(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=dt((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(Le(a,o,s+2)).times(.5),Re(o.d).slice(0,s)===(t=Re(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(V(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return W=!0,V(n,r)};I.times=I.mul=function(e){var t,r,n,i,o,s,a,f,h,A=this,C=A.constructor,S=A.d,R=(e=new C(e)).d;if(!A.s||!e.s)return new C(0);for(e.s*=A.s,r=A.e+e.e,f=S.length,h=R.length,f=0;){for(t=0,i=f+n;i>n;)a=o[i]+R[n]*S[i-n-1]+t,o[i--]=a%te|0,t=a/te|0;o[i]=(o[i]+t)%te|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,W?V(e,C.precision):e};I.toDecimalPlaces=I.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Se(e,0,mt),t===void 0?t=n.rounding:Se(t,0,8),V(r,e+X(r)+1,t))};I.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ze(n,!0):(Se(e,0,mt),t===void 0?t=i.rounding:Se(t,0,8),n=V(new i(n),e+1,t),r=Ze(n,!0,e+1)),r};I.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Ze(i):(Se(e,0,mt),t===void 0?t=o.rounding:Se(t,0,8),n=V(new o(i),e+X(i)+1,t),r=Ze(n.abs(),!1,e+X(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};I.toInteger=I.toint=function(){var e=this,t=e.constructor;return V(new t(e),X(e)+1,t.rounding)};I.toNumber=function(){return+this};I.toPower=I.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,h=12,A=+(e=new f(e));if(!e.s)return new f(ye);if(a=new f(a),!a.s){if(e.s<1)throw Error(be+"Infinity");return a}if(a.eq(ye))return a;if(n=f.precision,e.eq(ye))return V(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=A<0?-A:A)<=Qo){for(i=new f(ye),t=Math.ceil(n/Q+4),W=!1;r%2&&(i=i.times(a),jo(i.d,t)),r=dt(r/2),r!==0;)a=a.times(a),jo(a.d,t);return W=!0,e.s<0?new f(ye).div(i):V(i,n)}}else if(o<0)throw Error(be+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,W=!1,i=e.times(Gt(a,n+h)),W=!0,i=Go(i),i.s=o,i};I.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=X(i),n=Ze(i,r<=o.toExpNeg||r>=o.toExpPos)):(Se(e,1,mt),t===void 0?t=o.rounding:Se(t,0,8),i=V(new o(i),e,t),r=X(i),n=Ze(i,e<=r||r<=o.toExpNeg,e)),n};I.toSignificantDigits=I.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Se(e,1,mt),t===void 0?t=n.rounding:Se(t,0,8)),V(new n(r),e,t)};I.toString=I.valueOf=I.val=I.toJSON=I[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=X(e),r=e.constructor;return Ze(e,t<=r.toExpNeg||t>=r.toExpPos)};Le=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%te|0,s=o/te|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,h,A,C,S,R,_,k,L,Ee,ue,q,pe,Ke,ai,xe,Gr,Wr=n.constructor,lu=n.s==i.s?1:-1,Ae=n.d,Y=i.d;if(!n.s)return new Wr(n);if(!i.s)throw Error(be+"Division by zero");for(f=n.e-i.e,xe=Y.length,Ke=Ae.length,R=new Wr(lu),_=R.d=[],h=0;Y[h]==(Ae[h]||0);)++h;if(Y[h]>(Ae[h]||0)&&--f,o==null?ue=o=Wr.precision:s?ue=o+(X(n)-X(i))+1:ue=o,ue<0)return new Wr(0);if(ue=ue/Q+2|0,h=0,xe==1)for(A=0,Y=Y[0],ue++;(h1&&(Y=e(Y,A),Ae=e(Ae,A),xe=Y.length,Ke=Ae.length),pe=xe,k=Ae.slice(0,xe),L=k.length;L=te/2&&++ai;do A=0,a=t(Y,k,xe,L),a<0?(Ee=k[0],xe!=L&&(Ee=Ee*te+(k[1]||0)),A=Ee/ai|0,A>1?(A>=te&&(A=te-1),C=e(Y,A),S=C.length,L=k.length,a=t(C,k,S,L),a==1&&(A--,r(C,xe{"use strict";Ko();v=class extends Yr{static isDecimal(t){return t instanceof Yr}static random(t=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new Yr(`0.${n.slice(0,t)}`)}}},ne=v});function ku(){return!1}function hi(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function Ou(){return hi()}function Du(){return[]}function _u(e){e(null,[])}function Mu(){return""}function Lu(){return""}function Nu(){}function Uu(){}function Fu(){}function $u(){}function Vu(){}function qu(){}function Bu(){}function ju(){}function Qu(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Hu(e,t){t(null,hi())}var Gu,Wu,ms,ds=ge(()=>{"use strict";c();u();p();m();d();l();Gu={},Wu={existsSync:ku,lstatSync:hi,stat:Hu,statSync:Ou,readdirSync:Du,readdir:_u,readlinkSync:Mu,realpathSync:Lu,chmodSync:Nu,renameSync:Uu,mkdirSync:Fu,rmdirSync:$u,rmSync:Vu,unlinkSync:qu,watchFile:Bu,unwatchFile:ju,watch:Qu,promises:Gu},ms=Wu});var fs=se(()=>{"use strict";c();u();p();m();d();l()});function Ju(...e){return e.join("/")}function Ku(...e){return e.join("/")}function zu(e){let t=gs(e),r=ys(e),[n,i]=t.split(".");return{root:"/",dir:r,base:t,ext:i,name:n}}function gs(e){let t=e.split("/");return t[t.length-1]}function ys(e){return e.split("/").slice(0,-1).join("/")}function Zu(e){let t=e.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of t)i===".."?r.pop():r.push(i);let n=r.join("/");return e.startsWith("/")?"/"+n:n}var hs,Yu,Xu,ep,tn,ws=ge(()=>{"use strict";c();u();p();m();d();l();hs="/",Yu=":";Xu={sep:hs},ep={basename:gs,delimiter:Yu,dirname:ys,join:Ku,normalize:Zu,parse:zu,posix:Xu,resolve:Ju,sep:hs},tn=ep});var bs=se((Vy,tp)=>{tp.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Ei={};pt(Ei,{Hash:()=>Kt,createHash:()=>Es,default:()=>yt,randomFillSync:()=>nn,randomUUID:()=>rn,webcrypto:()=>zt});function rn(){return globalThis.crypto.randomUUID()}function nn(e,t,r){return t!==void 0&&(r!==void 0?e=e.subarray(t,t+r):e=e.subarray(t)),globalThis.crypto.getRandomValues(e)}function Es(e){return new Kt(e)}var zt,Kt,yt,Xe=ge(()=>{"use strict";c();u();p();m();d();l();zt=globalThis.crypto;Kt=class{#e=[];#t;constructor(t){this.#t=t}update(t){this.#e.push(t)}async digest(){let t=new Uint8Array(this.#e.reduce((i,o)=>i+o.length,0)),r=0;for(let i of this.#e)t.set(i,r),r+=i.length;let n=await globalThis.crypto.subtle.digest(this.#t,t);return new Uint8Array(n)}},yt={webcrypto:zt,randomUUID:rn,randomFillSync:nn,createHash:Es,Hash:Kt}});var xi=se((Dh,op)=>{op.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var xs=se(on=>{"use strict";c();u();p();m();d();l();Object.defineProperty(on,"__esModule",{value:!0});on.enginesVersion=void 0;on.enginesVersion=xi().prisma.enginesVersion});var vs=se((Wh,Ts)=>{"use strict";c();u();p();m();d();l();Ts.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Rs=se((aw,Cs)=>{"use strict";c();u();p();m();d();l();Cs.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var vi=se((fw,Ss)=>{"use strict";c();u();p();m();d();l();var up=Rs();Ss.exports=e=>typeof e=="string"?e.replace(up(),""):e});var Is=se((Sw,ln)=>{"use strict";c();u();p();m();d();l();ln.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};ln.exports.default=ln.exports});var Si=se((IP,Ms)=>{"use strict";c();u();p();m();d();l();Ms.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";c();u();p();m();d();l()});var Vs=ge(()=>{"use strict";c();u();p();m();d();l()});var Rn,ua=ge(()=>{"use strict";c();u();p();m();d();l();Rn=class{events={};on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Zi=se(rt=>{"use strict";c();u();p();m();d();l();Object.defineProperty(rt,"__esModule",{value:!0});rt.anumber=Yi;rt.abytes=sl;rt.ahash=Hm;rt.aexists=Gm;rt.aoutput=Wm;function Yi(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Qm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function sl(e,...t){if(!Qm(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Hm(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Yi(e.outputLen),Yi(e.blockLen)}function Gm(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Wm(e,t){sl(e);let r=t.outputLen;if(e.length{"use strict";c();u();p();m();d();l();Object.defineProperty(D,"__esModule",{value:!0});D.add5L=D.add5H=D.add4H=D.add4L=D.add3H=D.add3L=D.rotlBL=D.rotlBH=D.rotlSL=D.rotlSH=D.rotr32L=D.rotr32H=D.rotrBL=D.rotrBH=D.rotrSL=D.rotrSH=D.shrSL=D.shrSH=D.toBig=void 0;D.fromBig=eo;D.split=al;D.add=xl;var Ln=BigInt(2**32-1),Xi=BigInt(32);function eo(e,t=!1){return t?{h:Number(e&Ln),l:Number(e>>Xi&Ln)}:{h:Number(e>>Xi&Ln)|0,l:Number(e&Ln)|0}}function al(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);D.toBig=ll;var cl=(e,t,r)=>e>>>r;D.shrSH=cl;var ul=(e,t,r)=>e<<32-r|t>>>r;D.shrSL=ul;var pl=(e,t,r)=>e>>>r|t<<32-r;D.rotrSH=pl;var ml=(e,t,r)=>e<<32-r|t>>>r;D.rotrSL=ml;var dl=(e,t,r)=>e<<64-r|t>>>r-32;D.rotrBH=dl;var fl=(e,t,r)=>e>>>r-32|t<<64-r;D.rotrBL=fl;var gl=(e,t)=>t;D.rotr32H=gl;var yl=(e,t)=>e;D.rotr32L=yl;var hl=(e,t,r)=>e<>>32-r;D.rotlSH=hl;var wl=(e,t,r)=>t<>>32-r;D.rotlSL=wl;var bl=(e,t,r)=>t<>>64-r;D.rotlBH=bl;var El=(e,t,r)=>e<>>64-r;D.rotlBL=El;function xl(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var Pl=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);D.add3L=Pl;var Tl=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;D.add3H=Tl;var vl=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);D.add4L=vl;var Al=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;D.add4H=Al;var Cl=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);D.add5L=Cl;var Rl=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;D.add5H=Rl;var Jm={fromBig:eo,split:al,toBig:ll,shrSH:cl,shrSL:ul,rotrSH:pl,rotrSL:ml,rotrBH:dl,rotrBL:fl,rotr32H:gl,rotr32L:yl,rotlSH:hl,rotlSL:wl,rotlBH:bl,rotlBL:El,add:xl,add3L:Pl,add3H:Tl,add4L:vl,add4H:Al,add5H:Rl,add5L:Cl};D.default=Jm});var Il=se(Nn=>{"use strict";c();u();p();m();d();l();Object.defineProperty(Nn,"__esModule",{value:!0});Nn.crypto=void 0;var He=(Xe(),$o(Ei));Nn.crypto=He&&typeof He=="object"&&"webcrypto"in He?He.webcrypto:He&&typeof He=="object"&&"randomBytes"in He?He:void 0});var Dl=se(U=>{"use strict";c();u();p();m();d();l();Object.defineProperty(U,"__esModule",{value:!0});U.Hash=U.nextTick=U.byteSwapIfBE=U.isLE=void 0;U.isBytes=Km;U.u8=zm;U.u32=Ym;U.createView=Zm;U.rotr=Xm;U.rotl=ed;U.byteSwap=no;U.byteSwap32=td;U.bytesToHex=nd;U.hexToBytes=id;U.asyncLoop=sd;U.utf8ToBytes=Ol;U.toBytes=Un;U.concatBytes=ad;U.checkOpts=ld;U.wrapConstructor=cd;U.wrapConstructorWithOpts=ud;U.wrapXOFConstructorWithOpts=pd;U.randomBytes=md;var _t=Il(),ro=Zi();function Km(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function zm(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function Ym(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Zm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Xm(e,t){return e<<32-t|e>>>t}function ed(e,t){return e<>>32-t>>>0}U.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function no(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}U.byteSwapIfBE=U.isLE?e=>e:e=>no(e);function td(e){for(let t=0;tt.toString(16).padStart(2,"0"));function nd(e){(0,ro.abytes)(e);let t="";for(let r=0;r=Ue._0&&e<=Ue._9)return e-Ue._0;if(e>=Ue.A&&e<=Ue.F)return e-(Ue.A-10);if(e>=Ue.a&&e<=Ue.f)return e-(Ue.a-10)}function id(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i{};U.nextTick=od;async function sd(e,t,r){let n=Date.now();for(let i=0;i=0&&oe().update(Un(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function ud(e){let t=(n,i)=>e(i).update(Un(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function pd(e){let t=(n,i)=>e(i).update(Un(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function md(e=32){if(_t.crypto&&typeof _t.crypto.getRandomValues=="function")return _t.crypto.getRandomValues(new Uint8Array(e));if(_t.crypto&&typeof _t.crypto.randomBytes=="function")return _t.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var Vl=se(G=>{"use strict";c();u();p();m();d();l();Object.defineProperty(G,"__esModule",{value:!0});G.shake256=G.shake128=G.keccak_512=G.keccak_384=G.keccak_256=G.keccak_224=G.sha3_512=G.sha3_384=G.sha3_256=G.sha3_224=G.Keccak=void 0;G.keccakP=Fl;var Mt=Zi(),Er=Sl(),Fe=Dl(),Ll=[],Nl=[],Ul=[],dd=BigInt(0),br=BigInt(1),fd=BigInt(2),gd=BigInt(7),yd=BigInt(256),hd=BigInt(113);for(let e=0,t=br,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Ll.push(2*(5*n+r)),Nl.push((e+1)*(e+2)/2%64);let i=dd;for(let o=0;o<7;o++)t=(t<>gd)*hd)%yd,t&fd&&(i^=br<<(br<r>32?(0,Er.rotlBH)(e,t,r):(0,Er.rotlSH)(e,t,r),Ml=(e,t,r)=>r>32?(0,Er.rotlBL)(e,t,r):(0,Er.rotlSL)(e,t,r);function Fl(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,f=(s+2)%10,h=r[f],A=r[f+1],C=_l(h,A,1)^r[a],S=Ml(h,A,1)^r[a+1];for(let R=0;R<50;R+=10)e[s+R]^=C,e[s+R+1]^=S}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=Nl[s],f=_l(i,o,a),h=Ml(i,o,a),A=Ll[s];i=e[A],o=e[A+1],e[A]=f,e[A+1]=h}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=wd[n],e[1]^=bd[n]}r.fill(0)}var xr=class e extends Fe.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Mt.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Fe.u32)(this.state)}keccak(){Fe.isLE||(0,Fe.byteSwap32)(this.state32),Fl(this.state32,this.rounds),Fe.isLE||(0,Fe.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Mt.aexists)(this);let{blockLen:r,state:n}=this;t=(0,Fe.toBytes)(t);let i=t.length;for(let o=0;o=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Mt.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Mt.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};G.Keccak=xr;var Ge=(e,t,r)=>(0,Fe.wrapConstructor)(()=>new xr(t,e,r));G.sha3_224=Ge(6,144,224/8);G.sha3_256=Ge(6,136,256/8);G.sha3_384=Ge(6,104,384/8);G.sha3_512=Ge(6,72,512/8);G.keccak_224=Ge(1,144,224/8);G.keccak_256=Ge(1,136,256/8);G.keccak_384=Ge(1,104,384/8);G.keccak_512=Ge(1,72,512/8);var $l=(e,t,r)=>(0,Fe.wrapXOFConstructorWithOpts)((n={})=>new xr(t,e,n.dkLen===void 0?r:n.dkLen,!0));G.shake128=$l(31,168,128/8);G.shake256=$l(31,136,256/8)});var Jl=se((fN,We)=>{"use strict";c();u();p();m();d();l();var{sha3_512:Ed}=Vl(),Bl=24,Pr=32,io=(e=4,t=Math.random)=>{let r="";for(;r.lengthjl(Ed(e)).toString(36).slice(1),ql=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),xd=e=>ql[Math.floor(e()*ql.length)],Hl=({globalObj:e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+io(Pr,t):io(Pr,t);return Ql(n).substring(0,Pr)},Gl=e=>()=>e++,Pd=476782367,Wl=({random:e=Math.random,counter:t=Gl(Math.floor(e()*Pd)),length:r=Bl,fingerprint:n=Hl({random:e})}={})=>function(){let o=xd(e),s=Date.now().toString(36),a=t().toString(36),f=io(r,e),h=`${s+f+a+n}`;return`${o+Ql(h).substring(1,r)}`},Td=Wl(),vd=(e,{minLength:t=2,maxLength:r=Pr}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};We.exports.getConstants=()=>({defaultLength:Bl,bigLength:Pr});We.exports.init=Wl;We.exports.createId=Td;We.exports.bufToBigInt=jl;We.exports.createCounter=Gl;We.exports.createFingerprint=Hl;We.exports.isCuid=vd});var Kl=se((xN,Tr)=>{"use strict";c();u();p();m();d();l();var{createId:Ad,init:Cd,getConstants:Rd,isCuid:Sd}=Jl();Tr.exports.createId=Ad;Tr.exports.init=Cd;Tr.exports.getConstants=Rd;Tr.exports.isCuid=Sd});var Df={};pt(Df,{DMMF:()=>rr,Debug:()=>K,Decimal:()=>ne,Extensions:()=>di,MetricsClient:()=>St,PrismaClientInitializationError:()=>F,PrismaClientKnownRequestError:()=>z,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>ae,PrismaClientValidationError:()=>ie,Public:()=>fi,Sql:()=>de,createParam:()=>ra,defineDmmfProperty:()=>la,deserializeJsonResponse:()=>qe,deserializeRawResult:()=>oi,dmmfToRuntimeDataModel:()=>_s,empty:()=>ma,getPrismaClient:()=>ou,getRuntime:()=>Dt,join:()=>pa,makeStrictEnum:()=>su,makeTypedQueryFactory:()=>ca,objectEnumValues:()=>hn,raw:()=>Ui,serializeJsonQuery:()=>vn,skip:()=>Tn,sqltag:()=>Fi,warnEnvConflicts:()=>void 0,warnOnce:()=>Xt});module.exports=$o(Df);c();u();p();m();d();l();var di={};pt(di,{defineExtension:()=>zo,getExtensionContext:()=>Yo});c();u();p();m();d();l();c();u();p();m();d();l();function zo(e){return typeof e=="function"?e:t=>t.$extends(e)}c();u();p();m();d();l();function Yo(e){return e}var fi={};pt(fi,{validator:()=>Zo});c();u();p();m();d();l();c();u();p();m();d();l();function Zo(...e){return t=>t}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var gi,Xo,es,ts,rs=!0;typeof g<"u"&&({FORCE_COLOR:gi,NODE_DISABLE_COLORS:Xo,NO_COLOR:es,TERM:ts}=g.env||{},rs=g.stdout&&g.stdout.isTTY);var Au={enabled:!Xo&&es==null&&ts!=="dumb"&&(gi!=null&&gi!=="0"||rs)};function B(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Au.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var kg=B(0,0),Zr=B(1,22),Xr=B(2,22),Og=B(3,23),en=B(4,24),Dg=B(7,27),_g=B(8,28),Mg=B(9,29),Lg=B(30,39),ft=B(31,39),ns=B(32,39),is=B(33,39),os=B(34,39),Ng=B(35,39),ss=B(36,39),Ug=B(37,39),as=B(90,39),Fg=B(90,39),$g=B(40,49),Vg=B(41,49),qg=B(42,49),Bg=B(43,49),jg=B(44,49),Qg=B(45,49),Hg=B(46,49),Gg=B(47,49);c();u();p();m();d();l();var Cu=100,ls=["green","yellow","blue","magenta","cyan","red"],Wt=[],cs=Date.now(),Ru=0,yi=typeof g<"u"?g.env:{};globalThis.DEBUG??=yi.DEBUG??"";globalThis.DEBUG_COLORS??=yi.DEBUG_COLORS?yi.DEBUG_COLORS==="true":!0;var Jt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Su(e){let t={color:ls[Ru++%ls.length],enabled:Jt.enabled(e),namespace:e,log:Jt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Wt.push([o,...n]),Wt.length>Cu&&Wt.shift(),Jt.enabled(o)||i){let f=n.map(A=>typeof A=="string"?A:Iu(A)),h=`+${Date.now()-cs}ms`;cs=Date.now(),a(o,...f,h)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var K=new Proxy(Su,{get:(e,t)=>Jt[t],set:(e,t,r)=>Jt[t]=r});function Iu(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function us(e=7500){let t=Wt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.lengthlp,info:()=>ap,log:()=>sp,query:()=>cp,should:()=>As,tags:()=>Yt,warn:()=>Ti});c();u();p();m();d();l();var Yt={error:ft("prisma:error"),warn:is("prisma:warn"),info:ss("prisma:info"),query:os("prisma:query")},As={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function sp(...e){console.log(...e)}function Ti(e,...t){As.warn()&&console.warn(`${Yt.warn} ${e}`,...t)}function ap(e,...t){console.info(`${Yt.info} ${e}`,...t)}function lp(e,...t){console.error(`${Yt.error} ${e}`,...t)}function cp(e,...t){console.log(`${Yt.query} ${e}`,...t)}c();u();p();m();d();l();function Pe(e,t){throw new Error(t)}c();u();p();m();d();l();function Ai(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();u();p();m();d();l();function ht(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}c();u();p();m();d();l();function Ci(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ks.has(e)||(ks.add(e),Ti(t,...r))};var F=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};O(F,"PrismaClientInitializationError");c();u();p();m();d();l();var z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};O(z,"PrismaClientKnownRequestError");c();u();p();m();d();l();var le=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};O(le,"PrismaClientRustPanicError");c();u();p();m();d();l();var ae=class extends Error{clientVersion;batchRequestIdx;constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};O(ae,"PrismaClientUnknownRequestError");c();u();p();m();d();l();var ie=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};O(ie,"PrismaClientValidationError");c();u();p();m();d();l();l();function qe(e){return e===null?e:Array.isArray(e)?e.map(qe):typeof e=="object"?pp(e)?mp(e):e.constructor!==null&&e.constructor.name!=="Object"?e:ht(e,qe):e}function pp(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function mp({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=y.from(t,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(t);case"Decimal":return new ne(t);case"Json":return JSON.parse(t);default:Pe(t,"Unknown tagged value")}}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Ie=class{_map=new Map;get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};c();u();p();m();d();l();function Be(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();u();p();m();d();l();function Ds(e,t){let r={};for(let n of e){let i=n[t];r[i]=n}return r}c();u();p();m();d();l();function er(e){let t;return{get(){return t||(t={value:e()}),t.value}}}c();u();p();m();d();l();function _s(e){return{models:Ri(e.models),enums:Ri(e.enums),types:Ri(e.types)}}function Ri(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}c();u();p();m();d();l();function wt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function cn(e){return e.toString()!=="Invalid Date"}c();u();p();m();d();l();l();function bt(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}c();u();p();m();d();l();c();u();p();m();d();l();var rr={};pt(rr,{ModelAction:()=>tr,datamodelEnumToSchemaEnum:()=>dp});c();u();p();m();d();l();c();u();p();m();d();l();function dp(e){return{name:e.name,values:e.values.map(t=>t.name)}}c();u();p();m();d();l();var tr=(q=>(q.findUnique="findUnique",q.findUniqueOrThrow="findUniqueOrThrow",q.findFirst="findFirst",q.findFirstOrThrow="findFirstOrThrow",q.findMany="findMany",q.create="create",q.createMany="createMany",q.createManyAndReturn="createManyAndReturn",q.update="update",q.updateMany="updateMany",q.updateManyAndReturn="updateManyAndReturn",q.upsert="upsert",q.delete="delete",q.deleteMany="deleteMany",q.groupBy="groupBy",q.count="count",q.aggregate="aggregate",q.findRaw="findRaw",q.aggregateRaw="aggregateRaw",q))(tr||{});var fp=Ce(vs());var gp={red:ft,gray:as,dim:Xr,bold:Zr,underline:en,highlightSource:e=>e.highlight()},yp={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function hp({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function wp({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)),t&&a.push(s.underline(bp(t))),i){a.push("");let h=[i.toString()];o&&(h.push(o),h.push(s.dim(")"))),a.push(h.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function bp(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function un(e){let t=e.showColors?gp:yp,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=hp(e),wp(r,t)}c();u();p();m();d();l();var Bs=Ce(Si());c();u();p();m();d();l();function Us(e,t,r){let n=Fs(e),i=Ep(n),o=Pp(i);o?pn(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Fs(e){return e.errors.flatMap(t=>t.kind==="Union"?Fs(t):[t])}function Ep(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:xp(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function xp(e,t){return[...new Set(e.concat(t))]}function Pp(e){return Ci(e,(t,r)=>{let n=Ls(t),i=Ls(r);return n!==i?n-i:Ns(t)-Ns(r)})}function Ls(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ns(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}c();u();p();m();d();l();var he=class{constructor(t,r){this.name=t;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};c();u();p();m();d();l();c();u();p();m();d();l();Vs();c();u();p();m();d();l();var Et=class{constructor(t=0,r){this.context=r;this.currentIndent=t}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};$s();c();u();p();m();d();l();c();u();p();m();d();l();var mn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};c();u();p();m();d();l();var dn=e=>e,fn={bold:dn,red:dn,green:dn,dim:dn,enabled:!1},qs={bold:Zr,red:ft,green:ns,dim:Xr,enabled:!0},xt={write(e){e.writeLine(",")}};c();u();p();m();d();l();var ke=class{constructor(t){this.contents=t}isUnderlined=!1;color=t=>t;underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};c();u();p();m();d();l();var je=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var Pt=class extends je{items=[];addItem(t){return this.items.push(new mn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new ke("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(xt,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Tt=class e extends je{fields={};suggestions=[];addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof e?a=o.value.getField(s):o.value instanceof Pt&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let o=n.value.getFieldValue(i);if(!o||!(o instanceof e))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new ke("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(xt,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};c();u();p();m();d();l();var re=class extends je{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ke(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};c();u();p();m();d();l();var nr=class{fields=[];addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(xt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function pn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Tp(e,t);break;case"IncludeOnScalar":vp(e,t);break;case"EmptySelection":Ap(e,t,r);break;case"UnknownSelectionField":Ip(e,t);break;case"InvalidSelectionValue":kp(e,t);break;case"UnknownArgument":Op(e,t);break;case"UnknownInputField":Dp(e,t);break;case"RequiredArgumentMissing":_p(e,t);break;case"InvalidArgumentType":Mp(e,t);break;case"InvalidArgumentValue":Lp(e,t);break;case"ValueTooLarge":Np(e,t);break;case"SomeFieldsMissing":Up(e,t);break;case"TooManyFieldsGiven":Fp(e,t);break;case"Union":Us(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Tp(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function vp(e,t){let[r,n]=vt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new he(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ir(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ap(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Cp(e,t,i);return}if(n.hasField("select")){Rp(e,t);return}}if(r?.[Be(e.outputType.name)]){Sp(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Cp(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new he(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Rp(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Hs(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ir(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Sp(e,t){let r=new nr;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new he("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=vt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Tt;f.addSuggestion(n),a.value=f}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ip(e,t){let r=Gs(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Hs(n,e.outputType);break;case"include":$p(n,e.outputType);break;case"omit":Vp(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(ir(n)),i.join(" ")})}function kp(e,t){let r=Gs(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Op(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),qp(n,e.arguments)),t.addErrorMessage(i=>js(i,r,e.arguments.map(o=>o.name)))}function Dp(e,t){let[r,n]=vt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ws(o,e.inputType)}t.addErrorMessage(o=>js(o,n,e.inputType.fields.map(s=>s.name)))}function js(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=jp(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(ir(e)),n.join(" ")}function _p(e,t){let r;t.addErrorMessage(f=>r?.value instanceof re&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=vt(e.argumentPath),s=new nr,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let f of e.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new he(o,s).makeRequired())}else{let f=e.inputTypes.map(Qs).join(" | ");a.addSuggestion(new he(o,f).makeRequired())}if(e.dependentArgumentPath){n.getDeepField(e.dependentArgumentPath)?.markAsError();let[,f]=vt(e.dependentArgumentPath);t.addErrorMessage(h=>`Argument \`${h.green(o)}\` is required because argument \`${h.green(f)}\` was provided.`)}}}function Qs(e){return e.kind==="list"?`${Qs(e.elementType)}[]`:e.name}function Mp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=gn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Lp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=gn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Np(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof re&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Up(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ws(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${gn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(ir(i)),o.join(" ")})}function Fp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${gn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Hs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new he(r.name,"true"))}function $p(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new he(r.name,"true"))}function Vp(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new he(r.name,"true"))}function qp(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new he(r.name,r.typeNames.join(" | ")))}function Gs(e,t){let[r,n]=vt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ws(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new he(r.name,r.typeNames.join(" | ")))}function vt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function ir({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function gn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Bp=3;function jp(e,t){let r=1/0,n;for(let i of t){let o=(0,Bs.default)(e,i);o>Bp||o`}};function At(e){return e instanceof or}c();u();p();m();d();l();var yn=Symbol(),ki=new WeakMap,Ne=class{constructor(t){t===yn?ki.set(this,`Prisma.${this._getName()}`):ki.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return ki.get(this)}},sr=class extends Ne{_getNamespace(){return"NullTypes"}},ar=class extends sr{#e};Oi(ar,"DbNull");var lr=class extends sr{#e};Oi(lr,"JsonNull");var cr=class extends sr{#e};Oi(cr,"AnyNull");var hn={classes:{DbNull:ar,JsonNull:lr,AnyNull:cr},instances:{DbNull:new ar(yn),JsonNull:new lr(yn),AnyNull:new cr(yn)}};function Oi(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();u();p();m();d();l();var Js=": ",wn=class{constructor(t,r){this.name=t;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Js.length}write(t){let r=new ke(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Js).write(this.value)}};var Di=class{arguments;errorMessages=[];constructor(t){this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function Ct(e){return new Di(Ks(e))}function Ks(e){let t=new Tt;for(let[r,n]of Object.entries(e)){let i=new wn(r,zs(n));t.addField(i)}return t}function zs(e){if(typeof e=="string")return new re(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new re(String(e));if(typeof e=="bigint")return new re(`${e}n`);if(e===null)return new re("null");if(e===void 0)return new re("undefined");if(bt(e))return new re(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new re(`Buffer.alloc(${e.byteLength})`):new re(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=cn(e)?e.toISOString():"Invalid Date";return new re(`new Date("${t}")`)}return e instanceof Ne?new re(`Prisma.${e._getName()}`):At(e)?new re(`prisma.${Be(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Qp(e):typeof e=="object"?Ks(e):new re(Object.prototype.toString.call(e))}function Qp(e){let t=new Pt;for(let r of e)t.addItem(zs(r));return t}function bn(e,t){let r=t==="pretty"?qs:fn,n=e.renderAllMessages(r),i=new Et(0,{colors:r}).write(e).toString();return{message:n,args:i}}function En({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ct(e);for(let C of t)pn(C,a,s);let{message:f,args:h}=bn(a,r),A=un({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:h});throw new ie(A,{clientVersion:o})}c();u();p();m();d();l();c();u();p();m();d();l();function Oe(e){return e.replace(/^./,t=>t.toLowerCase())}c();u();p();m();d();l();function Zs(e,t,r){let n=Oe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Hp({...e,...Ys(t.name,e,t.result.$allModels),...Ys(t.name,e,t.result[n])})}function Hp(e){let t=new Ie,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return ht(e,n=>({...n,needs:r(n.name,new Set)}))}function Ys(e,t,r){return r?ht(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Gp(t,o,i)})):{}}function Gp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Xs(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function ea(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var xn=class{constructor(t,r){this.extension=t;this.previous=r}computedFieldsCache=new Ie;modelExtensionsCache=new Ie;queryCallbacksCache=new Ie;clientExtensions=er(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=er(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t});getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Zs(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Oe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Rt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new xn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new xn(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};c();u();p();m();d();l();var Pn=class{constructor(t){this.name=t}};function ta(e){return e instanceof Pn}function ra(e){return new Pn(e)}c();u();p();m();d();l();c();u();p();m();d();l();var na=Symbol(),ur=class{constructor(t){if(t!==na)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Tn:t}},Tn=new ur(na);function De(e){return e instanceof ur}var Wp={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},ia="explicitly `undefined` values are not allowed";function vn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=Rt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:A}){let C=new _i({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:h,globalOmit:A});return{modelName:e,action:Wp[t],query:pr(r,C)}}function pr({select:e,include:t,...r}={},n){let i=r.omit;return delete r.omit,{arguments:sa(r,n),selection:Jp(e,t,i,n)}}function Jp(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Zp(e,n)):Kp(n,t,r)}function Kp(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&zp(n,t,e),Yp(n,r,e),n}function zp(e,t,r){for(let[n,i]of Object.entries(t)){if(De(i))continue;let o=r.nestSelection(n);if(Mi(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=pr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=pr(i,o)}}function Yp(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=ea(i,n);for(let[s,a]of Object.entries(o)){if(De(a))continue;Mi(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(e[s]=!a)}}function Zp(e,t){let r={},n=t.getComputedFields(),i=Xs(e,n);for(let[o,s]of Object.entries(i)){if(De(s))continue;let a=t.nestSelection(o);Mi(s,a);let f=t.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||De(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=pr({},a):r[o]=!0;continue}r[o]=pr(s,a)}}return r}function oa(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(wt(e)){if(cn(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(ta(e))return{$type:"Param",value:e.name};if(At(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Xp(e,t);if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{$type:"Bytes",value:y.from(r,n,i).toString("base64")}}if(em(e))return e.values;if(bt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ne){if(e!==hn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(tm(e))return e.toJSON();if(typeof e=="object")return sa(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function sa(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);De(i)||(i!==void 0?r[n]=oa(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:ia}))}return r}function Xp(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Be(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Pe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};c();u();p();m();d();l();function aa(e){if(!e._hasPreviewFlag("metrics"))throw new ie("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:e._clientVersion})}var St=class{_client;constructor(t){this._client=t}prometheus(t){return aa(this._client),this._client._engine.metrics({format:"prometheus",...t})}json(t){return aa(this._client),this._client._engine.metrics({format:"json",...t})}};c();u();p();m();d();l();function la(e,t){let r=er(()=>rm(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function rm(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Li(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();u();p();m();d();l();var Ni=new WeakMap,An="$$PrismaTypedSql",mr=class{constructor(t,r){Ni.set(this,{sql:t,values:r}),Object.defineProperty(this,An,{value:An})}get sql(){return Ni.get(this).sql}get values(){return Ni.get(this).values}};function ca(e){return(...t)=>new mr(e,t)}function Cn(e){return e!=null&&e[An]===An}c();u();p();m();d();l();var iu=Ce(xi());c();u();p();m();d();l();ua();ds();ws();c();u();p();m();d();l();var de=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}c();u();p();m();d();l();c();u();p();m();d();l();var Sn={enumerable:!0,configurable:!0,writable:!0};function In(e){let t=new Set(e);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>Sn,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var da=Symbol.for("nodejs.util.inspect.custom");function Te(e,t){let r=nm(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=fa(Reflect.ownKeys(o),r),a=fa(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...Sn,...f?.getPropertyDescriptor(s)}:Sn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[da]=function(){let o={...this};return delete o[da],o},i}function nm(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function fa(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();u();p();m();d();l();function It(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();u();p();m();d();l();function kt(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();u();p();m();d();l();function ga(e){if(e===void 0)return"";let t=Ct(e);return new Et(0,{colors:fn}).write(t).toString()}c();u();p();m();d();l();var im="P2037";function kn({error:e,user_facing_error:t},r,n){return t.error_code?new z(om(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ae(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function om(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===im&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var $i=class{getLocation(){return null}};function Qe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new $i}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var ya={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ot(e={}){let t=am(e);return Object.entries(t).reduce((n,[i,o])=>(ya[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function am(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function On(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ha(e,t){let r=On(e);return t({action:"aggregate",unpacker:r,argsMapper:Ot})(e)}c();u();p();m();d();l();function lm(e={}){let{select:t,...r}=e;return typeof t=="object"?Ot({...r,_count:t}):Ot({...r,_count:{_all:!0}})}function cm(e={}){return typeof e.select=="object"?t=>On(e)(t)._count:t=>On(e)(t)._count._all}function wa(e,t){return t({action:"count",unpacker:cm(e),argsMapper:lm})(e)}c();u();p();m();d();l();function um(e={}){let t=Ot(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function pm(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ba(e,t){return t({action:"groupBy",unpacker:pm(e),argsMapper:um})(e)}function Ea(e,t,r){if(t==="aggregate")return n=>ha(n,r);if(t==="count")return n=>wa(n,r);if(t==="groupBy")return n=>ba(n,r)}c();u();p();m();d();l();function xa(e,t){let r=t.fields.filter(i=>!i.relationName),n=Ds(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new or(e,o,s.type,s.isList,s.kind==="enum")},...In(Object.keys(n))})}c();u();p();m();d();l();c();u();p();m();d();l();var Pa=e=>Array.isArray(e)?e:e.split("."),Vi=(e,t)=>Pa(t).reduce((r,n)=>r&&r[n],e),Ta=(e,t,r)=>Pa(t).reduceRight((n,i,o,s)=>Object.assign({},Vi(e,s.slice(0,o)),{[i]:n}),r);function mm(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function dm(e,t,r){return t===void 0?e??{}:Ta(t,r,e||!0)}function qi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,h)=>({...f,[h.name]:h}),{});return f=>{let h=Qe(e._errorFormat),A=mm(n,i),C=dm(f,o,A),S=r({dataPath:A,callsite:h})(C),R=fm(e,t);return new Proxy(S,{get(_,k){if(!R.includes(k))return _[k];let Ee=[a[k].type,r,k],ue=[A,C];return qi(e,...Ee,...ue)},...In([...R,...Object.getOwnPropertyNames(S)])})}}function fm(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}var gm=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ym=["aggregate","count","groupBy"];function Bi(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[hm(e,t),bm(e,t),dr(r),ce("name",()=>t),ce("$name",()=>t),ce("$parent",()=>e._appliedParent)];return Te({},n)}function hm(e,t){let r=Oe(t),n=Object.keys(tr).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let h=Qe(e._errorFormat);return e._createPrismaPromise(A=>{let C={args:f,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:A,callsite:h};return e._request({...C,...a})},{action:o,args:f,model:t})};return gm.includes(o)?qi(e,t,s):wm(i)?Ea(e,i,s):s({})}}}function wm(e){return ym.includes(e)}function bm(e,t){return et(ce("fields",()=>{let r=e._runtimeDataModel.models[t];return xa(t,r)}))}c();u();p();m();d();l();function va(e){return e.replace(/^./,t=>t.toUpperCase())}var ji=Symbol();function fr(e){let t=[Em(e),xm(e),ce(ji,()=>e),ce("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(dr(r)),Te(e,t)}function Em(e){let t=Object.getPrototypeOf(e._originalClient),r=[...new Set(Object.getOwnPropertyNames(t))];return{getKeys(){return r},getPropertyValue(n){return e[n]}}}function xm(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Oe),n=[...new Set(t.concat(r))];return et({getKeys(){return n},getPropertyValue(i){let o=va(i);if(e._runtimeDataModel.models[o]!==void 0)return Bi(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Bi(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Aa(e){return e[ji]?e[ji]:e}function Ca(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return fr(t)}c();u();p();m();d();l();c();u();p();m();d();l();function Ra({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let h=f.needs.filter(A=>n[A]);h.length>0&&a.push(It(h))}else if(r){if(!r[f.name])continue;let h=f.needs.filter(A=>!r[A]);h.length>0&&a.push(It(h))}Pm(e,f.needs)&&s.push(Tm(f,Te(e,s)))}return s.length>0||a.length>0?Te(e,[...s,...a]):e}function Pm(e,t){return t.every(r=>Ai(e,r))}function Tm(e,t){return et(ce(e.name,()=>e.compute(t)))}c();u();p();m();d();l();function Dn({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sA.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let h=typeof s=="object"?s:{};t[o]=Dn({visitor:i,result:t[o],args:h,modelName:f.type,runtimeDataModel:n})}}function Ia({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Dn({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,f,h)=>{let A=Oe(f);return Ra({result:a,modelName:A,select:h.select,omit:h.select?void 0:{...o?.[A],...h.omit},extensions:n})}})}c();u();p();m();d();l();c();u();p();m();d();l();l();c();u();p();m();d();l();var vm=["$connect","$disconnect","$on","$transaction","$use","$extends"],ka=vm;function Oa(e){if(e instanceof de)return Am(e);if(Cn(e))return Cm(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Oa(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=Ua(o,f),a.args=s,_a(e,a,r,n+1)}})})}function Ma(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return _a(e,t,s)}function La(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Na(r,n,0,e):e(r)}}function Na(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let f=a.customDataProxyFetch;return a.customDataProxyFetch=Ua(i,f),Na(a,t,r+1,n)}})}var Da=e=>e;function Ua(e=Da,t=Da){return r=>e(t(r))}c();u();p();m();d();l();var Fa=K("prisma:client"),$a={Vercel:"vercel","Netlify CI":"netlify"};function Va({postinstall:e,ciName:t,clientVersion:r}){if(Fa("checkPlatformCaching:postinstall",e),Fa("checkPlatformCaching:ciName",t),e===!0&&t&&t in $a){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${$a[t]}-build`;throw console.error(n),new F(n,r)}}c();u();p();m();d();l();function qa(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}c();u();p();m();d();l();c();u();p();m();d();l();var Rm=()=>globalThis.process?.release?.name==="node",Sm=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,Im=()=>!!globalThis.Deno,km=()=>typeof globalThis.Netlify=="object",Om=()=>typeof globalThis.EdgeRuntime=="object",Dm=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function _m(){return[[km,"netlify"],[Om,"edge-light"],[Dm,"workerd"],[Im,"deno"],[Sm,"bun"],[Rm,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Mm={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Dt(){let e=_m();return{id:e,prettyName:Mm[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}c();u();p();m();d();l();c();u();p();m();d();l();var Qi=Ce(vi());c();u();p();m();d();l();function Ba(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}c();u();p();m();d();l();function ja(e){return e.split(` -`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}c();u();p();m();d();l();var Qa=Ce(Is());function Ha({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,Qa.default)({user:t,repo:r,template:n,title:e,body:i})}function Ga({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=us(6e3-(s?.length??0)),f=ja((0,Qi.default)(a)),h=n?`# Description -\`\`\` -${n} -\`\`\``:"",A=(0,Qi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${g.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${h} - -## Logs -\`\`\` -${f} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?Ba(s):""} -\`\`\` -`),C=Ha({title:r,body:A});return`${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${en(C)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();l();c();u();p();m();d();l();l();function H(e,t){throw new Error(t)}function Hi(e,t){return e===t||e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>Hi(e[r],t[r]))}function yr(e,t){let r=Object.keys(e),n=Object.keys(t);return(r.length{if(typeof e[o]==typeof t[o]&&typeof e[o]!="object")return e[o]===t[o];if(ne.isDecimal(e[o])||ne.isDecimal(t[o])){let s=Wa(e[o]),a=Wa(t[o]);return s&&a&&s.equals(a)}else if(e[o]instanceof Uint8Array||t[o]instanceof Uint8Array){let s=Ja(e[o]),a=Ja(t[o]);return s&&a&&s.equals(a)}else{if(e[o]instanceof Date||t[o]instanceof Date)return Ka(e[o])?.getTime()===Ka(t[o])?.getTime();if(typeof e[o]=="bigint"||typeof t[o]=="bigint")return za(e[o])===za(t[o]);if(typeof e[o]=="number"||typeof t[o]=="number")return Ya(e[o])===Ya(t[o])}return Hi(e[o],t[o])})}function Wa(e){return ne.isDecimal(e)?e:typeof e=="number"||typeof e=="string"?new ne(e):void 0}function Ja(e){return y.isBuffer(e)?e:e instanceof Uint8Array?y.from(e.buffer,e.byteOffset,e.byteLength):typeof e=="string"?y.from(e,"base64"):void 0}function Ka(e){return e instanceof Date?e:typeof e=="string"||typeof e=="number"?new Date(e):void 0}function za(e){return typeof e=="bigint"?e:typeof e=="number"||typeof e=="string"?BigInt(e):void 0}function Ya(e){return typeof e=="number"?e:typeof e=="string"?Number(e):void 0}function hr(e){return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r instanceof Uint8Array?y.from(r).toString("base64"):r)}var J=class extends Error{name="DataMapperError"};function el(e,t,r){switch(t.type){case"AffectedRows":if(typeof e!="number")throw new J(`Expected an affected rows count, got: ${typeof e} (${e})`);return{count:e};case"Object":return Gi(e,t.fields,r);case"Value":return Wi(e,"",t.resultType,r);default:H(t,`Invalid data mapping type: '${t.type}'`)}}function Gi(e,t,r){if(e===null)return null;if(Array.isArray(e))return e.map(i=>Za(i,t,r));if(typeof e=="object")return Za(e,t,r);if(typeof e=="string"){let n;try{n=JSON.parse(e)}catch(i){throw new J("Expected an array or object, got a string that is not valid JSON",{cause:i})}return Gi(n,t,r)}throw new J(`Expected an array or an object, got: ${typeof e}`)}function Za(e,t,r){if(typeof e!="object")throw new J(`Expected an object, but got '${typeof e}'`);let n={};for(let[i,o]of Object.entries(t))switch(o.type){case"AffectedRows":throw new J(`Unexpected 'AffectedRows' node in data mapping for field '${i}'`);case"Object":{if(o.serializedName!==null&&!Object.hasOwn(e,o.serializedName))throw new J(`Missing data field (Object): '${i}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`);let s=o.serializedName!==null?e[o.serializedName]:e;n[i]=Gi(s,o.fields,r);break}case"Value":{let s=o.dbName;if(Object.hasOwn(e,s))n[i]=Wi(e[s],s,o.resultType,r);else throw new J(`Missing data field (Value): '${s}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`)}break;default:H(o,`DataMapper: Invalid data mapping node type: '${o.type}'`)}return n}function Wi(e,t,r,n){if(e===null)return r.type==="Array"?[]:null;switch(r.type){case"Any":return e;case"String":{if(typeof e!="string")throw new J(`Expected a string in column '${t}', got ${typeof e}: ${e}`);return e}case"Int":switch(typeof e){case"number":return Math.trunc(e);case"string":{let i=Math.trunc(Number(e));if(Number.isNaN(i)||!Number.isFinite(i))throw new J(`Expected an integer in column '${t}', got string: ${e}`);if(!Number.isSafeInteger(i))throw new J(`Integer value in column '${t}' is too large to represent as a JavaScript number without loss of precision, got: ${e}. Consider using BigInt type.`);return i}default:throw new J(`Expected an integer in column '${t}', got ${typeof e}: ${e}`)}case"BigInt":{if(typeof e!="number"&&typeof e!="string")throw new J(`Expected a bigint in column '${t}', got ${typeof e}: ${e}`);return{$type:"BigInt",value:e}}case"Float":{if(typeof e=="number")return e;if(typeof e=="string"){let i=Number(e);if(Number.isNaN(i)&&!/^[-+]?nan$/.test(e.toLowerCase()))throw new J(`Expected a float in column '${t}', got string: ${e}`);return i}throw new J(`Expected a float in column '${t}', got ${typeof e}: ${e}`)}case"Boolean":{if(typeof e=="boolean")return e;if(typeof e=="number")return e===1;if(typeof e=="string"){if(e==="true"||e==="TRUE"||e==="1")return!0;if(e==="false"||e==="FALSE"||e==="0")return!1;throw new J(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}if(e instanceof Uint8Array){for(let i of e)if(i!==0)return!0;return!1}throw new J(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`)}case"Decimal":if(typeof e!="number"&&typeof e!="string"&&!ne.isDecimal(e))throw new J(`Expected a decimal in column '${t}', got ${typeof e}: ${e}`);return{$type:"Decimal",value:e};case"Date":{if(typeof e=="string")return{$type:"DateTime",value:Xa(e)};if(typeof e=="number"||e instanceof Date)return{$type:"DateTime",value:e};throw new J(`Expected a date in column '${t}', got ${typeof e}: ${e}`)}case"Time":{if(typeof e=="string")return{$type:"DateTime",value:`1970-01-01T${Xa(e)}`};throw new J(`Expected a time in column '${t}', got ${typeof e}: ${e}`)}case"Array":return e.map((o,s)=>Wi(o,`${t}[${s}]`,r.inner,n));case"Object":return{$type:"Json",value:typeof e=="string"?e:hr(e)};case"Bytes":{if(typeof e=="string"&&e.startsWith("\\x"))return{$type:"Bytes",value:y.from(e.slice(2),"hex").toString("base64")};if(Array.isArray(e))return{$type:"Bytes",value:y.from(e).toString("base64")};if(e instanceof Uint8Array)return{$type:"Bytes",value:y.from(e).toString("base64")};throw new J(`Expected a byte array in column '${t}', got ${typeof e}: ${e}`)}case"Enum":{let i=n[r.inner];if(i===void 0)throw new J(`Unknown enum '${r.inner}'`);let o=i[`${e}`];if(o===void 0)throw new J(`Unknown enum value '${e}' for enum '${r.inner}'`);return o}default:H(r,`DataMapper: Unknown result type: ${r.type}`)}}var Lm=/Z$|(?{let o=new Date,s=b.now(),a=await i(),f=b.now();return n?.({timestamp:o,duration:f-s,query:e.sql,params:e.args}),a})}c();u();p();m();d();l();var _e=class extends Error{name="UserFacingError";code;meta;constructor(t,r,n){super(t),this.code=r,this.meta=n??{}}toQueryResponseErrorObject(){return{error:this.message,user_facing_error:{is_panic:!1,message:this.message,meta:this.meta,error_code:this.code}}}};function tl(e){if(!bi(e))throw e;let t=Um(e),r=Fm(e);throw!t||!r?e:new _e(r,t,{driverAdapterError:e})}function Um(e){switch(e.cause.kind){case"AuthenticationFailed":return"P1000";case"DatabaseNotReachable":return"P1001";case"DatabaseDoesNotExist":return"P1003";case"SocketTimeout":return"P1008";case"DatabaseAlreadyExists":return"P1009";case"DatabaseAccessDenied":return"P1010";case"TlsConnectionError":return"P1011";case"ConnectionClosed":return"P1017";case"TransactionAlreadyClosed":return"P1018";case"LengthMismatch":return"P2000";case"UniqueConstraintViolation":return"P2002";case"ForeignKeyConstraintViolation":return"P2003";case"UnsupportedNativeDataType":return"P2010";case"NullConstraintViolation":return"P2011";case"ValueOutOfRange":return"P2020";case"TableDoesNotExist":return"P2021";case"ColumnNotFound":return"P2022";case"InvalidIsolationLevel":case"InconsistentColumnData":return"P2023";case"MissingFullTextSearchIndex":return"P2030";case"TransactionWriteConflict":return"P2034";case"GenericJs":return"P2036";case"TooManyConnections":return"P2037";case"postgres":case"sqlite":case"mysql":case"mssql":return;default:H(e.cause,`Unknown error: ${e.cause}`)}}function Fm(e){switch(e.cause.kind){case"AuthenticationFailed":return`Authentication failed against the database server, the provided database credentials for \`${e.cause.user??"(not available)"}\` are not valid`;case"DatabaseNotReachable":{let t=e.cause.host&&e.cause.port?`${e.cause.host}:${e.cause.port}`:e.cause.host;return`Can't reach database server${t?` at ${t}`:""}`}case"DatabaseDoesNotExist":return`Database \`${e.cause.db??"(not available)"}\` does not exist on the database server`;case"SocketTimeout":return"Operation has timed out";case"DatabaseAlreadyExists":return`Database \`${e.cause.db??"(not available)"}\` already exists on the database server`;case"DatabaseAccessDenied":return`User was denied access on the database \`${e.cause.db??"(not available)"}\``;case"TlsConnectionError":return`Error opening a TLS connection: ${e.cause.reason}`;case"ConnectionClosed":return"Server has closed the connection.";case"TransactionAlreadyClosed":return e.cause.cause;case"LengthMismatch":return`The provided value for the column is too long for the column's type. Column: ${e.cause.column??"(not available)"}`;case"UniqueConstraintViolation":return`Unique constraint failed on the ${Ji(e.cause.constraint)}`;case"ForeignKeyConstraintViolation":return`Foreign key constraint violated on the ${Ji(e.cause.constraint)}`;case"UnsupportedNativeDataType":return`Failed to deserialize column of type '${e.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`;case"NullConstraintViolation":return`Null constraint violation on the ${Ji(e.cause.constraint)}`;case"ValueOutOfRange":return`Value out of range for the type: ${e.cause.cause}`;case"TableDoesNotExist":return`The table \`${e.cause.table??"(not available)"}\` does not exist in the current database.`;case"ColumnNotFound":return`The column \`${e.cause.column??"(not available)"}\` does not exist in the current database.`;case"InvalidIsolationLevel":return`Invalid isolation level \`${e.cause.level}\``;case"InconsistentColumnData":return`Inconsistent column data: ${e.cause.cause}`;case"MissingFullTextSearchIndex":return"Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema";case"TransactionWriteConflict":return"Transaction failed due to a write conflict or a deadlock. Please retry your transaction";case"GenericJs":return`Error in external connector (id ${e.cause.id})`;case"TooManyConnections":return`Too many database connections opened: ${e.cause.cause}`;case"sqlite":case"postgres":case"mysql":case"mssql":return;default:H(e.cause,`Unknown error: ${e.cause}`)}}function Ji(e){return e&&"fields"in e?`fields: (${e.fields.map(t=>`\`${t}\``).join(", ")})`:e&&"index"in e?`constraint: \`${e.index}\``:e&&"foreignKey"in e?"foreign key":"(not available)"}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();function tt(e,t){var r="000000000"+e;return r.substr(r.length-t)}var rl=Ce(fs(),1);function $m(){try{return rl.default.hostname()}catch{return g.env._CLUSTER_NETWORK_NAME_||g.env.COMPUTERNAME||"hostname"}}var nl=2,Vm=tt(g.pid.toString(36),nl),il=$m(),qm=il.length,Bm=tt(il.split("").reduce(function(e,t){return+e+t.charCodeAt(0)},+qm+36).toString(36),nl);function Ki(){return Vm+Bm}c();u();p();m();d();l();c();u();p();m();d();l();function Mn(e){return typeof e=="string"&&/^c[a-z0-9]{20,32}$/.test(e)}function zi(e){let n=Math.pow(36,4),i=0;function o(){return tt((Math.random()*n<<0).toString(36),4)}function s(){return i=int.length&&(zt.getRandomValues(nt),Lt=0),Lt+=e}function oo(e=21){kd(e|=0);let t="";for(let r=Lt-e;r{let n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};if(typeof r?.randomBytes=="function")return()=>r.randomBytes(1).readUInt8()/255;if(yt?.randomBytes)return()=>yt.randomBytes(1).readUInt8()/255;throw new ot(it.PRNGDetectFailure,"Failed to find a reliable PRNG")}function Md(){return Ud()?self:typeof window<"u"?window:typeof globalThis<"u"||typeof globalThis<"u"?globalThis:null}function Ld(e,t){let r="";for(;e>0;e--)r=Dd(t)+r;return r}function Nd(e,t=Xl){if(isNaN(e))throw new ot(it.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>Yl)throw new ot(it.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Yl}: ${e}`);if(e<0)throw new ot(it.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new ot(it.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let r,n="";for(let i=t;i>0;i--)r=e%vr,n=Zl.charAt(r)+n,e=(e-r)/vr;return n}function Ud(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function ec(e,t){let r=t||_d(),n=!e||isNaN(e)?Date.now():e;return Nd(n,Xl)+Ld(Od,r)}c();u();p();m();d();l();c();u();p();m();d();l();var oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function Fn(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}c();u();p();m();d();l();Xe();var Vn=new Uint8Array(256),$n=Vn.length;function Nt(){return $n>Vn.length-16&&(nn(Vn),$n=0),Vn.slice($n,$n+=16)}c();u();p();m();d();l();c();u();p();m();d();l();Xe();var so={randomUUID:rn};function Fd(e,t,r){if(so.randomUUID&&!t&&!e)return so.randomUUID();e=e||{};let n=e.random??e.rng?.()??Nt();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return Fn(n)}var ao=Fd;c();u();p();m();d();l();var lo={};function $d(e,t,r){let n;if(e)n=tc(e.random??e.rng?.()??Nt(),e.msecs,e.seq,t,r);else{let i=Date.now(),o=Nt();Vd(lo,i,o),n=tc(o,lo.msecs,lo.seq,t,r)}return t??Fn(n)}function Vd(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function tc(e,t,r,n,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),r??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],n[i++]=t/1099511627776&255,n[i++]=t/4294967296&255,n[i++]=t/16777216&255,n[i++]=t/65536&255,n[i++]=t/256&255,n[i++]=t&255,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|e[10]&3,n[i++]=e[11],n[i++]=e[12],n[i++]=e[13],n[i++]=e[14],n[i++]=e[15],n}var co=$d;var qn=class{#e={};constructor(){this.register("uuid",new mo),this.register("cuid",new fo),this.register("ulid",new go),this.register("nanoid",new yo),this.register("product",new ho)}snapshot(t){return Object.create(this.#e,{now:{value:t==="mysql"?new po:new uo}})}register(t,r){this.#e[t]=r}},uo=class{#e=new Date;generate(){return this.#e.toISOString()}},po=class{#e=new Date;generate(){return this.#e.toISOString().replace("T"," ").replace("Z","")}},mo=class{generate(t){if(t===4)return ao();if(t===7)return co();throw new Error("Invalid UUID generator arguments")}},fo=class{generate(t){if(t===1)return ol();if(t===2)return(0,rc.createId)();throw new Error("Invalid CUID generator arguments")}},go=class{generate(){return ec()}},yo=class{generate(t){if(typeof t=="number")return oo(t);if(t===void 0)return oo();throw new Error("Invalid Nanoid generator arguments")}},ho=class{generate(t,r){if(t===void 0||r===void 0)throw new Error("Invalid Product generator arguments");return Array.isArray(t)&&Array.isArray(r)?t.flatMap(n=>r.map(i=>[n,i])):Array.isArray(t)?t.map(n=>[n,r]):Array.isArray(r)?r.map(n=>[t,n]):[[t,r]]}};c();u();p();m();d();l();c();u();p();m();d();l();function wo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="param"}function bo(e){return typeof e=="object"&&e!==null&&e.prisma__type==="generatorCall"}function nc(e){return typeof e=="object"&&e!==null&&e.prisma__type==="bytes"}function ic(e){return typeof e=="object"&&e!==null&&e.prisma__type==="bigint"}function xo(e,t,r){let n=e.type;switch(n){case"rawSql":return sc(e.sql,oc(e.params,t,r));case"templateSql":return qd(e.fragments,e.placeholderFormat,oc(e.params,t,r));default:H(n,"Invalid query type")}}function oc(e,t,r){return e.map(n=>ve(n,t,r))}function ve(e,t,r){let n=e;for(;jd(n);)if(wo(n)){let i=t[n.prisma__value.name];if(i===void 0)throw new Error(`Missing value for query variable ${n.prisma__value.name}`);n=i}else if(bo(n)){let{name:i,args:o}=n.prisma__value,s=r[i];if(!s)throw new Error(`Encountered an unknown generator '${i}'`);n=s.generate(...o.map(a=>ve(a,t,r)))}else H(n,`Unexpected unevaluated value type: ${n}`);return Array.isArray(n)?n=n.map(i=>ve(i,t,r)):nc(n)?n=y.from(n.prisma__value,"base64"):ic(n)&&(n=BigInt(n.prisma__value)),n}function qd(e,t,r){let n=0,i=1,o=[],s=e.map(a=>{let f=a.type;switch(f){case"parameter":if(n>=r.length)throw new Error(`Malformed query template. Fragments attempt to read over ${r.length} parameters.`);return o.push(r[n++]),Eo(t,i++);case"stringChunk":return a.chunk;case"parameterTuple":{if(n>=r.length)throw new Error(`Malformed query template. Fragments attempt to read over ${r.length} parameters.`);let h=r[n++],A=Array.isArray(h)?h:[h];return`(${A.length==0?"NULL":A.map(S=>(o.push(S),Eo(t,i++))).join(",")})`}case"parameterTupleList":{if(n>=r.length)throw new Error(`Malformed query template. Fragments attempt to read over ${r.length} parameters.`);let h=r[n++];if(!Array.isArray(h))throw new Error("Malformed query template. Tuple list expected.");if(h.length===0)throw new Error("Malformed query template. Tuple list cannot be empty.");return h.map(C=>{if(!Array.isArray(C))throw new Error("Malformed query template. Tuple expected.");let S=C.map(R=>(o.push(R),Eo(t,i++))).join(a.itemSeparator);return`${a.itemPrefix}${S}${a.itemSuffix}`}).join(a.groupSeparator)}default:H(f,"Invalid fragment type")}}).join("");return sc(s,o)}function Eo(e,t){return e.hasNumbering?`${e.prefix}${t}`:e.prefix}function sc(e,t){let r=t.map(n=>Bd(n));return{sql:e,args:t,argTypes:r}}function Bd(e){return typeof e=="string"?"Text":typeof e=="number"?"Numeric":typeof e=="boolean"?"Boolean":Array.isArray(e)?"Array":y.isBuffer(e)?"Bytes":"Unknown"}function jd(e){return wo(e)||bo(e)}c();u();p();m();d();l();function lc(e){let t=e.columnTypes.map(r=>{switch(r){case M.Bytes:return n=>Array.isArray(n)?new Uint8Array(n):n;default:return n=>n}});return e.rows.map(r=>r.map((n,i)=>t[i](n)).reduce((n,i,o)=>{let s=e.columnNames[o].split("."),a=n;for(let f=0;fac(n)).map(n=>{switch(n){case"bytes":return i=>Array.isArray(i)?new Uint8Array(i):i;case"int":return i=>i===null?null:typeof i=="number"?i:parseInt(`${i}`,10);case"bigint":return i=>i===null?null:typeof i=="bigint"?i:BigInt(`${i}`);case"json":return i=>typeof i=="string"?JSON.parse(i):i;case"bool":return i=>typeof i=="string"?i==="true"||i==="1":typeof i=="number"?i===1:i;default:return i=>i}});return{columns:e.columnNames,types:e.columnTypes.map(n=>ac(n)),rows:e.rows.map(n=>n.map((i,o)=>r[o](i)))}}function ac(e){switch(e){case M.Int32:return"int";case M.Int64:return"bigint";case M.Float:return"float";case M.Double:return"double";case M.Text:return"string";case M.Enum:return"enum";case M.Bytes:return"bytes";case M.Boolean:return"bool";case M.Character:return"char";case M.Numeric:return"decimal";case M.Json:return"json";case M.Uuid:return"uuid";case M.DateTime:return"datetime";case M.Date:return"date";case M.Time:return"time";case M.Int32Array:return"int-array";case M.Int64Array:return"bigint-array";case M.FloatArray:return"float-array";case M.DoubleArray:return"double-array";case M.TextArray:return"string-array";case M.EnumArray:return"string-array";case M.BytesArray:return"bytes-array";case M.BooleanArray:return"bool-array";case M.CharacterArray:return"char-array";case M.NumericArray:return"decimal-array";case M.JsonArray:return"json-array";case M.UuidArray:return"uuid-array";case M.DateTimeArray:return"datetime-array";case M.DateArray:return"date-array";case M.TimeArray:return"time-array";case M.UnknownNumber:return"unknown";case M.Set:return"string";default:H(e,`Unexpected column type: ${e}`)}}c();u();p();m();d();l();function uc(e,t,r){if(!t.every(n=>Po(e,n))){let n=Qd(e,r),i=Hd(r);throw new _e(n,i,r.context)}}function Po(e,t){switch(t.type){case"rowCountEq":return Array.isArray(e)?e.length===t.args:e===null?t.args===0:t.args===1;case"rowCountNeq":return Array.isArray(e)?e.length!==t.args:e===null?t.args!==0:t.args!==1;case"affectedRowCountEq":return e===t.args;case"never":return!1;default:H(t,`Unknown rule type: ${t.type}`)}}function Qd(e,t){switch(t.error_identifier){case"RELATION_VIOLATION":return`The change you are trying to make would violate the required relation '${t.context.relation}' between the \`${t.context.modelA}\` and \`${t.context.modelB}\` models.`;case"MISSING_RECORD":return`An operation failed because it depends on one or more records that were required but not found. No record was found for ${t.context.operation}.`;case"MISSING_RELATED_RECORD":{let r=t.context.neededFor?` (needed to ${t.context.neededFor})`:"";return`An operation failed because it depends on one or more records that were required but not found. No '${t.context.model}' record${r} was found for ${t.context.operation} on ${t.context.relationType} relation '${t.context.relation}'.`}case"INCOMPLETE_CONNECT_INPUT":return`An operation failed because it depends on one or more records that were required but not found. Expected ${t.context.expectedRows} records to be connected, found only ${Array.isArray(e)?e.length:e}.`;case"INCOMPLETE_CONNECT_OUTPUT":return`The required connected records were not found. Expected ${t.context.expectedRows} records to be connected after connect operation on ${t.context.relationType} relation '${t.context.relation}', found ${Array.isArray(e)?e.length:e}.`;case"RECORDS_NOT_CONNECTED":return`The records for relation \`${t.context.relation}\` between the \`${t.context.parent}\` and \`${t.context.child}\` models are not connected.`;default:H(t,`Unknown error identifier: ${t}`)}}function Hd(e){switch(e.error_identifier){case"RELATION_VIOLATION":return"P2014";case"RECORDS_NOT_CONNECTED":return"P2017";case"INCOMPLETE_CONNECT_OUTPUT":return"P2018";case"MISSING_RECORD":case"MISSING_RELATED_RECORD":case"INCOMPLETE_CONNECT_INPUT":return"P2025";default:H(e,`Unknown error identifier: ${e}`)}}var Cr=class e{#e;#t;#r;#n=new qn;#o;#i;#s;#a;constructor({transactionManager:t,placeholderValues:r,onQuery:n,tracingHelper:i,serializer:o,rawSerializer:s,provider:a}){this.#e=t,this.#t=r,this.#r=n,this.#o=i,this.#i=o,this.#s=s??o,this.#a=a}static forSql(t){return new e({transactionManager:t.transactionManager,placeholderValues:t.placeholderValues,onQuery:t.onQuery,tracingHelper:t.tracingHelper,serializer:lc,rawSerializer:cc,provider:t.provider})}async run(t,r){let{value:n}=await this.interpretNode(t,r,this.#t,this.#n.snapshot(r.provider)).catch(i=>tl(i));return n}async interpretNode(t,r,n,i){switch(t.type){case"value":return{value:ve(t.args,n,i)};case"seq":{let o;for(let s of t.args)o=await this.interpretNode(s,r,n,i);return o??{value:void 0}}case"get":return{value:n[t.args.name]};case"let":{let o=Object.create(n);for(let s of t.args.bindings){let{value:a}=await this.interpretNode(s.expr,r,o,i);o[s.name]=a}return this.interpretNode(t.args.expr,r,o,i)}case"getFirstNonEmpty":{for(let o of t.args.names){let s=n[o];if(!pc(s))return{value:s}}return{value:[]}}case"concat":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>s.concat(Ar(a)),[]):[]}}case"sum":{let o=await Promise.all(t.args.map(s=>this.interpretNode(s,r,n,i).then(a=>a.value)));return{value:o.length>0?o.reduce((s,a)=>Me(s)+Me(a)):0}}case"execute":{let o=xo(t.args,n,i);return this.#l(o,r,async()=>({value:await r.executeRaw(o)}))}case"query":{let o=xo(t.args,n,i);return this.#l(o,r,async()=>{let s=await r.queryRaw(o);return t.args.type==="rawSql"?{value:this.#s(s),lastInsertId:s.lastInsertId}:{value:this.#i(s),lastInsertId:s.lastInsertId}})}case"reverse":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);return{value:Array.isArray(o)?o.reverse():o,lastInsertId:s}}case"unique":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(!Array.isArray(o))return{value:o,lastInsertId:s};if(o.length>1)throw new Error(`Expected zero or one element, got ${o.length}`);return{value:o[0]??null,lastInsertId:s}}case"required":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args,r,n,i);if(pc(o))throw new Error("Required value is empty");return{value:o,lastInsertId:s}}case"mapField":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.records,r,n,i);return{value:dc(o,t.args.field),lastInsertId:s}}case"join":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.parent,r,n,i);if(o===null)return{value:null,lastInsertId:s};let a=await Promise.all(t.args.children.map(async f=>({joinExpr:f,childRecords:(await this.interpretNode(f.child,r,n,i)).value})));return{value:Gd(o,a),lastInsertId:s}}case"transaction":{if(!this.#e.enabled)return this.interpretNode(t.args,r,n,i);let o=this.#e.manager,s=await o.startTransaction(),a=o.getTransaction(s,"query");try{let f=await this.interpretNode(t.args,a,n,i);return await o.commitTransaction(s.id),f}catch(f){throw await o.rollbackTransaction(s.id),f}}case"dataMap":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return{value:el(o,t.args.structure,t.args.enums),lastInsertId:s}}case"validate":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i);return uc(o,t.args.rules,t.args),{value:o,lastInsertId:s}}case"if":{let{value:o}=await this.interpretNode(t.args.value,r,n,i);return Po(o,t.args.rule)?await this.interpretNode(t.args.then,r,n,i):await this.interpretNode(t.args.else,r,n,i)}case"unit":return{value:void 0};case"diff":{let{value:o}=await this.interpretNode(t.args.from,r,n,i),{value:s}=await this.interpretNode(t.args.to,r,n,i),a=new Set(Ar(s));return{value:Ar(o).filter(f=>!a.has(f))}}case"distinctBy":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=new Set,f=[];for(let h of Ar(o)){let A=Bn(h,t.args.fields);a.has(A)||(a.add(A),f.push(h))}return{value:f,lastInsertId:s}}case"paginate":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=Ar(o),f=t.args.pagination.linkingFields;if(f!==null){let h=new Map;for(let C of a){let S=Bn(C,f);h.has(S)||h.set(S,[]),h.get(S).push(C)}let A=Array.from(h.entries());return A.sort(([C],[S])=>CS?1:0),{value:A.flatMap(([,C])=>mc(C,t.args.pagination)),lastInsertId:s}}return{value:mc(a,t.args.pagination),lastInsertId:s}}case"initializeRecord":{let{lastInsertId:o}=await this.interpretNode(t.args.expr,r,n,i),s={};for(let[a,f]of Object.entries(t.args.fields))s[a]=Wd(f,o,n,i);return{value:s,lastInsertId:o}}case"mapRecord":{let{value:o,lastInsertId:s}=await this.interpretNode(t.args.expr,r,n,i),a=o===null?{}:To(o);for(let[f,h]of Object.entries(t.args.fields))a[f]=Jd(h,a[f],n,i);return{value:a,lastInsertId:s}}default:H(t,`Unexpected node type: ${t.type}`)}}#l(t,r,n){return _n({query:t,execute:n,provider:this.#a??r.provider,tracingHelper:this.#o,onQuery:this.#r})}};function pc(e){return Array.isArray(e)?e.length===0:e==null}function Ar(e){return Array.isArray(e)?e:[e]}function Me(e){if(typeof e=="number")return e;if(typeof e=="string")return Number(e);throw new Error(`Expected number, got ${typeof e}`)}function To(e){if(typeof e=="object"&&e!==null)return e;throw new Error(`Expected object, got ${typeof e}`)}function dc(e,t){return Array.isArray(e)?e.map(r=>dc(r,t)):typeof e=="object"&&e!==null?e[t]??null:e}function Gd(e,t){for(let{joinExpr:r,childRecords:n}of t){let i=r.on.map(([a])=>a),o=r.on.map(([,a])=>a),s={};for(let a of Array.isArray(e)?e:[e]){let f=To(a),h=Bn(f,i);s[h]||(s[h]=[]),s[h].push(f),r.isRelationUnique?f[r.parentField]=null:f[r.parentField]=[]}for(let a of Array.isArray(n)?n:[n]){if(a===null)continue;let f=Bn(To(a),o);for(let h of s[f]??[])r.isRelationUnique?h[r.parentField]=a:h[r.parentField].push(a)}}return e}function mc(e,{cursor:t,skip:r,take:n}){let i=t!==null?e.findIndex(a=>yr(a,t)):0;if(i===-1)return[];let o=i+(r??0),s=n!==null?o+n:e.length;return e.slice(o,s)}function Bn(e,t){return JSON.stringify(t.map(r=>e[r]))}function Wd(e,t,r,n){switch(e.type){case"value":return ve(e.value,r,n);case"lastInsertId":return t;default:H(e,`Unexpected field initializer type: ${e.type}`)}}function Jd(e,t,r,n){switch(e.type){case"set":return ve(e.value,r,n);case"add":return Me(t)+Me(ve(e.value,r,n));case"subtract":return Me(t)-Me(ve(e.value,r,n));case"multiply":return Me(t)*Me(ve(e.value,r,n));case"divide":{let i=Me(t),o=Me(ve(e.value,r,n));return o===0?null:i/o}default:H(e,`Unexpected field operation type: ${e.type}`)}}c();u();p();m();d();l();c();u();p();m();d();l();async function Kd(){return globalThis.crypto??await Promise.resolve().then(()=>(Xe(),Ei))}async function fc(){return(await Kd()).randomUUID()}c();u();p();m();d();l();var we=class extends _e{name="TransactionManagerError";constructor(t,r){super("Transaction API error: "+t,"P2028",r)}},Rr=class extends we{constructor(){super("Transaction not found. Transaction ID is invalid, refers to an old closed transaction Prisma doesn't have information about anymore, or was obtained before disconnecting.")}},jn=class extends we{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a committed transaction.`)}},Qn=class extends we{constructor(t){super(`Transaction is being closed: A ${t} cannot be executed on a closing transaction.`)}},Hn=class extends we{constructor(t){super(`Transaction already closed: A ${t} cannot be executed on a transaction that was rolled back.`)}},Gn=class extends we{constructor(){super("Unable to start a transaction in the given time.")}},Wn=class extends we{constructor(t,{timeout:r,timeTaken:n}){super(`A ${t} cannot be executed on an expired transaction. The timeout for this transaction was ${r} ms, however ${n} ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction`,{operation:t,timeout:r,timeTaken:n})}},Ut=class extends we{constructor(t){super(`Internal Consistency Error: ${t}`)}},Jn=class extends we{constructor(t){super(`Invalid isolation level: ${t}`,{isolationLevel:t})}};var zd=100,Sr=K("prisma:client:transactionManager"),Yd=()=>({sql:"COMMIT",args:[],argTypes:[]}),Zd=()=>({sql:"ROLLBACK",args:[],argTypes:[]}),Xd=()=>({sql:'-- Implicit "COMMIT" query via underlying driver',args:[],argTypes:[]}),ef=()=>({sql:'-- Implicit "ROLLBACK" query via underlying driver',args:[],argTypes:[]}),Ir=class{transactions=new Map;closedTransactions=[];driverAdapter;transactionOptions;tracingHelper;#e;#t;constructor({driverAdapter:t,transactionOptions:r,tracingHelper:n,onQuery:i,provider:o}){this.driverAdapter=t,this.transactionOptions=r,this.tracingHelper=n,this.#e=i,this.#t=o}async startTransaction(t){return await this.tracingHelper.runInChildSpan("start_transaction",()=>this.#r(t))}async#r(t){let r=t!==void 0?this.validateOptions(t):this.transactionOptions,n={id:await fc(),status:"waiting",timer:void 0,timeout:r.timeout,startedAt:Date.now(),transaction:void 0};this.transactions.set(n.id,n);let i=!1,o=setTimeout(()=>i=!0,r.maxWait);switch(n.transaction=await this.driverAdapter.startTransaction(r.isolationLevel),clearTimeout(o),n.status){case"waiting":if(i)throw await this.closeTransaction(n,"timed_out"),new Gn;return n.status="running",n.timer=this.startTransactionTimeout(n.id,r.timeout),{id:n.id};case"closing":case"timed_out":case"running":case"committed":case"rolled_back":throw new Ut(`Transaction in invalid state ${n.status} although it just finished startup.`);default:H(n.status,"Unknown transaction status.")}}async commitTransaction(t){return await this.tracingHelper.runInChildSpan("commit_transaction",async()=>{let r=this.getActiveTransaction(t,"commit");await this.closeTransaction(r,"committed")})}async rollbackTransaction(t){return await this.tracingHelper.runInChildSpan("rollback_transaction",async()=>{let r=this.getActiveTransaction(t,"rollback");await this.closeTransaction(r,"rolled_back")})}getTransaction(t,r){let n=this.getActiveTransaction(t.id,r);if(!n.transaction)throw new Rr;return n.transaction}getActiveTransaction(t,r){let n=this.transactions.get(t);if(!n){let i=this.closedTransactions.find(o=>o.id===t);if(i)switch(Sr("Transaction already closed.",{transactionId:t,status:i.status}),i.status){case"closing":case"waiting":case"running":throw new Ut("Active transaction found in closed transactions list.");case"committed":throw new jn(r);case"rolled_back":throw new Hn(r);case"timed_out":throw new Wn(r,{timeout:i.timeout,timeTaken:Date.now()-i.startedAt})}else throw Sr("Transaction not found.",t),new Rr}if(n.status==="closing")throw new Qn(r);if(["committed","rolled_back","timed_out"].includes(n.status))throw new Ut("Closed transaction found in active transactions map.");return n}async cancelAllTransactions(){await Promise.allSettled([...this.transactions.values()].map(t=>this.closeTransaction(t,"rolled_back")))}startTransactionTimeout(t,r){let n=Date.now();return setTimeout(async()=>{Sr("Transaction timed out.",{transactionId:t,timeoutStartedAt:n,timeout:r});let i=this.transactions.get(t);i&&["running","waiting"].includes(i.status)?await this.closeTransaction(i,"timed_out"):Sr("Transaction already committed or rolled back when timeout happened.",t)},r)}async closeTransaction(t,r){Sr("Closing transaction.",{transactionId:t.id,status:r}),t.status="closing";try{if(t.transaction&&r==="committed")if(t.transaction.options.usePhantomQuery)await this.#n(Xd(),t.transaction,()=>t.transaction.commit());else{let n=Yd();await this.#n(n,t.transaction,()=>t.transaction.executeRaw(n)),await t.transaction.commit()}else if(t.transaction)if(t.transaction.options.usePhantomQuery)await this.#n(ef(),t.transaction,()=>t.transaction.rollback());else{let n=Zd();await this.#n(n,t.transaction,()=>t.transaction.executeRaw(n)),await t.transaction.rollback()}}finally{t.status=r,clearTimeout(t.timer),t.timer=void 0,this.transactions.delete(t.id),this.closedTransactions.push(t),this.closedTransactions.length>zd&&this.closedTransactions.shift()}}validateOptions(t){if(!t.timeout)throw new we("timeout is required");if(!t.maxWait)throw new we("maxWait is required");if(t.isolationLevel==="SNAPSHOT")throw new Jn(t.isolationLevel);return{...t,timeout:t.timeout,maxWait:t.maxWait}}#n(t,r,n){return _n({query:t,execute:n,provider:this.#t??r.provider,tracingHelper:this.tracingHelper,onQuery:this.#e})}};var Kn="6.13.0";c();u();p();m();d();l();var zn=class e{#e;#t;#r;constructor(t,r,n){this.#e=t,this.#t=r,this.#r=n}static async connect(t){let r,n;try{r=await t.driverAdapterFactory.connect(),n=new Ir({driverAdapter:r,transactionOptions:t.transactionOptions,tracingHelper:t.tracingHelper,onQuery:t.onQuery,provider:t.provider})}catch(i){throw await r?.dispose(),i}return new e(t,r,n)}getConnectionInfo(){let t=this.#t.getConnectionInfo?.()??{supportsRelationJoins:!1};return Promise.resolve({provider:this.#t.provider,connectionInfo:t})}async execute({plan:t,placeholderValues:r,transaction:n,batchIndex:i}){let o=n?this.#r.getTransaction(n,i!==void 0?"batch query":"query"):this.#t;return await Cr.forSql({transactionManager:n?{enabled:!1}:{enabled:!0,manager:this.#r},placeholderValues:r,onQuery:this.#e.onQuery,tracingHelper:this.#e.tracingHelper,provider:this.#e.provider}).run(t,o)}async startTransaction(t){return{...await this.#r.startTransaction(t),payload:void 0}}async commitTransaction(t){await this.#r.commitTransaction(t.id)}async rollbackTransaction(t){await this.#r.rollbackTransaction(t.id)}async disconnect(){try{await this.#r.cancelAllTransactions()}finally{await this.#t.dispose()}}};c();u();p();m();d();l();c();u();p();m();d();l();var Yn=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function gc(e,t,r){let n=r||{},i=n.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!Yn.test(e))throw new TypeError("argument name is invalid");let o=i(t);if(o&&!Yn.test(o))throw new TypeError("argument val is invalid");let s=e+"="+o;if(n.maxAge!==void 0&&n.maxAge!==null){let a=n.maxAge-0;if(Number.isNaN(a)||!Number.isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!Yn.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!Yn.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if(!rf(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{s+="; Priority=Low";break}case"medium":{s+="; Priority=Medium";break}case"high":{s+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{s+="; SameSite=Strict";break}case"lax":{s+="; SameSite=Lax";break}case"strict":{s+="; SameSite=Strict";break}case"none":{s+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(s+="; Partitioned"),s}function rf(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function yc(e,t){let r=(e||"").split(";").filter(f=>typeof f=="string"&&!!f.trim()),n=r.shift()||"",i=nf(n),o=i.name,s=i.value;try{s=t?.decode===!1?s:(t?.decode||decodeURIComponent)(s)}catch{}let a={name:o,value:s};for(let f of r){let h=f.split("="),A=(h.shift()||"").trimStart().toLowerCase(),C=h.join("=");switch(A){case"expires":{a.expires=new Date(C);break}case"max-age":{a.maxAge=Number.parseInt(C,10);break}case"secure":{a.secure=!0;break}case"httponly":{a.httpOnly=!0;break}case"samesite":{a.sameSite=C;break}default:a[A]=C}}return a}function nf(e){let t="",r="",n=e.split("=");return n.length>1?(t=n.shift(),r=n.join("=")):r=e,{name:t,value:r}}c();u();p();m();d();l();c();u();p();m();d();l();function Ft({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Dt().id==="workerd"?new F(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new F(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new F("error: Missing URL environment variable, value, or override.",n);return i}c();u();p();m();d();l();c();u();p();m();d();l();c();u();p();m();d();l();var Zn=class extends Error{clientVersion;cause;constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var fe=class extends Zn{isRetryable;constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};c();u();p();m();d();l();function N(e,t){return{...e,isRetryable:t}}var st=class extends fe{name="InvalidDatasourceError";code="P6001";constructor(t,r){super(t,N(r,!1))}};O(st,"InvalidDatasourceError");function Xn(e){let t={clientVersion:e.clientVersion},r=Object.keys(e.inlineDatasources)[0],n=Ft({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,clientVersion:e.clientVersion,env:{...e.env,...typeof g<"u"?g.env:{}}}),i;try{i=new URL(n)}catch{throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,searchParams:s}=i;if(o!=="prisma:"&&o!==sn)throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``,t);let a=s.get("api_key");if(a===null||a.length<1)throw new st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);let f=Pi(i)?"http:":"https:",h=new URL(i.href.replace(o,f));return{apiKey:a,url:h}}c();u();p();m();d();l();var hc=Ce(xs()),$t=class{apiKey;tracingHelper;logLevel;logQueries;engineHash;constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,transactionId:r}={}){let n={Accept:"application/json",Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json","Prisma-Engine-Hash":this.engineHash,"Prisma-Engine-Version":hc.enginesVersion};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-Transaction-Id"]=r);let i=this.#e();return i.length>0&&(n["X-Capture-Telemetry"]=i.join(", ")),n}#e(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}};c();u();p();m();d();l();function of(e){return e[0]*1e3+e[1]/1e6}function Vt(e){return new Date(of(e))}var wc=K("prisma:client:clientEngine:remoteExecutor"),ei=class{#e;#t;#r;#n;#o;constructor(t){this.#e=t.clientVersion,this.#n=t.logEmitter,this.#o=t.tracingHelper;let{url:r,apiKey:n}=Xn({clientVersion:t.clientVersion,env:t.env,inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources});this.#r=new vo(r),this.#t=new $t({apiKey:n,engineHash:t.clientVersion,logLevel:t.logLevel,logQueries:t.logQueries,tracingHelper:t.tracingHelper})}async getConnectionInfo(){return await this.#i({path:"/connection-info",method:"GET"})}async execute({plan:t,placeholderValues:r,batchIndex:n,model:i,operation:o,transaction:s,customFetch:a}){return(await this.#i({path:s?`/transaction/${s.id}/query`:"/query",method:"POST",body:{model:i,operation:o,plan:t,params:r},batchRequestIdx:n,fetch:a})).data}async startTransaction(t){return{...await this.#i({path:"/transaction/start",method:"POST",body:t}),payload:void 0}}async commitTransaction(t){await this.#i({path:`/transaction/${t.id}/commit`,method:"POST"})}async rollbackTransaction(t){await this.#i({path:`/transaction/${t.id}/rollback`,method:"POST"})}disconnect(){return Promise.resolve()}async#i({path:t,method:r,body:n,fetch:i=globalThis.fetch,batchRequestIdx:o}){let s=await this.#r.request({method:r,path:t,headers:this.#t.build(),body:n,fetch:i});s.ok||await this.#s(s,o);let a=await s.json();return typeof a.extensions=="object"&&a.extensions!==null&&this.#a(a.extensions),a}async#s(t,r){let n=t.headers.get("Prisma-Error-Code"),i=await t.text(),o,s=i;try{o=JSON.parse(i)}catch{o={}}typeof o.code=="string"&&(n=o.code),typeof o.error=="string"?s=o.error:typeof o.message=="string"?s=o.message:typeof o.InvalidRequestError=="object"&&o.InvalidRequestError!==null&&typeof o.InvalidRequestError.reason=="string"&&(s=o.InvalidRequestError.reason),s=s||`HTTP ${t.status}: ${t.statusText}`;let a=typeof o.meta=="object"&&o.meta!==null?o.meta:o;throw new z(s,{clientVersion:this.#e,code:n??"P6000",batchRequestIdx:r,meta:a})}#a(t){if(t.logs)for(let r of t.logs)this.#l(r);t.traces&&this.#o.dispatchEngineSpans(t.traces)}#l(t){switch(t.level){case"debug":case"trace":wc(t);break;case"error":case"warn":case"info":{this.#n.emit(t.level,{timestamp:Vt(t.timestamp),message:t.attributes.message??"",target:t.target});break}case"query":{this.#n.emit("query",{query:t.attributes.query??"",timestamp:Vt(t.timestamp),duration:t.attributes.duration_ms??0,params:t.attributes.params??"",target:t.target});break}default:throw new Error(`Unexpected log level: ${t.level}`)}}},vo=class{#e;#t;#r;constructor(t){this.#e=t,this.#t=new Map}async request({method:t,path:r,headers:n,body:i,fetch:o}){let s=new URL(r,this.#e),a=this.#n(s);a&&(n.Cookie=a),this.#r&&(n["Accelerate-Query-Engine-Jwt"]=this.#r);let f=await o(s,{method:t,body:i!==void 0?JSON.stringify(i):void 0,headers:n});return wc(t,s,f.status,f.statusText),this.#r=f.headers.get("Accelerate-Query-Engine-Jwt")??void 0,this.#o(s,f),f}#n(t){let r=[],n=new Date;for(let[i,o]of this.#t){if(o.expires&&o.expires0?r.join("; "):void 0}#o(t,r){let n=r.headers.getSetCookie?.()||[];if(n.length===0){let i=r.headers.get("Set-Cookie");i&&n.push(i)}for(let i of n){let o=yc(i),s=o.domain??t.hostname,a=o.path??"/",f=`${s}:${a}:${o.name}`;this.#t.set(f,{name:o.name,value:o.value,domain:s,path:a,expires:o.expires})}}};c();u();p();m();d();l();var Ao,bc={async loadQueryCompiler(e){let{clientVersion:t,compilerWasm:r}=e;if(r===void 0)throw new F("WASM query compiler was unexpectedly `undefined`",t);return Ao===void 0&&(Ao=(async()=>{let n=await r.getRuntime(),i=await r.getQueryCompilerWasmModule();if(i==null)throw new F("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let o={"./query_compiler_bg.js":n},s=new WebAssembly.Instance(i,o),a=s.exports.__wbindgen_start;return n.__wbg_set_wasm(s.exports),a(),n.QueryCompiler})()),await Ao}};var Ec="P2038",kr=K("prisma:client:clientEngine"),Pc=globalThis;Pc.PRISMA_WASM_PANIC_REGISTRY={set_message(e){throw new le(e,Kn)}};var Or=class{name="ClientEngine";#e;#t={type:"disconnected"};#r;#n;config;datamodel;logEmitter;logQueries;logLevel;tracingHelper;#o;constructor(t,r,n){if(!t.previewFeatures?.includes("driverAdapters")&&!r)throw new F("EngineType `client` requires the driverAdapters preview feature to be enabled.",t.clientVersion,Ec);if(r)this.#n={remote:!0};else if(t.adapter)this.#n={remote:!1,driverAdapterFactory:t.adapter},kr("Using driver adapter: %O",t.adapter);else throw new F("Missing configured driver adapter. Engine type `client` requires an active driver adapter. Please check your PrismaClient initialization code.",t.clientVersion,Ec);this.#r=n??bc,this.config=t,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,this.tracingHelper=t.tracingHelper,t.enableDebugLogs&&(this.logLevel="debug"),this.logQueries&&(this.#o=i=>{this.logEmitter.emit("query",{...i,params:hr(i.params),target:"ClientEngine"})})}applyPendingMigrations(){throw new Error("Cannot call applyPendingMigrations on engine type client.")}async#i(){switch(this.#t.type){case"disconnected":{let t=this.tracingHelper.runInChildSpan("connect",async()=>{let r,n;try{r=await this.#s(),n=await this.#a(r)}catch(o){throw this.#t={type:"disconnected"},n?.free(),await r?.disconnect(),o}let i={executor:r,queryCompiler:n};return this.#t={type:"connected",engine:i},i});return this.#t={type:"connecting",promise:t},await t}case"connecting":return await this.#t.promise;case"connected":return this.#t.engine;case"disconnecting":return await this.#t.promise,await this.#i()}}async#s(){return this.#n.remote?new ei({clientVersion:this.config.clientVersion,env:this.config.env,inlineDatasources:this.config.inlineDatasources,logEmitter:this.logEmitter,logLevel:this.logLevel,logQueries:this.logQueries,overrideDatasources:this.config.overrideDatasources,tracingHelper:this.tracingHelper}):await zn.connect({driverAdapterFactory:this.#n.driverAdapterFactory,tracingHelper:this.tracingHelper,transactionOptions:{...this.config.transactionOptions,isolationLevel:this.#m(this.config.transactionOptions.isolationLevel)},onQuery:this.#o,provider:this.config.activeProvider})}async#a(t){let r=this.#e;r===void 0&&(r=await this.#r.loadQueryCompiler(this.config),this.#e=r);let{provider:n,connectionInfo:i}=await t.getConnectionInfo();try{return this.#p(()=>new r({datamodel:this.datamodel,provider:n,connectionInfo:i}),void 0,!1)}catch(o){throw this.#l(o)}}#l(t){if(t instanceof le)return t;try{let r=JSON.parse(t.message);return new F(r.message,this.config.clientVersion,r.error_code)}catch{return t}}#c(t,r){if(t instanceof F)return t;if(t.code==="GenericFailure"&&t.message?.startsWith("PANIC:"))return new le(xc(this,t.message,r),this.config.clientVersion);if(t instanceof _e)return new z(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion});try{let n=JSON.parse(t);return new ae(`${n.message} -${n.backtrace}`,{clientVersion:this.config.clientVersion})}catch{return t}}#u(t){return t instanceof le?t:typeof t.message=="string"&&typeof t.code=="string"?new z(t.message,{code:t.code,meta:t.meta,clientVersion:this.config.clientVersion}):t}#p(t,r,n=!0){let i=Pc.PRISMA_WASM_PANIC_REGISTRY.set_message,o;globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=s=>{o=s};try{return t()}finally{if(globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message=i,o)throw this.#e=void 0,n&&this.stop().catch(s=>kr("failed to disconnect:",s)),new le(xc(this,o,r),this.config.clientVersion)}}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the client engine, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){await this.#i()}async stop(){switch(this.#t.type){case"disconnected":return;case"connecting":return await this.#t.promise,await this.stop();case"connected":{let t=this.#t.engine,r=this.tracingHelper.runInChildSpan("disconnect",async()=>{try{await t.executor.disconnect(),t.queryCompiler.free()}finally{this.#t={type:"disconnected"}}});return this.#t={type:"disconnecting",promise:r},await r}case"disconnecting":return await this.#t.promise}}version(){return"unknown"}async transaction(t,r,n){let i,{executor:o}=await this.#i();try{if(t==="start"){let s=n;i=await o.startTransaction({...s,isolationLevel:this.#m(s.isolationLevel)})}else if(t==="commit"){let s=n;await o.commitTransaction(s)}else if(t==="rollback"){let s=n;await o.rollbackTransaction(s)}else Pe(t,"Invalid transaction action.")}catch(s){throw this.#c(s)}return i?{id:i.id,payload:void 0}:void 0}async request(t,{interactiveTransaction:r,customDataProxyFetch:n}){kr("sending request");let i=JSON.stringify(t),{executor:o,queryCompiler:s}=await this.#i().catch(f=>{throw this.#c(f,i)}),a;try{a=this.#p(()=>s.compile(i),i)}catch(f){throw this.#u(f)}try{kr("query plan created",a);let f={},h=await o.execute({plan:a,model:t.modelName,operation:t.action,placeholderValues:f,transaction:r,batchIndex:void 0,customFetch:n?.(globalThis.fetch)});return kr("query plan executed"),{data:{[t.action]:h}}}catch(f){throw this.#c(f,i)}}async requestBatch(t,{transaction:r,customDataProxyFetch:n}){if(t.length===0)return[];let i=t[0].action,o=JSON.stringify(kt(t,r)),{executor:s,queryCompiler:a}=await this.#i().catch(h=>{throw this.#c(h,o)}),f;try{f=a.compileBatch(o)}catch(h){throw this.#u(h)}try{let h;r?.kind==="itx"&&(h=r.options);let A={};switch(f.type){case"multi":{if(r?.kind!=="itx"){let R=r?.options.isolationLevel?{...this.config.transactionOptions,isolationLevel:r.options.isolationLevel}:this.config.transactionOptions;h=await this.transaction("start",{},R)}let C=[],S=!1;for(let[R,_]of f.plans.entries())try{let k=await s.execute({plan:_,placeholderValues:A,model:t[R].modelName,operation:t[R].action,batchIndex:R,transaction:h,customFetch:n?.(globalThis.fetch)});C.push({data:{[t[R].action]:k}})}catch(k){C.push(k),S=!0;break}return h!==void 0&&r?.kind!=="itx"&&(S?await this.transaction("rollback",{},h):await this.transaction("commit",{},h)),C}case"compacted":{if(!t.every(R=>R.action===i))throw new Error("All queries in a batch must have the same action");let C=await s.execute({plan:f.plan,placeholderValues:A,model:t[0].modelName,operation:i,batchIndex:void 0,transaction:h,customFetch:n?.(globalThis.fetch)});return this.#d(C,f,i)}}}catch(h){throw this.#c(h,o)}}metrics(t){throw new Error("Method not implemented.")}#d(t,r,n){let i=t.map(s=>r.keys.reduce((a,f)=>(a[f]=qe(s[f]),a),{})),o=new Set(r.nestedSelection);return r.arguments.map(s=>{let a=i.findIndex(f=>yr(f,s));if(a===-1)return r.expectNonEmpty?new z("An operation failed because it depends on one or more records that were required but not found",{code:"P2025",clientVersion:this.config.clientVersion}):{data:{[n]:null}};{let f=Object.entries(t[a]).filter(([h])=>o.has(h));return{data:{[n]:Object.fromEntries(f)}}}})}#m(t){switch(t){case void 0:return;case"ReadUncommitted":return"READ UNCOMMITTED";case"ReadCommitted":return"READ COMMITTED";case"RepeatableRead":return"REPEATABLE READ";case"Serializable":return"SERIALIZABLE";case"Snapshot":return"SNAPSHOT";default:throw new z(`Inconsistent column data: Conversion failed: Invalid isolation level \`${t}\``,{code:"P2023",clientVersion:this.config.clientVersion,meta:{providedIsolationLevel:t}})}}};function xc(e,t,r){return Ga({binaryTarget:void 0,title:t,version:e.config.clientVersion,engineVersion:"unknown",database:e.config.activeProvider,query:r})}c();u();p();m();d();l();c();u();p();m();d();l();var qt=class extends fe{name="ForcedRetryError";code="P5001";constructor(t){super("This request must be retried",N(t,!0))}};O(qt,"ForcedRetryError");c();u();p();m();d();l();var at=class extends fe{name="NotImplementedYetError";code="P5004";constructor(t,r){super(t,N(r,!1))}};O(at,"NotImplementedYetError");c();u();p();m();d();l();c();u();p();m();d();l();var j=class extends fe{response;constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var lt=class extends j{name="SchemaMissingError";code="P5005";constructor(t){super("Schema needs to be uploaded",N(t,!0))}};O(lt,"SchemaMissingError");c();u();p();m();d();l();c();u();p();m();d();l();var Co="This request could not be understood by the server",Dr=class extends j{name="BadRequestError";code="P5000";constructor(t,r,n){super(r||Co,N(t,!1)),n&&(this.code=n)}};O(Dr,"BadRequestError");c();u();p();m();d();l();var _r=class extends j{name="HealthcheckTimeoutError";code="P5013";logs;constructor(t,r){super("Engine not started: healthcheck timeout",N(t,!0)),this.logs=r}};O(_r,"HealthcheckTimeoutError");c();u();p();m();d();l();var Mr=class extends j{name="EngineStartupError";code="P5014";logs;constructor(t,r,n){super(r,N(t,!0)),this.logs=n}};O(Mr,"EngineStartupError");c();u();p();m();d();l();var Lr=class extends j{name="EngineVersionNotSupportedError";code="P5012";constructor(t){super("Engine version is not supported",N(t,!1))}};O(Lr,"EngineVersionNotSupportedError");c();u();p();m();d();l();var Ro="Request timed out",Nr=class extends j{name="GatewayTimeoutError";code="P5009";constructor(t,r=Ro){super(r,N(t,!1))}};O(Nr,"GatewayTimeoutError");c();u();p();m();d();l();var sf="Interactive transaction error",Ur=class extends j{name="InteractiveTransactionError";code="P5015";constructor(t,r=sf){super(r,N(t,!1))}};O(Ur,"InteractiveTransactionError");c();u();p();m();d();l();var af="Request parameters are invalid",Fr=class extends j{name="InvalidRequestError";code="P5011";constructor(t,r=af){super(r,N(t,!1))}};O(Fr,"InvalidRequestError");c();u();p();m();d();l();var So="Requested resource does not exist",$r=class extends j{name="NotFoundError";code="P5003";constructor(t,r=So){super(r,N(t,!1))}};O($r,"NotFoundError");c();u();p();m();d();l();var Io="Unknown server error",Bt=class extends j{name="ServerError";code="P5006";logs;constructor(t,r,n){super(r||Io,N(t,!0)),this.logs=n}};O(Bt,"ServerError");c();u();p();m();d();l();var ko="Unauthorized, check your connection string",Vr=class extends j{name="UnauthorizedError";code="P5007";constructor(t,r=ko){super(r,N(t,!1))}};O(Vr,"UnauthorizedError");c();u();p();m();d();l();var Oo="Usage exceeded, retry again later",qr=class extends j{name="UsageExceededError";code="P5008";constructor(t,r=Oo){super(r,N(t,!0))}};O(qr,"UsageExceededError");async function lf(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Br(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await lf(e);if(n.type==="QueryEngineError")throw new z(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Bt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lt(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Lr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Mr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new F(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new _r(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ur(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Fr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Vr(r,jt(ko,n));if(e.status===404)return new $r(r,jt(So,n));if(e.status===429)throw new qr(r,jt(Oo,n));if(e.status===504)throw new Nr(r,jt(Ro,n));if(e.status>=500)throw new Bt(r,jt(Io,n));if(e.status>=400)throw new Dr(r,jt(Co,n))}function jt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}c();u();p();m();d();l();function Tc(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}c();u();p();m();d();l();var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function vc(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,f,h,A;for(let C=0;C>18,a=(A&258048)>>12,f=(A&4032)>>6,h=A&63,r+=$e[s]+$e[a]+$e[f]+$e[h];return i==1?(A=t[o],s=(A&252)>>2,a=(A&3)<<4,r+=$e[s]+$e[a]+"=="):i==2&&(A=t[o]<<8|t[o+1],s=(A&64512)>>10,a=(A&1008)>>4,f=(A&15)<<2,r+=$e[s]+$e[a]+$e[f]+"="),r}c();u();p();m();d();l();function Ac(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new F("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}c();u();p();m();d();l();var Cc={"@prisma/debug":"workspace:*","@prisma/engines-version":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};c();u();p();m();d();l();c();u();p();m();d();l();var jr=class extends fe{name="RequestError";code="P5010";constructor(t,r){super(`Cannot fetch data from service: -${t}`,N(r,!0))}};O(jr,"RequestError");async function ct(e,t,r=n=>n){let{clientVersion:n,...i}=t,o=r(fetch);try{return await o(e,i)}catch(s){let a=s.message??"Unknown error";throw new jr(a,{clientVersion:n,cause:s})}}var uf=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Rc=K("prisma:client:dataproxyEngine");async function pf(e,t){let r=Cc["@prisma/engines-version"],n=t.clientVersion??"unknown";if(g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION||globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&uf.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){let[s]=r.split("-")??[],[a,f,h]=s.split("."),A=mf(`<=${a}.${f}.${h}`),C=await ct(A,{clientVersion:n});if(!C.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${C.status} ${C.statusText}, response body: ${await C.text()||""}`);let S=await C.text();Rc("length of body fetched from unpkg.com",S.length);let R;try{R=JSON.parse(S)}catch(_){throw console.error("JSON.parse error: body fetched from unpkg.com: ",S),_}return R.version}throw new at("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Sc(e,t){let r=await pf(e,t);return Rc("version",r),r}function mf(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ic=3,Qr=K("prisma:client:dataproxyEngine"),Hr=class{name="DataProxyEngine";inlineSchema;inlineSchemaHash;inlineDatasources;config;logEmitter;env;clientVersion;engineHash;tracingHelper;remoteClientVersion;host;headerBuilder;startPromise;protocol;constructor(t){Ac(t),this.config=t,this.env=t.env,this.inlineSchema=vc(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let{apiKey:t,url:r}=this.getURLAndAPIKey();this.host=r.host,this.protocol=r.protocol,this.headerBuilder=new $t({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel??"error",logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Sc(this.host,this.config),Qr("host",this.host),Qr("protocol",this.protocol)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"trace":Qr(r);break;case"error":case"warn":case"info":{this.logEmitter.emit(r.level,{timestamp:Vt(r.timestamp),message:r.attributes.message??"",target:r.target});break}case"query":{this.logEmitter.emit("query",{query:r.attributes.query??"",timestamp:Vt(r.timestamp),duration:r.attributes.duration_ms??0,params:r.attributes.params??"",target:r.target});break}default:r.level}}),t?.traces?.length&&this.tracingHelper.dispatchEngineSpans(t.traces)}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ct(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Qr("schema response status",r.status);let n=await Br(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=kt(t,n);return(await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r})).map(f=>(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f?this.convertProtocolErrorsToClientError(f.errors):f))}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,transactionId:i?.id}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Qr("graphql response status",a.status),await this.handleError(await Br(a,this.clientVersion));let f=await a.json();if(f.extensions&&this.propagateResponseExtensions(f.extensions),"errors"in f)throw this.convertProtocolErrorsToClientError(f.errors);return"batchResult"in f?f.batchResult:f}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let f=await ct(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Br(f,this.clientVersion));let h=await f.json(),{extensions:A}=h;A&&this.propagateResponseExtensions(A);let C=h.id,S=h["data-proxy"].endpoint;return{id:C,payload:{endpoint:S}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Br(a,this.clientVersion));let f=await a.json(),{extensions:h}=f;h&&this.propagateResponseExtensions(h);return}}})}getURLAndAPIKey(){return Xn({clientVersion:this.clientVersion,env:this.env,inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources})}metrics(){throw new at("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof fe)||!i.isRetryable)throw i;if(r>=Ic)throw i instanceof qt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ic} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Tc(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof lt)throw await this.uploadSchema(),new qt({clientVersion:this.clientVersion,cause:t});if(t)throw t}convertProtocolErrorsToClientError(t){return t.length===1?kn(t[0],this.config.clientVersion,this.config.activeProvider):new ae(JSON.stringify(t),{clientVersion:this.config.clientVersion})}applyPendingMigrations(){throw new Error("Method not implemented.")}};c();u();p();m();d();l();function kc({url:e,adapter:t,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=k=>{i.push({_tag:"warning",value:k})},a=k=>{let L=k.join(` -`);o.push({_tag:"error",value:L})},f=!!e?.startsWith("prisma://"),h=an(e),A=!!t,C=f||h;!A&&r&&C&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let S=C||!r;A&&(S||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?f&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let R={accelerate:S,ppg:h,driverAdapters:A};function _(k){return k.length>0}return _(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:R}:{ok:!0,diagnostics:{warnings:i},isUsing:R}}function Oc({copyEngine:e=!0},t){let r;try{r=Ft({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=kc({url:r,adapter:t.adapter,copyEngine:e,targetBuildType:"wasm-compiler-edge"});for(let C of o.warnings)Xt(...C.value);if(!n){let C=o.errors[0];throw new ie(C.value,{clientVersion:t.clientVersion})}let s=gt(t.generator),a=s==="library",f=s==="binary",h=s==="client",A=(i.accelerate||i.ppg)&&!i.driverAdapters;if(h)return new Or(t,A);if(i.accelerate)return new Hr(t);i.driverAdapters,i.accelerate;{let C=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Dt().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new ie(C.join(` -`),{clientVersion:t.clientVersion})}return"wasm-compiler-edge"}c();u();p();m();d();l();function ti({generator:e}){return e?.previewFeatures??[]}c();u();p();m();d();l();var Dc=e=>({command:e});c();u();p();m();d();l();c();u();p();m();d();l();var _c=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();u();p();m();d();l();l();function Qt(e){try{return Mc(e,"fast")}catch{return Mc(e,"slow")}}function Mc(e,t){return JSON.stringify(e.map(r=>Nc(r,t)))}function Nc(e,t){if(Array.isArray(e))return e.map(r=>Nc(r,t));if(typeof e=="bigint")return{prisma__type:"bigint",prisma__value:e.toString()};if(wt(e))return{prisma__type:"date",prisma__value:e.toJSON()};if(ne.isDecimal(e))return{prisma__type:"decimal",prisma__value:e.toJSON()};if(y.isBuffer(e))return{prisma__type:"bytes",prisma__value:e.toString("base64")};if(df(e))return{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")};if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:n,byteLength:i}=e;return{prisma__type:"bytes",prisma__value:y.from(r,n,i).toString("base64")}}return typeof e=="object"&&t==="slow"?Uc(e):e}function df(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Uc(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Lc);let t={};for(let r of Object.keys(e))t[r]=Lc(e[r]);return t}function Lc(e){return typeof e=="bigint"?e.toString():Uc(e)}var ff=/^(\s*alter\s)/i,Fc=K("prisma:client");function Do(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&ff.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var _o=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Cn(r))n=r.sql,i={values:Qt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Qt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Qt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Qt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=_c(r),i={values:Qt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Fc(`prisma.${e}(${n}, ${i.values})`):Fc(`prisma.${e}(${n})`),{query:n,parameters:i}},$c={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new de(t,r)}},Vc={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();u();p();m();d();l();function Mo(e){return function(r,n){let i,o=(s=e)=>{try{return s===void 0||s?.kind==="itx"?i??=qc(r(s)):qc(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function qc(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();u();p();m();d();l();var gf=wi.split(".")[0],yf={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Lo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}dispatchEngineSpans(t){return this.getGlobalTracingHelper().dispatchEngineSpans(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){let t=globalThis[`V${gf}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return t?.helper??r?.helper??yf}};function Bc(){return new Lo}c();u();p();m();d();l();function jc(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}c();u();p();m();d();l();function Qc(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}c();u();p();m();d();l();var ri=class{_middlewares=[];use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};c();u();p();m();d();l();var Gc=Ce(vi());c();u();p();m();d();l();function ni(e){return typeof e.batchRequestIdx=="number"}c();u();p();m();d();l();function Hc(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(No(e.query.arguments)),t.push(No(e.query.selection)),t.join("")}function No(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${No(n)})`:r}).join(" ")})`}c();u();p();m();d();l();var hf={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function Uo(e){return hf[e]}c();u();p();m();d();l();var ii=class{constructor(t){this.options=t;this.batches={}}batches;tickActive=!1;request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iut("bigint",r));case"bytes-array":return t.map(r=>ut("bytes",r));case"decimal-array":return t.map(r=>ut("decimal",r));case"datetime-array":return t.map(r=>ut("datetime",r));case"date-array":return t.map(r=>ut("date",r));case"time-array":return t.map(r=>ut("time",r));default:return t}}function oi(e){let t=[],r=wf(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(C=>C.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),h=n.some(C=>Uo(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:Ef(o),containsWrite:h,customDataProxyFetch:i})).map((C,S)=>{if(C instanceof Error)return C;try{return this.mapQueryEngineResult(n[S],C)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Wc(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Uo(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Hc(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(bf(t),xf(t,i))throw t;if(t instanceof z&&Pf(t)){let h=Jc(t.meta);En({args:o,errors:[h],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=t.message;if(n&&(f=un({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),t.code){let h=s?{modelName:s,...t.meta}:t.meta;throw new z(f,{code:t.code,clientVersion:this.client._clientVersion,meta:h,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new le(f,this.client._clientVersion);if(t instanceof ae)throw new ae(f,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof F)throw new F(f,this.client._clientVersion);if(t instanceof le)throw new le(f,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Gc.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(h=>h!=="select"&&h!=="include"),a=Vi(o,s),f=i==="queryRaw"?oi(a):qe(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function Ef(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Wc(e)};Pe(e,"Unknown transaction kind")}}function Wc(e){return{id:e.id,payload:e.payload}}function xf(e,t){return ni(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Pf(e){return e.code==="P2009"||e.code==="P2012"}function Jc(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Jc)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();u();p();m();d();l();var Kc=Kn;c();u();p();m();d();l();var eu=Ce(Si());c();u();p();m();d();l();var $=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};O($,"PrismaClientConstructorValidationError");var zc=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Yc=["pretty","colorless","minimal"],Zc=["info","query","warn","error"],Tf={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Ht(r,t)||` Available datasources: ${t.join(", ")}`;throw new $(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new $(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new $(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(!e&>(t.generator)==="client")throw new $('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(e===null)return;if(e===void 0)throw new $('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!ti(t).includes("driverAdapters"))throw new $('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(gt(t.generator)==="binary")throw new $('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new $(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Yc.includes(e)){let t=Ht(e,Yc);throw new $(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new $(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Zc.includes(r)){let n=Ht(r,Zc);throw new $(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Ht(i,o);throw new $(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new $(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new $(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new $(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new $('"omit" option is expected to be an object.');if(e===null)throw new $('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Af(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(h=>h.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new $(Cf(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new $(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Ht(r,t);throw new $(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function tu(e,t){for(let[r,n]of Object.entries(e)){if(!zc.includes(r)){let i=Ht(r,zc);throw new $(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Tf[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new $('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Ht(e,t){if(t.length===0||typeof e!="string")return"";let r=vf(e,t);return r?` Did you mean "${r}"?`:""}function vf(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,eu.default)(e,i)}));r.sort((i,o)=>i.distanceBe(n)===t);if(r)return e[r]}function Cf(e,t){let r=Ct(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=bn(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}c();u();p();m();d();l();function ru(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},f=h=>{o||(o=!0,r(h))};for(let h=0;h{n[h]=A,a()},A=>{if(!ni(A)){f(A);return}A.batchRequestIdx===h?f(A):(i||(i=A),a())})})}var Je=K("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Rf={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Sf=Symbol.for("prisma.client.transaction.id"),If={id:0,nextId(){return++this.id}};function ou(e){class t{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new ri;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=Mo();constructor(n){e=n?.__internal?.configOverride?.(e)??e,Va(e),n&&tu(n,e);let i=new Rn().on("error",()=>{});this._extensions=Rt.empty(),this._previewFeatures=ti(e),this._clientVersion=e.clientVersion??Kc,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Bc();let o=e.relativeEnvPaths&&{rootEnvPath:e.relativeEnvPaths.rootEnvPath&&tn.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&tn.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=e.activeProvider==="postgresql"||e.activeProvider==="cockroachdb"?"postgres":e.activeProvider;if(s.provider!==f)throw new F(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new F("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let f=n??{},h=f.__internal??{},A=h.debug===!0;A&&K.enable("prisma:client");let C=tn.resolve(e.dirname,e.relativePath);ms.existsSync(C)||(C=e.dirname),Je("dirname",e.dirname),Je("relativePath",e.relativePath),Je("cwd",C);let S=h.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:C,dirname:e.dirname,enableDebugLogs:A,allowTriggerPanic:S.allowTriggerPanic,prismaPath:S.binaryPath??void 0,engineEndpoint:S.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&Qc(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,compilerWasm:e.compilerWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:qa(f,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Ft,getBatchRequestPayload:kt,prismaGraphQLToJSError:kn,PrismaClientUnknownRequestError:ae,PrismaClientInitializationError:F,PrismaClientKnownRequestError:z,debug:K("prisma:client:accelerateEngine"),engineVersion:iu.version,clientVersion:e.clientVersion}},Je("clientVersion",e.clientVersion),this._engine=Oc(e,this._engineConfig),this._requestHandler=new si(this,i),f.log)for(let R of f.log){let _=typeof R=="string"?R:R.emit==="stdout"?R.level:null;_&&this.$on(_,k=>{Zt.log(`${Zt.tags[_]??""}`,k.message||k.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=fr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{ps()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:_o({clientMethod:i,activeProvider:a}),callsite:Qe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=nu(n,i);return Do(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ie("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Do(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ie(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Dc,callsite:Qe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:_o({clientMethod:i,activeProvider:a}),callsite:Qe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...nu(n,i));throw new ie("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new ie("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=If.nextId(),s=jc(n.length),a=n.map((f,h)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let A=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,C={kind:"batch",id:o,index:h,isolationLevel:A,lock:s};return f.requestTransaction?.(C)??f});return ru(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let h={kind:"itx",...a};f=await n(this._createItxClient(h)),await this._engine.transaction("commit",o,a)}catch(h){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),h}return f}_createItxClient(n){return Te(fr(Te(Aa(this),[ce("_appliedParent",()=>this._appliedParent._createItxClient(n)),ce("_createPrismaPromise",()=>Mo(n)),ce(Sf,()=>n.id)])),[It(ka)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Rf,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,f=async h=>{let A=this._middlewares.get(++a);if(A)return this._tracingHelper.runInChildSpan(s.middleware,L=>A(h,Ee=>(L?.end(),f(Ee))));let{runInTransaction:C,args:S,...R}=h,_={...n,...R};S&&(_.args=i.middlewareArgsToRequestArgs(S)),n.transaction!==void 0&&C===!1&&delete _.transaction;let k=await Ma(this,_);return _.model?Ia({result:k,modelName:_.model,args:_.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>f(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:h,transaction:A,unpacker:C,otelParentCtx:S,customDataProxyFetch:R}){try{n=h?h(n):n;let _={name:"serialize"},k=this._tracingHelper.runInChildSpan(_,()=>vn({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return K.enabled("prisma:client")&&(Je("Prisma Client call:"),Je(`prisma.${i}(${ga(n)})`),Je("Generated request:"),Je(JSON.stringify(k,null,2)+` -`)),A?.kind==="batch"&&await A.lock,this._requestHandler.request({protocolQuery:k,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:A,unpacker:C,otelParentCtx:S,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:R})}catch(_){throw _.clientVersion=this._clientVersion,_}}$metrics=new St(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Ca}return t}function nu(e,t){return kf(e)?[new de(e,t),$c]:[e,Vc]}function kf(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();u();p();m();d();l();var Of=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function su(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Of.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}c();u();p();m();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=wasm-compiler-edge.js.map diff --git a/backend/generated/prisma/runtime/wasm-engine-edge.js b/backend/generated/prisma/runtime/wasm-engine-edge.js deleted file mode 100644 index c7dc95c..0000000 --- a/backend/generated/prisma/runtime/wasm-engine-edge.js +++ /dev/null @@ -1,35 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -"use strict";var Xo=Object.create;var It=Object.defineProperty;var Zo=Object.getOwnPropertyDescriptor;var es=Object.getOwnPropertyNames;var ts=Object.getPrototypeOf,rs=Object.prototype.hasOwnProperty;var ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),it=(t,e)=>{for(var r in e)It(t,r,{get:e[r],enumerable:!0})},pn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of es(e))!rs.call(t,i)&&i!==r&&It(t,i,{get:()=>e[i],enumerable:!(n=Zo(e,i))||n.enumerable});return t};var ot=(t,e,r)=>(r=t!=null?Xo(ts(t)):{},pn(e||!t||!t.__esModule?It(r,"default",{value:t,enumerable:!0}):r,t)),ns=t=>pn(It({},"__esModule",{value:!0}),t);function Pr(t,e){if(e=e.toLowerCase(),e==="utf8"||e==="utf-8")return new h(as.encode(t));if(e==="base64"||e==="base64url")return t=t.replace(/-/g,"+").replace(/_/g,"/"),t=t.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(t)].map(r=>r.charCodeAt(0)));if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return new h([...t].map(r=>r.charCodeAt(0)));if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let r=new h(t.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(y=0){return $(y,"offset"),X(y,"offset"),j(y,"offset",this.length-1),new DataView(this.buffer)[r[a]](y,f)},o=(a,f)=>function(y,C=0){let R=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=ss[R];return $(C,"offset"),X(C,"offset"),j(C,"offset",this.length-1),os(y,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](C,y,f),C+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(t[f.replace("Uint","UInt")]=t[f]),f.includes("Float64")&&(t[f.replace("Float64","Double")]=t[f]),f.includes("Float32")&&(t[f.replace("Float32","Float")]=t[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(t[a]=i(f,!1),t[a+"LE"]=i(f,!0),t[a+"BE"]=i(f,!1)),a.startsWith("write")&&(t[a]=o(f,!1),t[a+"LE"]=o(f,!0),t[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function fn(t){throw new Error(`Buffer polyfill does not implement "${t}"`)}function Mt(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`)}function j(t,e,r=cs+1){if(t<0||t>r){let n=new RangeError(`The value of "${e}" is out of range. It must be >= 0 && <= ${r}. Received ${t}`);throw n.code="ERR_OUT_OF_RANGE",n}}function $(t,e){if(typeof t!="number"){let r=new TypeError(`The "${e}" argument must be of type number. Received type ${typeof t}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function X(t,e){if(!Number.isInteger(t)||Number.isNaN(t)){let r=new RangeError(`The value of "${e}" is out of range. It must be an integer. Received ${t}`);throw r.code="ERR_OUT_OF_RANGE",r}}function os(t,e,r,n){if(tn){let i=new RangeError(`The value of "${e}" is out of range. It must be >= ${r} and <= ${n}. Received ${t}`);throw i.code="ERR_OUT_OF_RANGE",i}}function dn(t,e){if(typeof t!="string"){let r=new TypeError(`The "${e}" argument must be of type string. Received type ${typeof t}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function ms(t,e="utf8"){return h.from(t,e)}var h,ss,as,ls,us,cs,b,vr,u=ie(()=>{"use strict";h=class t extends Uint8Array{_isBuffer=!0;get offset(){return this.byteOffset}static alloc(e,r=0,n="utf8"){return dn(n,"encoding"),t.allocUnsafe(e).fill(r,n)}static allocUnsafe(e){return t.from(e)}static allocUnsafeSlow(e){return t.from(e)}static isBuffer(e){return e&&!!e._isBuffer}static byteLength(e,r="utf8"){if(typeof e=="string")return Pr(e,r).byteLength;if(e&&e.byteLength)return e.byteLength;let n=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw n.code="ERR_INVALID_ARG_TYPE",n}static isEncoding(e){return us.includes(e)}static compare(e,r){Mt(e,"buff1"),Mt(r,"buff2");for(let n=0;nr[n])return 1}return e.length===r.length?0:e.length>r.length?1:-1}static from(e,r="utf8"){if(e&&typeof e=="object"&&e.type==="Buffer")return new t(e.data);if(typeof e=="number")return new t(new Uint8Array(e));if(typeof e=="string")return Pr(e,r);if(ArrayBuffer.isView(e)){let{byteOffset:n,byteLength:i,buffer:o}=e;return"map"in e&&typeof e.map=="function"?new t(e.map(s=>s%256),n,i):new t(o,n,i)}if(e&&typeof e=="object"&&("length"in e||"byteLength"in e||"buffer"in e))return new t(e);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(e,r){if(e.length===0)return t.alloc(0);let n=[].concat(...e.map(o=>[...o])),i=t.alloc(r!==void 0?r:n.length);return i.set(r!==void 0?n.slice(0,r):n),i}slice(e=0,r=this.length){return this.subarray(e,r)}subarray(e=0,r=this.length){return Object.setPrototypeOf(super.subarray(e,r),t.prototype)}reverse(){return super.reverse(),this}readIntBE(e,r){$(e,"offset"),X(e,"offset"),j(e,"offset",this.length-1),$(r,"byteLength"),X(r,"byteLength");let n=new DataView(this.buffer,e,r),i=0;for(let o=0;o=0;o--)i.setUint8(o,e&255),e=e/256;return r+n}writeUintBE(e,r,n){return this.writeUIntBE(e,r,n)}writeUIntLE(e,r,n){$(r,"offset"),X(r,"offset"),j(r,"offset",this.length-1),$(n,"byteLength"),X(n,"byteLength");let i=new DataView(this.buffer,r,n);for(let o=0;or===e[n])}copy(e,r=0,n=0,i=this.length){j(r,"targetStart"),j(n,"sourceStart",this.length),j(i,"sourceEnd"),r>>>=0,n>>>=0,i>>>=0;let o=0;for(;n=this.length?this.length-a:e.length),a);return this}includes(e,r=null,n="utf-8"){return this.indexOf(e,r,n)!==-1}lastIndexOf(e,r=null,n="utf-8"){return this.indexOf(e,r,n,!0)}indexOf(e,r=null,n="utf-8",i=!1){let o=i?this.findLastIndex.bind(this):this.findIndex.bind(this);n=typeof r=="string"?r:n;let s=t.from(typeof e=="number"?[e]:e,n),a=typeof r=="string"?0:r;return a=typeof r=="number"?a:null,a=Number.isNaN(a)?null:a,a??=i?this.length:0,a=a<0?this.length+a:a,s.length===0&&i===!1?a>=this.length?this.length:a:s.length===0&&i===!0?(a>=this.length?this.length:a)||this.length:o((f,y)=>(i?y<=a:y>=a)&&this[y]===s[0]&&s.every((R,O)=>this[y+O]===R))}toString(e="utf8",r=0,n=this.length){if(r=r<0?0:r,e=e.toString().toLowerCase(),n<=0)return"";if(e==="utf8"||e==="utf-8")return ls.decode(this.slice(r,n));if(e==="base64"||e==="base64url"){let i=btoa(this.reduce((o,s)=>o+vr(s),""));return e==="base64url"?i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):i}if(e==="binary"||e==="ascii"||e==="latin1"||e==="latin-1")return this.slice(r,n).reduce((i,o)=>i+vr(o&(e==="ascii"?127:255)),"");if(e==="ucs2"||e==="ucs-2"||e==="utf16le"||e==="utf-16le"){let i=new DataView(this.buffer.slice(r,n));return Array.from({length:i.byteLength/2},(o,s)=>s*2+1i+o.toString(16).padStart(2,"0"),"");fn(`encoding "${e}"`)}toLocaleString(){return this.toString()}inspect(){return``}};ss={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},as=new TextEncoder,ls=new TextDecoder,us=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],cs=4294967295;is(h.prototype);b=new Proxy(ms,{construct(t,[e,r]){return h.from(e,r)},get(t,e){return h[e]}}),vr=String.fromCodePoint});var g,x,c=ie(()=>{"use strict";g={nextTick:(t,...e)=>{setTimeout(()=>{t(...e)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"],pid:1e4},{cwd:x}=g});var P,m=ie(()=>{"use strict";P=globalThis.performance??(()=>{let t=Date.now();return{now:()=>Date.now()-t}})()});var E,p=ie(()=>{"use strict";E=()=>{};E.prototype=E});var w,d=ie(()=>{"use strict";w=class{value;constructor(e){this.value=e}deref(){return this.value}}});function bn(t,e){var r,n,i,o,s,a,f,y,C=t.constructor,R=C.precision;if(!t.s||!e.s)return e.s||(e=new C(t)),q?L(e,R):e;if(f=t.d,y=e.d,s=t.e,i=e.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=y.length):(n=y,i=s,a=f.length),s=Math.ceil(R/N),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=y.length,a-o<0&&(o=a,n=y,y=f,f=n),r=0;o;)r=(f[--o]=f[o]+y[o]+r)/J|0,f[o]%=J;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return e.d=f,e.e=i,q?L(e,R):e}function me(t,e,r){if(t!==~~t||tr)throw Error(Ie+t)}function ce(t){var e,r,n,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e16)throw Error(Cr+V(t));if(!t.s)return new C(te);for(e==null?(q=!1,a=R):a=e,s=new C(.03125);t.abs().gte(.1);)t=t.times(s),y+=5;for(n=Math.log(Oe(2,y))/Math.LN10*2+5|0,a+=n,r=i=o=new C(te),C.precision=a;;){if(i=L(i.times(t),a),r=r.times(++f),s=o.plus(be(i,r,a)),ce(s.d).slice(0,a)===ce(o.d).slice(0,a)){for(;y--;)o=L(o.times(o),a);return C.precision=R,e==null?(q=!0,L(o,R)):o}o=s}}function V(t){for(var e=t.e*N,r=t.d[0];r>=10;r/=10)e++;return e}function Tr(t,e,r){if(e>t.LN10.sd())throw q=!0,r&&(t.precision=r),Error(oe+"LN10 precision limit exceeded");return L(new t(t.LN10),e)}function ve(t){for(var e="";t--;)e+="0";return e}function st(t,e){var r,n,i,o,s,a,f,y,C,R=1,O=10,A=t,I=A.d,k=A.constructor,M=k.precision;if(A.s<1)throw Error(oe+(A.s?"NaN":"-Infinity"));if(A.eq(te))return new k(0);if(e==null?(q=!1,y=M):y=e,A.eq(10))return e==null&&(q=!0),Tr(k,y);if(y+=O,k.precision=y,r=ce(I),n=r.charAt(0),o=V(A),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(t),r=ce(A.d),n=r.charAt(0),R++;o=V(A),n>1?(A=new k("0."+r),o++):A=new k(n+"."+r.slice(1))}else return f=Tr(k,y+2,M).times(o+""),A=st(new k(n+"."+r.slice(1)),y-O).plus(f),k.precision=M,e==null?(q=!0,L(A,M)):A;for(a=s=A=be(A.minus(te),A.plus(te),y),C=L(A.times(A),y),i=3;;){if(s=L(s.times(C),y),f=a.plus(be(s,new k(i),y)),ce(f.d).slice(0,y)===ce(a.d).slice(0,y))return a=a.times(2),o!==0&&(a=a.plus(Tr(k,y+2,M).times(o+""))),a=be(a,new k(R),y),k.precision=M,e==null?(q=!0,L(a,M)):a;a=f,i+=2}}function gn(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Ne(r/N),t.d=[],n=(r+1)%N,r<0&&(n+=N),nDt||t.e<-Dt))throw Error(Cr+r)}else t.s=0,t.e=0,t.d=[0];return t}function L(t,e,r){var n,i,o,s,a,f,y,C,R=t.d;for(s=1,o=R[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=N,i=e,y=R[C=0];else{if(C=Math.ceil((n+1)/N),o=R.length,C>=o)return t;for(y=o=R[C],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Oe(10,s-i-1),a=y/o%10|0,f=e<0||R[C+1]!==void 0||y%o,f=r<4?(a||f)&&(r==0||r==(t.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?y/Oe(10,s-i):0:R[C-1])%10&1||r==(t.s<0?8:7))),e<1||!R[0])return f?(o=V(t),R.length=1,e=e-o-1,R[0]=Oe(10,(N-e%N)%N),t.e=Ne(-e/N)||0):(R.length=1,R[0]=t.e=t.s=0),t;if(n==0?(R.length=C,o=1,C--):(R.length=C+1,o=Oe(10,N-n),R[C]=i>0?(y/Oe(10,s-i)%Oe(10,i)|0)*o:0),f)for(;;)if(C==0){(R[0]+=o)==J&&(R[0]=1,++t.e);break}else{if(R[C]+=o,R[C]!=J)break;R[C--]=0,o=1}for(n=R.length;R[--n]===0;)R.pop();if(q&&(t.e>Dt||t.e<-Dt))throw Error(Cr+V(t));return t}function En(t,e){var r,n,i,o,s,a,f,y,C,R,O=t.constructor,A=O.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new O(t),q?L(e,A):e;if(f=t.d,R=e.d,n=e.e,y=t.e,f=f.slice(),s=y-n,s){for(C=s<0,C?(r=f,s=-s,a=R.length):(r=R,n=y,a=f.length),i=Math.max(Math.ceil(A/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=R.length,C=i0;--i)f[a++]=0;for(i=R.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+ve(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ve(-i-1)+o,r&&(n=r-s)>0&&(o+=ve(n))):i>=s?(o+=ve(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ve(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=ve(n))),t.s<0?"-"+o:o}function yn(t,e){if(t.length>e)return t.length=e,!0}function xn(t){var e,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ie+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return gn(s,o.toString())}else if(typeof o!="string")throw Error(Ie+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,ds.test(o))gn(s,o);else throw Error(Ie+o)}if(i.prototype=S,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=xn,i.config=i.set=fs,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Ie+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ie+r+": "+n);return this}var Ue,ps,Rr,q,oe,Ie,Cr,Ne,Oe,ds,te,J,N,hn,Dt,S,be,Rr,_t,Pn=ie(()=>{"use strict";u();c();m();p();d();l();Ue=1e9,ps={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},q=!0,oe="[DecimalError] ",Ie=oe+"Invalid argument: ",Cr=oe+"Exponent out of range: ",Ne=Math.floor,Oe=Math.pow,ds=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,J=1e7,N=7,hn=9007199254740991,Dt=Ne(hn/N),S={};S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};S.comparedTo=S.cmp=function(t){var e,r,n,i,o=this;if(t=new o.constructor(t),o.s!==t.s)return o.s||-t.s;if(o.e!==t.e)return o.e>t.e^o.s<0?1:-1;for(n=o.d.length,i=t.d.length,e=0,r=nt.d[e]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*N;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};S.dividedBy=S.div=function(t){return be(this,new this.constructor(t))};S.dividedToIntegerBy=S.idiv=function(t){var e=this,r=e.constructor;return L(be(e,new r(t),0,1),r.precision)};S.equals=S.eq=function(t){return!this.cmp(t)};S.exponent=function(){return V(this)};S.greaterThan=S.gt=function(t){return this.cmp(t)>0};S.greaterThanOrEqualTo=S.gte=function(t){return this.cmp(t)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(t){return this.cmp(t)<0};S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1};S.logarithm=S.log=function(t){var e,r=this,n=r.constructor,i=n.precision,o=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(te))throw Error(oe+"NaN");if(r.s<1)throw Error(oe+(r.s?"NaN":"-Infinity"));return r.eq(te)?new n(0):(q=!1,e=be(st(r,o),st(t,o),o),q=!0,L(e,i))};S.minus=S.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?En(e,t):bn(e,(t.s=-t.s,t))};S.modulo=S.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(oe+"NaN");return r.s?(q=!1,e=be(r,t,0,1).times(t),q=!0,r.minus(e)):L(new n(r),i)};S.naturalExponential=S.exp=function(){return wn(this)};S.naturalLogarithm=S.ln=function(){return st(this)};S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};S.plus=S.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?bn(e,t):En(e,(t.s=-t.s,t))};S.precision=S.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Ie+t);if(e=V(i)+1,n=i.d.length-1,r=n*N+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};S.squareRoot=S.sqrt=function(){var t,e,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(oe+"NaN")}for(t=V(a),q=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=ce(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Ne((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new f(e)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(be(a,o,s+2)).times(.5),ce(o.d).slice(0,s)===(e=ce(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(L(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(e!="9999")break;s+=4}return q=!0,L(n,r)};S.times=S.mul=function(t){var e,r,n,i,o,s,a,f,y,C=this,R=C.constructor,O=C.d,A=(t=new R(t)).d;if(!C.s||!t.s)return new R(0);for(t.s*=C.s,r=C.e+t.e,f=O.length,y=A.length,f=0;){for(e=0,i=f+n;i>n;)a=o[i]+A[n]*O[i-n-1]+e,o[i--]=a%J|0,e=a/J|0;o[i]=(o[i]+e)%J|0}for(;!o[--s];)o.pop();return e?++r:o.shift(),t.d=o,t.e=r,q?L(t,R.precision):t};S.toDecimalPlaces=S.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(me(t,0,Ue),e===void 0?e=n.rounding:me(e,0,8),L(r,t+V(r)+1,e))};S.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Me(n,!0):(me(t,0,Ue),e===void 0?e=i.rounding:me(e,0,8),n=L(new i(n),t+1,e),r=Me(n,!0,t+1)),r};S.toFixed=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?Me(i):(me(t,0,Ue),e===void 0?e=o.rounding:me(e,0,8),n=L(new o(i),t+V(i)+1,e),r=Me(n.abs(),!1,t+V(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};S.toInteger=S.toint=function(){var t=this,e=t.constructor;return L(new e(t),V(t)+1,e.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(t){var e,r,n,i,o,s,a=this,f=a.constructor,y=12,C=+(t=new f(t));if(!t.s)return new f(te);if(a=new f(a),!a.s){if(t.s<1)throw Error(oe+"Infinity");return a}if(a.eq(te))return a;if(n=f.precision,t.eq(te))return L(a,n);if(e=t.e,r=t.d.length-1,s=e>=r,o=a.s,s){if((r=C<0?-C:C)<=hn){for(i=new f(te),e=Math.ceil(n/N+4),q=!1;r%2&&(i=i.times(a),yn(i.d,e)),r=Ne(r/2),r!==0;)a=a.times(a),yn(a.d,e);return q=!0,t.s<0?new f(te).div(i):L(i,n)}}else if(o<0)throw Error(oe+"NaN");return o=o<0&&t.d[Math.max(e,r)]&1?-1:1,a.s=1,q=!1,i=t.times(st(a,n+y)),q=!0,i=wn(i),i.s=o,i};S.toPrecision=function(t,e){var r,n,i=this,o=i.constructor;return t===void 0?(r=V(i),n=Me(i,r<=o.toExpNeg||r>=o.toExpPos)):(me(t,1,Ue),e===void 0?e=o.rounding:me(e,0,8),i=L(new o(i),t,e),r=V(i),n=Me(i,t<=r||r<=o.toExpNeg,t)),n};S.toSignificantDigits=S.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(me(t,1,Ue),e===void 0?e=n.rounding:me(e,0,8)),L(new n(r),t,e)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=V(t),r=t.constructor;return Me(t,e<=r.toExpNeg||e>=r.toExpPos)};be=function(){function t(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%J|0,s=o/J|0;return s&&n.unshift(s),n}function e(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,y,C,R,O,A,I,k,M,se,z,F,Y,ke,xr,ae,kt,Ot=n.constructor,Yo=n.s==i.s?1:-1,ue=n.d,B=i.d;if(!n.s)return new Ot(n);if(!i.s)throw Error(oe+"Division by zero");for(f=n.e-i.e,ae=B.length,ke=ue.length,A=new Ot(Yo),I=A.d=[],y=0;B[y]==(ue[y]||0);)++y;if(B[y]>(ue[y]||0)&&--f,o==null?z=o=Ot.precision:s?z=o+(V(n)-V(i))+1:z=o,z<0)return new Ot(0);if(z=z/N+2|0,y=0,ae==1)for(C=0,B=B[0],z++;(y1&&(B=t(B,C),ue=t(ue,C),ae=B.length,ke=ue.length),Y=ae,k=ue.slice(0,ae),M=k.length;M=J/2&&++xr;do C=0,a=e(B,k,ae,M),a<0?(se=k[0],ae!=M&&(se=se*J+(k[1]||0)),C=se/xr|0,C>1?(C>=J&&(C=J-1),R=t(B,C),O=R.length,M=k.length,a=e(R,k,O,M),a==1&&(C--,r(R,ae{"use strict";Pn();T=class extends _t{static isDecimal(e){return e instanceof _t}static random(e=20){{let n=globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i,o)=>i+o,"");return new _t(`0.${n.slice(0,e)}`)}}},pe=T});function Es(){return!1}function Ir(){return{dev:0,ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date}}function xs(){return Ir()}function Ps(){return[]}function vs(t){t(null,[])}function Ts(){return""}function Cs(){return""}function Rs(){}function As(){}function Ss(){}function ks(){}function Os(){}function Is(){}function Ms(){}function Ds(){}function _s(){return{close:()=>{},on:()=>{},removeAllListeners:()=>{}}}function Ls(t,e){e(null,Ir())}var Fs,Us,qn,Bn=ie(()=>{"use strict";u();c();m();p();d();l();Fs={},Us={existsSync:Es,lstatSync:Ir,stat:Ls,statSync:xs,readdirSync:Ps,readdir:vs,readlinkSync:Ts,realpathSync:Cs,chmodSync:Rs,renameSync:As,mkdirSync:Ss,rmdirSync:ks,rmSync:Os,unlinkSync:Is,watchFile:Ms,unwatchFile:Ds,watch:_s,promises:Fs},qn=Us});function Ns(...t){return t.join("/")}function qs(...t){return t.join("/")}function Bs(t){let e=$n(t),r=Vn(t),[n,i]=e.split(".");return{root:"/",dir:r,base:e,ext:i,name:n}}function $n(t){let e=t.split("/");return e[e.length-1]}function Vn(t){return t.split("/").slice(0,-1).join("/")}function Vs(t){let e=t.split("/").filter(i=>i!==""&&i!=="."),r=[];for(let i of e)i===".."?r.pop():r.push(i);let n=r.join("/");return t.startsWith("/")?"/"+n:n}var jn,$s,js,Qs,Nt,Qn=ie(()=>{"use strict";u();c();m();p();d();l();jn="/",$s=":";js={sep:jn},Qs={basename:$n,delimiter:$s,dirname:Vn,join:qs,normalize:Vs,parse:Bs,posix:js,resolve:Ns,sep:jn},Nt=Qs});var Jn=Fe((am,Js)=>{Js.exports={name:"@prisma/internals",version:"6.13.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek ",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.5.0",esbuild:"0.25.5","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-engine-wasm":"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var zn=Fe((wp,Hn)=>{"use strict";u();c();m();p();d();l();Hn.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))}});var Zn=Fe((Dp,Xn)=>{"use strict";u();c();m();p();d();l();Xn.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var ti=Fe((Bp,ei)=>{"use strict";u();c();m();p();d();l();var ta=Zn();ei.exports=t=>typeof t=="string"?t.replace(ta(),""):t});var $r=Fe((ih,si)=>{"use strict";u();c();m();p();d();l();si.exports=function(){function t(e,r,n,i,o){return en?n+1:e+1:i===o?r:r+1}return function(e,r){if(e===r)return 0;if(e.length>r.length){var n=e;e=r,r=n}for(var i=e.length,o=r.length;i>0&&e.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{"use strict";u();c();m();p();d();l()});var pi=ie(()=>{"use strict";u();c();m();p();d();l()});var Fi=Fe((ov,Ka)=>{Ka.exports={name:"@prisma/engines-version",version:"6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"361e86d0ea4987e9f53a565309b3eed797a6bcbd"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var sr,Ui=ie(()=>{"use strict";u();c();m();p();d();l();sr=class{events={};on(e,r){return this.events[e]||(this.events[e]=[]),this.events[e].push(r),this}emit(e,...r){return this.events[e]?(this.events[e].forEach(n=>{n(...r)}),!0):!1}}});var Zl={};it(Zl,{DMMF:()=>dt,Debug:()=>G,Decimal:()=>pe,Extensions:()=>Ar,MetricsClient:()=>Ze,PrismaClientInitializationError:()=>D,PrismaClientKnownRequestError:()=>Z,PrismaClientRustPanicError:()=>xe,PrismaClientUnknownRequestError:()=>Q,PrismaClientValidationError:()=>K,Public:()=>Sr,Sql:()=>ee,createParam:()=>Si,defineDmmfProperty:()=>_i,deserializeJsonResponse:()=>Ve,deserializeRawResult:()=>wr,dmmfToRuntimeDataModel:()=>oi,empty:()=>qi,getPrismaClient:()=>Ko,getRuntime:()=>Ae,join:()=>Ni,makeStrictEnum:()=>Ho,makeTypedQueryFactory:()=>Li,objectEnumValues:()=>zt,raw:()=>zr,serializeJsonQuery:()=>nr,skip:()=>rr,sqltag:()=>Yr,warnEnvConflicts:()=>void 0,warnOnce:()=>ct});module.exports=ns(Zl);u();c();m();p();d();l();var Ar={};it(Ar,{defineExtension:()=>vn,getExtensionContext:()=>Tn});u();c();m();p();d();l();u();c();m();p();d();l();function vn(t){return typeof t=="function"?t:e=>e.$extends(t)}u();c();m();p();d();l();function Tn(t){return t}var Sr={};it(Sr,{validator:()=>Cn});u();c();m();p();d();l();u();c();m();p();d();l();function Cn(...t){return e=>e}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var kr,Rn,An,Sn,kn=!0;typeof g<"u"&&({FORCE_COLOR:kr,NODE_DISABLE_COLORS:Rn,NO_COLOR:An,TERM:Sn}=g.env||{},kn=g.stdout&&g.stdout.isTTY);var gs={enabled:!Rn&&An==null&&Sn!=="dumb"&&(kr!=null&&kr!=="0"||kn)};function U(t,e){let r=new RegExp(`\\x1b\\[${e}m`,"g"),n=`\x1B[${t}m`,i=`\x1B[${e}m`;return function(o){return!gs.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Yu=U(0,0),Lt=U(1,22),Ft=U(2,22),Xu=U(3,23),On=U(4,24),Zu=U(7,27),ec=U(8,28),tc=U(9,29),rc=U(30,39),qe=U(31,39),In=U(32,39),Mn=U(33,39),Dn=U(34,39),nc=U(35,39),_n=U(36,39),ic=U(37,39),Ln=U(90,39),oc=U(90,39),sc=U(40,49),ac=U(41,49),lc=U(42,49),uc=U(43,49),cc=U(44,49),mc=U(45,49),pc=U(46,49),dc=U(47,49);u();c();m();p();d();l();var ys=100,Fn=["green","yellow","blue","magenta","cyan","red"],Ut=[],Un=Date.now(),hs=0,Or=typeof g<"u"?g.env:{};globalThis.DEBUG??=Or.DEBUG??"";globalThis.DEBUG_COLORS??=Or.DEBUG_COLORS?Or.DEBUG_COLORS==="true":!0;var at={enable(t){typeof t=="string"&&(globalThis.DEBUG=t)},disable(){let t=globalThis.DEBUG;return globalThis.DEBUG="",t},enabled(t){let e=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=e.some(i=>i===""||i[0]==="-"?!1:t.match(RegExp(i.split("*").join(".*")+"$"))),n=e.some(i=>i===""||i[0]!=="-"?!1:t.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...t)=>{let[e,r,...n]=t;(console.warn??console.log)(`${e} ${r}`,...n)},formatters:{}};function bs(t){let e={color:Fn[hs++%Fn.length],enabled:at.enabled(t),namespace:t,log:at.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=e;if(n.length!==0&&Ut.push([o,...n]),Ut.length>ys&&Ut.shift(),at.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:ws(C)),y=`+${Date.now()-Un}ms`;Un=Date.now(),a(o,...f,y)}};return new Proxy(r,{get:(n,i)=>e[i],set:(n,i,o)=>e[i]=o})}var G=new Proxy(bs,{get:(t,e)=>at[e],set:(t,e,r)=>at[e]=r});function ws(t,e=2){let r=new Set;return JSON.stringify(t,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},e)}function Nn(){Ut.length=0}u();c();m();p();d();l();u();c();m();p();d();l();var Mr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];u();c();m();p();d();l();var Gs=Jn(),Dr=Gs.version;u();c();m();p();d();l();function Be(t){let e=Ws();return e||(t?.config.engineType==="library"?"library":t?.config.engineType==="binary"?"binary":t?.config.engineType==="client"?"client":Ks(t))}function Ws(){let t=g.env.PRISMA_CLIENT_ENGINE_TYPE;return t==="library"?"library":t==="binary"?"binary":t==="client"?"client":void 0}function Ks(t){return t?.previewFeatures.includes("queryCompiler")?"client":"library"}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();function _r(t){return t.name==="DriverAdapterError"&&typeof t.cause=="object"}u();c();m();p();d();l();function qt(t){return{ok:!0,value:t,map(e){return qt(e(t))},flatMap(e){return e(t)}}}function De(t){return{ok:!1,error:t,map(){return De(t)},flatMap(){return De(t)}}}var Gn=G("driver-adapter-utils"),Lr=class{registeredErrors=[];consumeError(e){return this.registeredErrors[e]}registerNewError(e){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:e},r}};var Bt=(t,e=new Lr)=>{let r={adapterName:t.adapterName,errorRegistry:e,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),executeScript:we(e,t.executeScript.bind(t)),dispose:we(e,t.dispose.bind(t)),provider:t.provider,startTransaction:async(...n)=>(await we(e,t.startTransaction.bind(t))(...n)).map(o=>Hs(e,o))};return t.getConnectionInfo&&(r.getConnectionInfo=zs(e,t.getConnectionInfo.bind(t))),r},Hs=(t,e)=>({adapterName:e.adapterName,provider:e.provider,options:e.options,queryRaw:we(t,e.queryRaw.bind(e)),executeRaw:we(t,e.executeRaw.bind(e)),commit:we(t,e.commit.bind(e)),rollback:we(t,e.rollback.bind(e))});function we(t,e){return async(...r)=>{try{return qt(await e(...r))}catch(n){if(Gn("[error@wrapAsync]",n),_r(n))return De(n.cause);let i=t.registerNewError(n);return De({kind:"GenericJs",id:i})}}}function zs(t,e){return(...r)=>{try{return qt(e(...r))}catch(n){if(Gn("[error@wrapSync]",n),_r(n))return De(n.cause);let i=t.registerNewError(n);return De({kind:"GenericJs",id:i})}}}u();c();m();p();d();l();var Wn="prisma+postgres",Kn=`${Wn}:`;function Fr(t){return t?.toString().startsWith(`${Kn}//`)??!1}var ut={};it(ut,{error:()=>Zs,info:()=>Xs,log:()=>Ys,query:()=>ea,should:()=>Yn,tags:()=>lt,warn:()=>Ur});u();c();m();p();d();l();var lt={error:qe("prisma:error"),warn:Mn("prisma:warn"),info:_n("prisma:info"),query:Dn("prisma:query")},Yn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function Ys(...t){console.log(...t)}function Ur(t,...e){Yn.warn()&&console.warn(`${lt.warn} ${t}`,...e)}function Xs(t,...e){console.info(`${lt.info} ${t}`,...e)}function Zs(t,...e){console.error(`${lt.error} ${t}`,...e)}function ea(t,...e){console.log(`${lt.query} ${t}`,...e)}u();c();m();p();d();l();function $t(t,e){if(!t)throw new Error(`${e}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();m();p();d();l();function Ee(t,e){throw new Error(e)}u();c();m();p();d();l();function Nr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}u();c();m();p();d();l();function $e(t,e){let r={};for(let n of Object.keys(t))r[n]=e(t[n],n);return r}u();c();m();p();d();l();function qr(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n{ri.has(t)||(ri.add(t),Ur(e,...r))};var D=class t extends Error{clientVersion;errorCode;retryable;constructor(e,r,n){super(e),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(t)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};re(D,"PrismaClientInitializationError");u();c();m();p();d();l();var Z=class extends Error{code;meta;clientVersion;batchRequestIdx;constructor(e,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(e),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};re(Z,"PrismaClientKnownRequestError");u();c();m();p();d();l();var xe=class extends Error{clientVersion;constructor(e,r){super(e),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};re(xe,"PrismaClientRustPanicError");u();c();m();p();d();l();var Q=class extends Error{clientVersion;batchRequestIdx;constructor(e,{clientVersion:r,batchRequestIdx:n}){super(e),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};re(Q,"PrismaClientUnknownRequestError");u();c();m();p();d();l();var K=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(e,{clientVersion:r}){super(e),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(K,"PrismaClientValidationError");u();c();m();p();d();l();l();function Ve(t){return t===null?t:Array.isArray(t)?t.map(Ve):typeof t=="object"?ra(t)?na(t):t.constructor!==null&&t.constructor.name!=="Object"?t:$e(t,Ve):t}function ra(t){return t!==null&&typeof t=="object"&&typeof t.$type=="string"}function na({$type:t,value:e}){switch(t){case"BigInt":return BigInt(e);case"Bytes":{let{buffer:r,byteOffset:n,byteLength:i}=b.from(e,"base64");return new Uint8Array(r,n,i)}case"DateTime":return new Date(e);case"Decimal":return new pe(e);case"Json":return JSON.parse(e);default:Ee(e,"Unknown tagged value")}}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var de=class{_map=new Map;get(e){return this._map.get(e)?.value}set(e,r){this._map.set(e,{value:r})}getOrCreate(e,r){let n=this._map.get(e);if(n)return n.value;let i=r();return this.set(e,i),i}};u();c();m();p();d();l();function Te(t){return t.substring(0,1).toLowerCase()+t.substring(1)}u();c();m();p();d();l();function ii(t,e){let r={};for(let n of t){let i=n[e];r[i]=n}return r}u();c();m();p();d();l();function mt(t){let e;return{get(){return e||(e={value:t()}),e.value}}}u();c();m();p();d();l();function oi(t){return{models:Br(t.models),enums:Br(t.enums),types:Br(t.types)}}function Br(t){let e={};for(let{name:r,...n}of t)e[r]=n;return e}u();c();m();p();d();l();function je(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function Vt(t){return t.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function Qe(t){return T.isDecimal(t)?!0:t!==null&&typeof t=="object"&&typeof t.s=="number"&&typeof t.e=="number"&&typeof t.toFixed=="function"&&Array.isArray(t.d)}u();c();m();p();d();l();u();c();m();p();d();l();var dt={};it(dt,{ModelAction:()=>pt,datamodelEnumToSchemaEnum:()=>ia});u();c();m();p();d();l();u();c();m();p();d();l();function ia(t){return{name:t.name,values:t.values.map(e=>e.name)}}u();c();m();p();d();l();var pt=(F=>(F.findUnique="findUnique",F.findUniqueOrThrow="findUniqueOrThrow",F.findFirst="findFirst",F.findFirstOrThrow="findFirstOrThrow",F.findMany="findMany",F.create="create",F.createMany="createMany",F.createManyAndReturn="createManyAndReturn",F.update="update",F.updateMany="updateMany",F.updateManyAndReturn="updateManyAndReturn",F.upsert="upsert",F.delete="delete",F.deleteMany="deleteMany",F.groupBy="groupBy",F.count="count",F.aggregate="aggregate",F.findRaw="findRaw",F.aggregateRaw="aggregateRaw",F))(pt||{});var oa=ot(zn());var sa={red:qe,gray:Ln,dim:Ft,bold:Lt,underline:On,highlightSource:t=>t.highlight()},aa={red:t=>t,gray:t=>t,dim:t=>t,bold:t=>t,underline:t=>t,highlightSource:t=>t};function la({message:t,originalMethod:e,isPanic:r,callArguments:n}){return{functionName:`prisma.${e}()`,message:t,isPanic:r??!1,callArguments:n}}function ua({functionName:t,location:e,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=e?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${t}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${t}\``)} invocation${f}`)),e&&a.push(s.underline(ca(e))),i){a.push("");let y=[i.toString()];o&&(y.push(o),y.push(s.dim(")"))),a.push(y.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function ca(t){let e=[t.fileName];return t.lineNumber&&e.push(String(t.lineNumber)),t.columnNumber&&e.push(String(t.columnNumber)),e.join(":")}function jt(t){let e=t.showColors?sa:aa,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(t,e):r=la(t),ua(r,e)}u();c();m();p();d();l();var fi=ot($r());u();c();m();p();d();l();function ui(t,e,r){let n=ci(t),i=ma(n),o=da(i);o?Qt(o,e,r):e.addErrorMessage(()=>"Unknown error")}function ci(t){return t.errors.flatMap(e=>e.kind==="Union"?ci(e):[e])}function ma(t){let e=new Map,r=[];for(let n of t){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=e.get(i);o?e.set(i,{...n,argument:{...n.argument,typeNames:pa(o.argument.typeNames,n.argument.typeNames)}}):e.set(i,n)}return r.push(...e.values()),r}function pa(t,e){return[...new Set(t.concat(e))]}function da(t){return qr(t,(e,r)=>{let n=ai(e),i=ai(r);return n!==i?n-i:li(e)-li(r)})}function ai(t){let e=0;return Array.isArray(t.selectionPath)&&(e+=t.selectionPath.length),Array.isArray(t.argumentPath)&&(e+=t.argumentPath.length),e}function li(t){switch(t.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();m();p();d();l();var ne=class{constructor(e,r){this.name=e;this.value=r}isRequired=!1;makeRequired(){return this.isRequired=!0,this}write(e){let{colors:{green:r}}=e.context;e.addMarginSymbol(r(this.isRequired?"+":"?")),e.write(r(this.name)),this.isRequired||e.write(r("?")),e.write(r(": ")),typeof this.value=="string"?e.write(r(this.value)):e.write(this.value)}};u();c();m();p();d();l();u();c();m();p();d();l();pi();u();c();m();p();d();l();var Je=class{constructor(e=0,r){this.context=r;this.currentIndent=e}lines=[];currentLine="";currentIndent=0;marginSymbol;afterNextNewLineCallback;write(e){return typeof e=="string"?this.currentLine+=e:e.write(this),this}writeJoined(e,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(e){return this.marginSymbol=e,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let e=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+e.slice(1):e}};mi();u();c();m();p();d();l();u();c();m();p();d();l();var Jt=class{constructor(e){this.value=e}write(e){e.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var Gt=t=>t,Wt={bold:Gt,red:Gt,green:Gt,dim:Gt,enabled:!1},di={bold:Lt,red:qe,green:In,dim:Ft,enabled:!0},Ge={write(t){t.writeLine(",")}};u();c();m();p();d();l();var fe=class{constructor(e){this.contents=e}isUnderlined=!1;color=e=>e;underline(){return this.isUnderlined=!0,this}setColor(e){return this.color=e,this}write(e){let r=e.getCurrentLineLength();e.write(this.color(this.contents)),this.isUnderlined&&e.afterNextNewline(()=>{e.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();m();p();d();l();var Ce=class{hasError=!1;markAsError(){return this.hasError=!0,this}};var We=class extends Ce{items=[];addItem(e){return this.items.push(new Jt(e)),this}getField(e){return this.items[e]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(e){if(this.items.length===0){this.writeEmpty(e);return}this.writeWithItems(e)}writeEmpty(e){let r=new fe("[]");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithItems(e){let{colors:r}=e.context;e.writeLine("[").withIndent(()=>e.writeJoined(Ge,this.items).newLine()).write("]"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Ke=class t extends Ce{fields={};suggestions=[];addField(e){this.fields[e.name]=e}addSuggestion(e){this.suggestions.push(e)}getField(e){return this.fields[e]}getDeepField(e){let[r,...n]=e,i=this.getField(r);if(!i)return;let o=i;for(let s of n){let a;if(o.value instanceof t?a=o.value.getField(s):o.value instanceof We&&(a=o.value.getField(Number(s))),!a)return;o=a}return o}getDeepFieldValue(e){return e.length===0?this:this.getDeepField(e)?.value}hasField(e){return!!this.getField(e)}removeAllFields(){this.fields={}}removeField(e){delete this.fields[e]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(e){return this.getField(e)?.value}getDeepSubSelectionValue(e){let r=this;for(let n of e){if(!(r instanceof t))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(e){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of e){let o=n.value.getFieldValue(i);if(!o||!(o instanceof t))return;let s=o.getSelectionParent();if(!s)return;n=s}return n}getSelectionParent(){let e=this.getField("select")?.value.asObject();if(e)return{kind:"select",value:e};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(e){return this.getSelectionParent()?.value.fields[e].value}getPrintWidth(){let e=Object.values(this.fields);return e.length==0?2:Math.max(...e.map(n=>n.getPrintWidth()))+2}write(e){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(e);return}this.writeWithContents(e,r)}asObject(){return this}writeEmpty(e){let r=new fe("{}");this.hasError&&r.setColor(e.context.colors.red).underline(),e.write(r)}writeWithContents(e,r){e.writeLine("{").withIndent(()=>{e.writeJoined(Ge,[...r,...this.suggestions]).newLine()}),e.write("}"),this.hasError&&e.afterNextNewline(()=>{e.writeLine(e.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var W=class extends Ce{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new fe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};u();c();m();p();d();l();var ft=class{fields=[];addField(e,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${e}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(e){let{colors:{green:r}}=e.context;e.writeLine(r("{")).withIndent(()=>{e.writeJoined(Ge,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Qt(t,e,r){switch(t.kind){case"MutuallyExclusiveFields":fa(t,e);break;case"IncludeOnScalar":ga(t,e);break;case"EmptySelection":ya(t,e,r);break;case"UnknownSelectionField":Ea(t,e);break;case"InvalidSelectionValue":xa(t,e);break;case"UnknownArgument":Pa(t,e);break;case"UnknownInputField":va(t,e);break;case"RequiredArgumentMissing":Ta(t,e);break;case"InvalidArgumentType":Ca(t,e);break;case"InvalidArgumentValue":Ra(t,e);break;case"ValueTooLarge":Aa(t,e);break;case"SomeFieldsMissing":Sa(t,e);break;case"TooManyFieldsGiven":ka(t,e);break;case"Union":ui(t,e,r);break;default:throw new Error("not implemented: "+t.kind)}}function fa(t,e){let r=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();r&&(r.getField(t.firstField)?.markAsError(),r.getField(t.secondField)?.markAsError()),e.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${t.firstField}\``)} or ${n.green(`\`${t.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function ga(t,e){let[r,n]=He(t.selectionPath),i=t.outputType,o=e.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ne(s.name,"true"));e.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${gt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function ya(t,e,r){let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){ha(t,e,i);return}if(n.hasField("select")){ba(t,e);return}}if(r?.[Te(t.outputType.name)]){wa(t,e);return}e.addErrorMessage(()=>`Unknown field at "${t.selectionPath.join(".")} selection"`)}function ha(t,e,r){r.removeAllFields();for(let n of t.outputType.fields)r.addSuggestion(new ne(n.name,"false"));e.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(t.outputType.name)}. At least one field must be included in the result`)}function ba(t,e){let r=t.outputType,n=e.arguments.getDeepSelectionParent(t.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),hi(n,r)),e.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${gt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function wa(t,e){let r=new ft;for(let i of t.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ne("omit",r).makeRequired();if(t.selectionPath.length===0)e.arguments.addSuggestion(n);else{let[i,o]=He(t.selectionPath),a=e.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let f=a?.value.asObject()??new Ke;f.addSuggestion(n),a.value=f}}e.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(t.outputType.name)}. At least one field must be included in the result`)}function Ea(t,e){let r=bi(t.selectionPath,e);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":hi(n,t.outputType);break;case"include":Oa(n,t.outputType);break;case"omit":Ia(n,t.outputType);break}}e.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${t.outputType.name}\``)}.`),i.push(gt(n)),i.join(" ")})}function xa(t,e){let r=bi(t.selectionPath,e);r.parentKind!=="unknown"&&r.field.value.markAsError(),e.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${t.underlyingError}`)}function Pa(t,e){let r=t.argumentPath[0],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ma(n,t.arguments)),e.addErrorMessage(i=>gi(i,r,t.arguments.map(o=>o.name)))}function va(t,e){let[r,n]=He(t.argumentPath),i=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(i){i.getDeepField(t.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&wi(o,t.inputType)}e.addErrorMessage(o=>gi(o,n,t.inputType.fields.map(s=>s.name)))}function gi(t,e,r){let n=[`Unknown argument \`${t.red(e)}\`.`],i=_a(e,r);return i&&n.push(`Did you mean \`${t.green(i)}\`?`),r.length>0&&n.push(gt(t)),n.join(" ")}function Ta(t,e){let r;e.addErrorMessage(f=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(!n)return;let[i,o]=He(t.argumentPath),s=new ft,a=n.getDeepFieldValue(i)?.asObject();if(a){if(r=a.getField(o),r&&a.removeField(o),t.inputTypes.length===1&&t.inputTypes[0].kind==="object"){for(let f of t.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new ne(o,s).makeRequired())}else{let f=t.inputTypes.map(yi).join(" | ");a.addSuggestion(new ne(o,f).makeRequired())}if(t.dependentArgumentPath){n.getDeepField(t.dependentArgumentPath)?.markAsError();let[,f]=He(t.dependentArgumentPath);e.addErrorMessage(y=>`Argument \`${y.green(o)}\` is required because argument \`${y.green(f)}\` was provided.`)}}}function yi(t){return t.kind==="list"?`${yi(t.elementType)}[]`:t.name}function Ca(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=Kt("or",t.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(t.inferredType)}.`})}function Ra(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();n&&n.getDeepFieldValue(t.argumentPath)?.markAsError(),e.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(t.underlyingError&&o.push(`: ${t.underlyingError}`),o.push("."),t.argument.typeNames.length>0){let s=Kt("or",t.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Aa(t,e){let r=t.argument.name,n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(t.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}e.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Sa(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(t.argumentPath)?.asObject();i&&wi(i,t.inputType)}e.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1?t.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Kt("or",t.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${t.constraints.minFieldCount}`)} arguments.`),o.push(gt(i)),o.join(" ")})}function ka(t,e){let r=t.argumentPath[t.argumentPath.length-1],n=e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(t.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}e.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(t.inputType.name)} needs`];return t.constraints.minFieldCount===1&&t.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):t.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${t.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Kt("and",i.map(a=>o.red(a)))}. Please choose`),t.constraints.maxFieldCount===1?s.push("one."):s.push(`${t.constraints.maxFieldCount}.`),s.join(" ")})}function hi(t,e){for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,"true"))}function Oa(t,e){for(let r of e.fields)r.isRelation&&!t.hasField(r.name)&&t.addSuggestion(new ne(r.name,"true"))}function Ia(t,e){for(let r of e.fields)!t.hasField(r.name)&&!r.isRelation&&t.addSuggestion(new ne(r.name,"true"))}function Ma(t,e){for(let r of e)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function bi(t,e){let[r,n]=He(t),i=e.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),f=o?.getField(n);return o&&f?{parentKind:"select",parent:o,field:f,fieldName:n}:(f=s?.getField(n),s&&f?{parentKind:"include",field:f,parent:s,fieldName:n}:(f=a?.getField(n),a&&f?{parentKind:"omit",field:f,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function wi(t,e){if(e.kind==="object")for(let r of e.fields)t.hasField(r.name)||t.addSuggestion(new ne(r.name,r.typeNames.join(" | ")))}function He(t){let e=[...t],r=e.pop();if(!r)throw new Error("unexpected empty path");return[e,r]}function gt({green:t,enabled:e}){return"Available options are "+(e?`listed in ${t("green")}`:"marked with ?")+"."}function Kt(t,e){if(e.length===1)return e[0];let r=[...e],n=r.pop();return`${r.join(", ")} ${t} ${n}`}var Da=3;function _a(t,e){let r=1/0,n;for(let i of e){let o=(0,fi.default)(t,i);o>Da||o`}};function ze(t){return t instanceof yt}u();c();m();p();d();l();var Ht=Symbol(),jr=new WeakMap,Pe=class{constructor(e){e===Ht?jr.set(this,`Prisma.${this._getName()}`):jr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return jr.get(this)}},ht=class extends Pe{_getNamespace(){return"NullTypes"}},bt=class extends ht{#e};Qr(bt,"DbNull");var wt=class extends ht{#e};Qr(wt,"JsonNull");var Et=class extends ht{#e};Qr(Et,"AnyNull");var zt={classes:{DbNull:bt,JsonNull:wt,AnyNull:Et},instances:{DbNull:new bt(Ht),JsonNull:new wt(Ht),AnyNull:new Et(Ht)}};function Qr(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0})}u();c();m();p();d();l();var Ei=": ",Yt=class{constructor(e,r){this.name=e;this.value=r}hasError=!1;markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ei.length}write(e){let r=new fe(this.name);this.hasError&&r.underline().setColor(e.context.colors.red),e.write(r).write(Ei).write(this.value)}};var Jr=class{arguments;errorMessages=[];constructor(e){this.arguments=e}write(e){e.write(this.arguments)}addErrorMessage(e){this.errorMessages.push(e)}renderAllMessages(e){return this.errorMessages.map(r=>r(e)).join(` -`)}};function Ye(t){return new Jr(xi(t))}function xi(t){let e=new Ke;for(let[r,n]of Object.entries(t)){let i=new Yt(r,Pi(n));e.addField(i)}return e}function Pi(t){if(typeof t=="string")return new W(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean")return new W(String(t));if(typeof t=="bigint")return new W(`${t}n`);if(t===null)return new W("null");if(t===void 0)return new W("undefined");if(Qe(t))return new W(`new Prisma.Decimal("${t.toFixed()}")`);if(t instanceof Uint8Array)return b.isBuffer(t)?new W(`Buffer.alloc(${t.byteLength})`):new W(`new Uint8Array(${t.byteLength})`);if(t instanceof Date){let e=Vt(t)?t.toISOString():"Invalid Date";return new W(`new Date("${e}")`)}return t instanceof Pe?new W(`Prisma.${t._getName()}`):ze(t)?new W(`prisma.${Te(t.modelName)}.$fields.${t.name}`):Array.isArray(t)?La(t):typeof t=="object"?xi(t):new W(Object.prototype.toString.call(t))}function La(t){let e=new We;for(let r of t)e.addItem(Pi(r));return e}function Xt(t,e){let r=e==="pretty"?di:Wt,n=t.renderAllMessages(r),i=new Je(0,{colors:r}).write(t).toString();return{message:n,args:i}}function Zt({args:t,errors:e,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ye(t);for(let R of e)Qt(R,a,s);let{message:f,args:y}=Xt(a,r),C=jt({message:f,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:y});throw new K(C,{clientVersion:o})}u();c();m();p();d();l();u();c();m();p();d();l();function ge(t){return t.replace(/^./,e=>e.toLowerCase())}u();c();m();p();d();l();function Ti(t,e,r){let n=ge(r);return!e.result||!(e.result.$allModels||e.result[n])?t:Fa({...t,...vi(e.name,t,e.result.$allModels),...vi(e.name,t,e.result[n])})}function Fa(t){let e=new de,r=(n,i)=>e.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),t[n]?t[n].needs.flatMap(o=>r(o,i)):[n]));return $e(t,n=>({...n,needs:r(n.name,new Set)}))}function vi(t,e,r){return r?$e(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Ua(e,o,i)})):{}}function Ua(t,e,r){let n=t?.[e]?.compute;return n?i=>r({...i,[e]:n(i)}):r}function Ci(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(t[n.name])for(let i of n.needs)r[i]=!0;return r}function Ri(t,e){if(!e)return t;let r={...t};for(let n of Object.values(e))if(!t[n.name])for(let i of n.needs)delete r[i];return r}var er=class{constructor(e,r){this.extension=e;this.previous=r}computedFieldsCache=new de;modelExtensionsCache=new de;queryCallbacksCache=new de;clientExtensions=mt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());batchCallbacks=mt(()=>{let e=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?e.concat(r):e});getAllComputedFields(e){return this.computedFieldsCache.getOrCreate(e,()=>Ti(this.previous?.getAllComputedFields(e),this.extension,e))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(e){return this.modelExtensionsCache.getOrCreate(e,()=>{let r=ge(e);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(e):{...this.previous?.getAllModelExtensions(e),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(e,r){return this.queryCallbacksCache.getOrCreate(`${e}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(e,r)??[],i=[],o=this.extension.query;return!o||!(o[e]||o.$allModels||o[r]||o.$allOperations)?n:(o[e]!==void 0&&(o[e][r]!==void 0&&i.push(o[e][r]),o[e].$allOperations!==void 0&&i.push(o[e].$allOperations)),e!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Xe=class t{constructor(e){this.head=e}static empty(){return new t}static single(e){return new t(new er(e))}isEmpty(){return this.head===void 0}append(e){return new t(new er(e,this.head))}getAllComputedFields(e){return this.head?.getAllComputedFields(e)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(e){return this.head?.getAllModelExtensions(e)}getAllQueryCallbacks(e,r){return this.head?.getAllQueryCallbacks(e,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();m();p();d();l();var tr=class{constructor(e){this.name=e}};function Ai(t){return t instanceof tr}function Si(t){return new tr(t)}u();c();m();p();d();l();u();c();m();p();d();l();var ki=Symbol(),xt=class{constructor(e){if(e!==ki)throw new Error("Skip instance can not be constructed directly")}ifUndefined(e){return e===void 0?rr:e}},rr=new xt(ki);function ye(t){return t instanceof xt}var Na={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",updateManyAndReturn:"updateManyAndReturn",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Oi="explicitly `undefined` values are not allowed";function nr({modelName:t,action:e,args:r,runtimeDataModel:n,extensions:i=Xe.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:f,previewFeatures:y,globalOmit:C}){let R=new Gr({runtimeDataModel:n,modelName:t,action:e,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:f,previewFeatures:y,globalOmit:C});return{modelName:t,action:Na[e],query:Pt(r,R)}}function Pt({select:t,include:e,...r}={},n){let i=r.omit;return delete r.omit,{arguments:Mi(r,n),selection:qa(t,e,i,n)}}function qa(t,e,r,n){return t?(e?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),ja(t,n)):Ba(n,e,r)}function Ba(t,e,r){let n={};return t.modelOrType&&!t.isRawAction()&&(n.$composites=!0,n.$scalars=!0),e&&$a(n,e,t),Va(n,r,t),n}function $a(t,e,r){for(let[n,i]of Object.entries(e)){if(ye(i))continue;let o=r.nestSelection(n);if(Wr(i,o),i===!1||i===void 0){t[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){t[n]=Pt(i===!0?{}:i,o);continue}if(i===!0){t[n]=!0;continue}t[n]=Pt(i,o)}}function Va(t,e,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...e},o=Ri(i,n);for(let[s,a]of Object.entries(o)){if(ye(a))continue;Wr(a,r.nestSelection(s));let f=r.findField(s);n?.[s]&&!f||(t[s]=!a)}}function ja(t,e){let r={},n=e.getComputedFields(),i=Ci(t,n);for(let[o,s]of Object.entries(i)){if(ye(s))continue;let a=e.nestSelection(o);Wr(s,a);let f=e.findField(o);if(!(n?.[o]&&!f)){if(s===!1||s===void 0||ye(s)){r[o]=!1;continue}if(s===!0){f?.kind==="object"?r[o]=Pt({},a):r[o]=!0;continue}r[o]=Pt(s,a)}}return r}function Ii(t,e){if(t===null)return null;if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="bigint")return{$type:"BigInt",value:String(t)};if(je(t)){if(Vt(t))return{$type:"DateTime",value:t.toISOString()};e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Ai(t))return{$type:"Param",value:t.name};if(ze(t))return{$type:"FieldRef",value:{_ref:t.name,_container:t.modelName}};if(Array.isArray(t))return Qa(t,e);if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{$type:"Bytes",value:b.from(r,n,i).toString("base64")}}if(Ja(t))return t.values;if(Qe(t))return{$type:"Decimal",value:t.toFixed()};if(t instanceof Pe){if(t!==zt.instances[t._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:t._getName()}}if(Ga(t))return t.toJSON();if(typeof t=="object")return Mi(t,e);e.throwValidationError({kind:"InvalidArgumentValue",selectionPath:e.getSelectionPath(),argumentPath:e.getArgumentPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(t)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Mi(t,e){if(t.$type)return{$type:"Raw",value:t};let r={};for(let n in t){let i=t[n],o=e.nestArgument(n);ye(i)||(i!==void 0?r[n]=Ii(i,o):e.isPreviewFeatureOn("strictUndefinedChecks")&&e.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:e.getSelectionPath(),argument:{name:e.getArgumentName(),typeNames:[]},underlyingError:Oi}))}return r}function Qa(t,e){let r=[];for(let n=0;n({name:e.name,typeName:"boolean",isRelation:e.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(e){return this.params.previewFeatures.includes(e)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(e){return this.modelOrType?.fields.find(r=>r.name===e)}nestSelection(e){let r=this.findField(e),n=r?.kind==="object"?r.type:void 0;return new t({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(e)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Te(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"updateManyAndReturn":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Ee(this.params.action,"Unknown action")}}nestArgument(e){return new t({...this.params,argumentPath:this.params.argumentPath.concat(e)})}};u();c();m();p();d();l();function Di(t){if(!t._hasPreviewFlag("metrics"))throw new K("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:t._clientVersion})}var Ze=class{_client;constructor(e){this._client=e}prometheus(e){return Di(this._client),this._client._engine.metrics({format:"prometheus",...e})}json(e){return Di(this._client),this._client._engine.metrics({format:"json",...e})}};u();c();m();p();d();l();function _i(t,e){let r=mt(()=>Wa(e));Object.defineProperty(t,"dmmf",{get:()=>r.get()})}function Wa(t){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Kr(t){return Object.entries(t).map(([e,r])=>({name:e,...r}))}u();c();m();p();d();l();var Hr=new WeakMap,ir="$$PrismaTypedSql",vt=class{constructor(e,r){Hr.set(this,{sql:e,values:r}),Object.defineProperty(this,ir,{value:ir})}get sql(){return Hr.get(this).sql}get values(){return Hr.get(this).values}};function Li(t){return(...e)=>new vt(t,e)}function or(t){return t!=null&&t[ir]===ir}u();c();m();p();d();l();var Wo=ot(Fi());u();c();m();p();d();l();Ui();Bn();Qn();u();c();m();p();d();l();var ee=class t{constructor(e,r){if(e.length-1!==r.length)throw e.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${e.length} strings to have ${e.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof t?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=e[0];let i=0,o=0;for(;it.getPropertyValue(r))},getPropertyDescriptor(r){return t.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var ar={enumerable:!0,configurable:!0,writable:!0};function lr(t){let e=new Set(t);return{getPrototypeOf:()=>Object.prototype,getOwnPropertyDescriptor:()=>ar,has:(r,n)=>e.has(n),set:(r,n,i)=>e.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...e]}}var Bi=Symbol.for("nodejs.util.inspect.custom");function le(t,e){let r=Ha(e),n=new Set,i=new Proxy(t,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=$i(Reflect.ownKeys(o),r),a=$i(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...ar,...f?.getPropertyDescriptor(s)}:ar:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)},getPrototypeOf:()=>Object.prototype});return i[Bi]=function(){let o={...this};return delete o[Bi],o},i}function Ha(t){let e=new Map;for(let r of t){let n=r.getKeys();for(let i of n)e.set(i,r)}return e}function $i(t,e){return t.filter(r=>e.get(r)?.has?.(r)??!0)}u();c();m();p();d();l();function et(t){return{getKeys(){return t},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function ur(t,e){return{batch:t,transaction:e?.kind==="batch"?{isolationLevel:e.options.isolationLevel}:void 0}}u();c();m();p();d();l();function Vi(t){if(t===void 0)return"";let e=Ye(t);return new Je(0,{colors:Wt}).write(e).toString()}u();c();m();p();d();l();var za="P2037";function cr({error:t,user_facing_error:e},r,n){return e.error_code?new Z(Ya(e,n),{code:e.error_code,clientVersion:r,meta:e.meta,batchRequestIdx:e.batch_request_idx}):new Q(t,{clientVersion:r,batchRequestIdx:e.batch_request_idx})}function Ya(t,e){let r=t.message;return(e==="postgresql"||e==="postgres"||e==="mysql")&&t.error_code===za&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Xr=class{getLocation(){return null}};function Re(t){return typeof $EnabledCallSite=="function"&&t!=="minimal"?new $EnabledCallSite:new Xr}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ji={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function tt(t={}){let e=Za(t);return Object.entries(e).reduce((n,[i,o])=>(ji[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Za(t={}){return typeof t._count=="boolean"?{...t,_count:{_all:t._count}}:t}function mr(t={}){return e=>(typeof t._count=="boolean"&&(e._count=e._count._all),e)}function Qi(t,e){let r=mr(t);return e({action:"aggregate",unpacker:r,argsMapper:tt})(t)}u();c();m();p();d();l();function el(t={}){let{select:e,...r}=t;return typeof e=="object"?tt({...r,_count:e}):tt({...r,_count:{_all:!0}})}function tl(t={}){return typeof t.select=="object"?e=>mr(t)(e)._count:e=>mr(t)(e)._count._all}function Ji(t,e){return e({action:"count",unpacker:tl(t),argsMapper:el})(t)}u();c();m();p();d();l();function rl(t={}){let e=tt(t);if(Array.isArray(e.by))for(let r of e.by)typeof r=="string"&&(e.select[r]=!0);else typeof e.by=="string"&&(e.select[e.by]=!0);return e}function nl(t={}){return e=>(typeof t?._count=="boolean"&&e.forEach(r=>{r._count=r._count._all}),e)}function Gi(t,e){return e({action:"groupBy",unpacker:nl(t),argsMapper:rl})(t)}function Wi(t,e,r){if(e==="aggregate")return n=>Qi(n,r);if(e==="count")return n=>Ji(n,r);if(e==="groupBy")return n=>Gi(n,r)}u();c();m();p();d();l();function Ki(t,e){let r=e.fields.filter(i=>!i.relationName),n=ii(r,"name");return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new yt(t,o,s.type,s.isList,s.kind==="enum")},...lr(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var Hi=t=>Array.isArray(t)?t:t.split("."),Zr=(t,e)=>Hi(e).reduce((r,n)=>r&&r[n],t),zi=(t,e,r)=>Hi(e).reduceRight((n,i,o,s)=>Object.assign({},Zr(t,s.slice(0,o)),{[i]:n}),r);function il(t,e){return t===void 0||e===void 0?[]:[...e,"select",t]}function ol(t,e,r){return e===void 0?t??{}:zi(e,r,t||!0)}function en(t,e,r,n,i,o){let a=t._runtimeDataModel.models[e].fields.reduce((f,y)=>({...f,[y.name]:y}),{});return f=>{let y=Re(t._errorFormat),C=il(n,i),R=ol(f,o,C),O=r({dataPath:C,callsite:y})(R),A=sl(t,e);return new Proxy(O,{get(I,k){if(!A.includes(k))return I[k];let se=[a[k].type,r,k],z=[C,R];return en(t,...se,...z)},...lr([...A,...Object.getOwnPropertyNames(O)])})}}function sl(t,e){return t._runtimeDataModel.models[e].fields.filter(r=>r.kind==="object").map(r=>r.name)}var al=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ll=["aggregate","count","groupBy"];function tn(t,e){let r=t._extensions.getAllModelExtensions(e)??{},n=[ul(t,e),ml(t,e),Tt(r),H("name",()=>e),H("$name",()=>e),H("$parent",()=>t._appliedParent)];return le({},n)}function ul(t,e){let r=ge(e),n=Object.keys(pt).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=a=>f=>{let y=Re(t._errorFormat);return t._createPrismaPromise(C=>{let R={args:f,dataPath:[],action:o,model:e,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:y};return t._request({...R,...a})},{action:o,args:f,model:e})};return al.includes(o)?en(t,e,s):cl(i)?Wi(t,i,s):s({})}}}function cl(t){return ll.includes(t)}function ml(t,e){return _e(H("fields",()=>{let r=t._runtimeDataModel.models[e];return Ki(e,r)}))}u();c();m();p();d();l();function Yi(t){return t.replace(/^./,e=>e.toUpperCase())}var rn=Symbol();function Ct(t){let e=[pl(t),dl(t),H(rn,()=>t),H("$parent",()=>t._appliedParent)],r=t._extensions.getAllClientExtensions();return r&&e.push(Tt(r)),le(t,e)}function pl(t){let e=Object.getPrototypeOf(t._originalClient),r=[...new Set(Object.getOwnPropertyNames(e))];return{getKeys(){return r},getPropertyValue(n){return t[n]}}}function dl(t){let e=Object.keys(t._runtimeDataModel.models),r=e.map(ge),n=[...new Set(e.concat(r))];return _e({getKeys(){return n},getPropertyValue(i){let o=Yi(i);if(t._runtimeDataModel.models[o]!==void 0)return tn(t,o);if(t._runtimeDataModel.models[i]!==void 0)return tn(t,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Xi(t){return t[rn]?t[rn]:t}function Zi(t){if(typeof t=="function")return t(this);if(t.client?.__AccelerateEngine){let r=t.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let e=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(t)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Ct(e)}u();c();m();p();d();l();u();c();m();p();d();l();function eo({result:t,modelName:e,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(e);if(!o)return t;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let y=f.needs.filter(C=>n[C]);y.length>0&&a.push(et(y))}else if(r){if(!r[f.name])continue;let y=f.needs.filter(C=>!r[C]);y.length>0&&a.push(et(y))}fl(t,f.needs)&&s.push(gl(f,le(t,s)))}return s.length>0||a.length>0?le(t,[...s,...a]):t}function fl(t,e){return e.every(r=>Nr(t,r))}function gl(t,e){return _e(H(t.name,()=>t.compute(e)))}u();c();m();p();d();l();function pr({visitor:t,result:e,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(e)){for(let s=0;sC.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let y=typeof s=="object"?s:{};e[o]=pr({visitor:i,result:e[o],args:y,modelName:f.type,runtimeDataModel:n})}}function ro({result:t,modelName:e,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||t==null||typeof t!="object"||!i.models[e]?t:pr({result:t,args:r??{},modelName:e,runtimeDataModel:i,visitor:(a,f,y)=>{let C=ge(f);return eo({result:a,modelName:C,select:y.select,omit:y.select?void 0:{...o?.[C],...y.omit},extensions:n})}})}u();c();m();p();d();l();u();c();m();p();d();l();l();u();c();m();p();d();l();var yl=["$connect","$disconnect","$on","$transaction","$use","$extends"],no=yl;function io(t){if(t instanceof ee)return hl(t);if(or(t))return bl(t);if(Array.isArray(t)){let r=[t[0]];for(let n=1;n{let o=e.customDataProxyFetch;return"transaction"in e&&i!==void 0&&(e.transaction?.kind==="batch"&&e.transaction.lock.then(),e.transaction=i),n===r.length?t._executeRequest(e):r[n]({model:e.model,operation:e.model?e.action:e.clientMethod,args:io(e.args??{}),__internalParams:e,query:(s,a=e)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=co(o,f),a.args=s,so(t,a,r,n+1)}})})}function ao(t,e){let{jsModelName:r,action:n,clientMethod:i}=e,o=r?n:i;if(t._extensions.isEmpty())return t._executeRequest(e);let s=t._extensions.getAllQueryCallbacks(r??"$none",o);return so(t,e,s)}function lo(t){return e=>{let r={requests:e},n=e[0].extensions.getAllBatchQueryCallbacks();return n.length?uo(r,n,0,t):t(r)}}function uo(t,e,r,n){if(r===e.length)return n(t);let i=t.customDataProxyFetch,o=t.requests[0].transaction;return e[r]({args:{queries:t.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:t,query(s,a=t){let f=a.customDataProxyFetch;return a.customDataProxyFetch=co(i,f),uo(a,e,r+1,n)}})}var oo=t=>t;function co(t=oo,e=oo){return r=>t(e(r))}u();c();m();p();d();l();var mo=G("prisma:client"),po={Vercel:"vercel","Netlify CI":"netlify"};function fo({postinstall:t,ciName:e,clientVersion:r}){if(mo("checkPlatformCaching:postinstall",t),mo("checkPlatformCaching:ciName",e),t===!0&&e&&e in po){let n=`Prisma has detected that this project was built on ${e}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${po[e]}-build`;throw console.error(n),new D(n,r)}}u();c();m();p();d();l();function go(t,e){return t?t.datasources?t.datasources:t.datasourceUrl?{[e[0]]:{url:t.datasourceUrl}}:{}:{}}u();c();m();p();d();l();u();c();m();p();d();l();var wl=()=>globalThis.process?.release?.name==="node",El=()=>!!globalThis.Bun||!!globalThis.process?.versions?.bun,xl=()=>!!globalThis.Deno,Pl=()=>typeof globalThis.Netlify=="object",vl=()=>typeof globalThis.EdgeRuntime=="object",Tl=()=>globalThis.navigator?.userAgent==="Cloudflare-Workers";function Cl(){return[[Pl,"netlify"],[vl,"edge-light"],[Tl,"workerd"],[xl,"deno"],[El,"bun"],[wl,"node"]].flatMap(r=>r[0]()?[r[1]]:[]).at(0)??""}var Rl={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ae(){let t=Cl();return{id:t,prettyName:Rl[t]||t,isEdge:["workerd","deno","netlify","edge-light"].includes(t)}}u();c();m();p();d();l();var yo="6.13.0";u();c();m();p();d();l();function dr({inlineDatasources:t,overrideDatasources:e,env:r,clientVersion:n}){let i,o=Object.keys(t)[0],s=t[o]?.url,a=e[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Ae().id==="workerd"?new D(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new D(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new D("error: Missing URL environment variable, value, or override.",n);return i}u();c();m();p();d();l();u();c();m();p();d();l();function ho(t){if(t?.kind==="itx")return t.options.id}u();c();m();p();d();l();var nn,bo={async loadLibrary(t){let{clientVersion:e,adapter:r,engineWasm:n}=t;if(r===void 0)throw new D(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ae().prettyName})`,e);if(n===void 0)throw new D("WASM engine was unexpectedly `undefined`",e);nn===void 0&&(nn=(async()=>{let o=await n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new D("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",e);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a),y=f.exports.__wbindgen_start;return o.__wbg_set_wasm(f.exports),y(),o.QueryEngine})());let i=await nn;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Sl="P2036",he=G("prisma:client:libraryEngine");function kl(t){return t.item_type==="query"&&"query"in t}function Ol(t){return"level"in t?t.level==="error"&&t.message==="PANIC":!1}var BS=[...Mr,"native"],Il=0xffffffffffffffffn,on=1n;function Ml(){let t=on++;return on>Il&&(on=1n),t}var At=class{name="LibraryEngine";engine;libraryInstantiationPromise;libraryStartingPromise;libraryStoppingPromise;libraryStarted;executingQueryPromise;config;QueryEngineConstructor;libraryLoader;library;logEmitter;libQueryEnginePath;binaryTarget;datasourceOverrides;datamodel;logQueries;logLevel;lastQuery;loggerRustPanic;tracingHelper;adapterPromise;versionInfo;constructor(e,r){this.libraryLoader=r??bo,this.config=e,this.libraryStarted=!1,this.logQueries=e.logQueries??!1,this.logLevel=e.logLevel??"error",this.logEmitter=e.logEmitter,this.datamodel=e.inlineSchema,this.tracingHelper=e.tracingHelper,e.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(e.overrideDatasources)[0],i=e.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}wrapEngine(e){return{applyPendingMigrations:e.applyPendingMigrations?.bind(e),commitTransaction:this.withRequestId(e.commitTransaction.bind(e)),connect:this.withRequestId(e.connect.bind(e)),disconnect:this.withRequestId(e.disconnect.bind(e)),metrics:e.metrics?.bind(e),query:this.withRequestId(e.query.bind(e)),rollbackTransaction:this.withRequestId(e.rollbackTransaction.bind(e)),sdlSchema:e.sdlSchema?.bind(e),startTransaction:this.withRequestId(e.startTransaction.bind(e)),trace:e.trace.bind(e),free:e.free?.bind(e)}}withRequestId(e){return async(...r)=>{let n=Ml().toString();try{return await e(...r,n)}finally{if(this.tracingHelper.isEnabled()){let i=await this.engine?.trace(n);if(i){let o=JSON.parse(i);this.tracingHelper.dispatchEngineSpans(o.spans)}}}}}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(e,r,n){await this.start();let i=await this.adapterPromise,o=JSON.stringify(r),s;if(e==="start"){let f=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});s=await this.engine?.startTransaction(f,o)}else e==="commit"?s=await this.engine?.commitTransaction(n.id,o):e==="rollback"&&(s=await this.engine?.rollbackTransaction(n.id,o));let a=this.parseEngineResponse(s);if(Dl(a)){let f=this.getExternalAdapterError(a,i?.errorRegistry);throw f?f.error:new Z(a.message,{code:a.error_code,clientVersion:this.config.clientVersion,meta:a.meta})}else if(typeof a.message=="string")throw new Q(a.message,{clientVersion:this.config.clientVersion});return a}async instantiateLibrary(){if(he("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.tracingHelper.runInChildSpan("load_engine",()=>this.loadEngine()),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(e){if(!e)throw new Q("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(e)}catch{throw new Q("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let e=new w(this);this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(Bt));let r=await this.adapterPromise;r&&he("Using driver adapter: %O",r),this.engine=this.wrapEngine(new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json",enableTracing:this.tracingHelper.isEnabled()},n=>{e.deref()?.logger(n)},r))}catch(e){let r=e,n=this.parseInitError(r.message);throw typeof n=="string"?r:new D(n.message,this.config.clientVersion,n.error_code)}}}logger(e){let r=this.parseEngineResponse(e);r&&(r.level=r?.level.toLowerCase()??"unknown",kl(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Ol(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})))}parseInitError(e){try{return JSON.parse(e)}catch{}return e}parseRequestError(e){try{return JSON.parse(e)}catch{}return e}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(this.libraryInstantiationPromise||(this.libraryInstantiationPromise=this.instantiateLibrary()),await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return he(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let e=async()=>{he("library starting");try{let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,this.adapterPromise||(this.adapterPromise=this.config.adapter?.connect()?.then(Bt)),await this.adapterPromise,he("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new D(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.tracingHelper.runInChildSpan("connect",e),this.libraryStartingPromise}async stop(){if(await this.libraryInstantiationPromise,await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return he("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted){await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0;return}let e=async()=>{await new Promise(n=>setImmediate(n)),he("library stopping");let r={traceparent:this.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.engine?.free&&this.engine.free(),this.engine=void 0,this.libraryStarted=!1,this.libraryStoppingPromise=void 0,this.libraryInstantiationPromise=void 0,await(await this.adapterPromise)?.dispose(),this.adapterPromise=void 0,he("library stopped")};return this.libraryStoppingPromise=this.tracingHelper.runInChildSpan("disconnect",e),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(e){return this.library?.debugPanic(e)}async request(e,{traceparent:r,interactiveTransaction:n}){he(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(e);try{await this.start();let s=await this.adapterPromise;this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],s?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a}}catch(s){if(s instanceof D)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new Q(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(e,{transaction:r,traceparent:n}){he("requestBatch");let i=ur(e,r);await this.start();let o=await this.adapterPromise;this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine?.query(this.lastQuery,JSON.stringify({traceparent:n}),ho(r));let s=await this.executingQueryPromise,a=this.parseEngineResponse(s);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0],o?.errorRegistry):new Q(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});let{batchResult:f,errors:y}=a;if(Array.isArray(f))return f.map(C=>C.errors&&C.errors.length>0?this.loggerRustPanic??this.buildQueryError(C.errors[0],o?.errorRegistry):{data:C});throw y&&y.length===1?new Error(y[0].error):new Error(JSON.stringify(a))}buildQueryError(e,r){e.user_facing_error.is_panic;let n=this.getExternalAdapterError(e.user_facing_error,r);return n?n.error:cr(e,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(e,r){if(e.error_code===Sl&&r){let n=e.meta?.id;$t(typeof n=="number","Malformed external JS error received from the engine");let i=r.consumeError(n);return $t(i,"External error with reported id was not registered"),i}}async metrics(e){await this.start();let r=await this.engine.metrics(JSON.stringify(e));return e.format==="prometheus"?r:this.parseEngineResponse(r)}};function Dl(t){return typeof t=="object"&&t!==null&&t.error_code!==void 0}u();c();m();p();d();l();var St="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",fr=class{constructor(e){this.config=e;this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl,this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload,this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError,this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError,this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError,this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError,this.debug=this.config.accelerateUtils?.debug,this.engineVersion=this.config.accelerateUtils?.engineVersion,this.clientVersion=this.config.accelerateUtils?.clientVersion}name="AccelerateEngine";resolveDatasourceUrl;getBatchRequestPayload;prismaGraphQLToJSError;PrismaClientUnknownRequestError;PrismaClientInitializationError;PrismaClientKnownRequestError;debug;engineVersion;clientVersion;onBeforeExit(e){}async start(){}async stop(){}version(e){return"unknown"}transaction(e,r,n){throw new D(St,this.config.clientVersion)}metrics(e){throw new D(St,this.config.clientVersion)}request(e,r){throw new D(St,this.config.clientVersion)}requestBatch(e,r){throw new D(St,this.config.clientVersion)}applyPendingMigrations(){throw new D(St,this.config.clientVersion)}};u();c();m();p();d();l();function wo({url:t,adapter:e,copyEngine:r,targetBuildType:n}){let i=[],o=[],s=k=>{i.push({_tag:"warning",value:k})},a=k=>{let M=k.join(` -`);o.push({_tag:"error",value:M})},f=!!t?.startsWith("prisma://"),y=Fr(t),C=!!e,R=f||y;!C&&r&&R&&s(["recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)"]);let O=R||!r;C&&(O||n==="edge")&&(n==="edge"?a(["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."]):r?f&&a(["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]):a(["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."]));let A={accelerate:O,ppg:y,driverAdapters:C};function I(k){return k.length>0}return I(o)?{ok:!1,diagnostics:{warnings:i,errors:o},isUsing:A}:{ok:!0,diagnostics:{warnings:i},isUsing:A}}function Eo({copyEngine:t=!0},e){let r;try{r=dr({inlineDatasources:e.inlineDatasources,overrideDatasources:e.overrideDatasources,env:{...e.env,...g.env},clientVersion:e.clientVersion})}catch{}let{ok:n,isUsing:i,diagnostics:o}=wo({url:r,adapter:e.adapter,copyEngine:t,targetBuildType:"wasm-engine-edge"});for(let R of o.warnings)ct(...R.value);if(!n){let R=o.errors[0];throw new K(R.value,{clientVersion:e.clientVersion})}let s=Be(e.generator),a=s==="library",f=s==="binary",y=s==="client",C=(i.accelerate||i.ppg)&&!i.driverAdapters;if(i.accelerate,i.driverAdapters)return new At(e);if(i.accelerate)return new fr(e);{let R=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ae().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new K(R.join(` -`),{clientVersion:e.clientVersion})}return"wasm-engine-edge"}u();c();m();p();d();l();function gr({generator:t}){return t?.previewFeatures??[]}u();c();m();p();d();l();var xo=t=>({command:t});u();c();m();p();d();l();u();c();m();p();d();l();var Po=t=>t.strings.reduce((e,r,n)=>`${e}@P${n}${r}`);u();c();m();p();d();l();l();function rt(t){try{return vo(t,"fast")}catch{return vo(t,"slow")}}function vo(t,e){return JSON.stringify(t.map(r=>Co(r,e)))}function Co(t,e){if(Array.isArray(t))return t.map(r=>Co(r,e));if(typeof t=="bigint")return{prisma__type:"bigint",prisma__value:t.toString()};if(je(t))return{prisma__type:"date",prisma__value:t.toJSON()};if(pe.isDecimal(t))return{prisma__type:"decimal",prisma__value:t.toJSON()};if(b.isBuffer(t))return{prisma__type:"bytes",prisma__value:t.toString("base64")};if(_l(t))return{prisma__type:"bytes",prisma__value:b.from(t).toString("base64")};if(ArrayBuffer.isView(t)){let{buffer:r,byteOffset:n,byteLength:i}=t;return{prisma__type:"bytes",prisma__value:b.from(r,n,i).toString("base64")}}return typeof t=="object"&&e==="slow"?Ro(t):t}function _l(t){return t instanceof ArrayBuffer||t instanceof SharedArrayBuffer?!0:typeof t=="object"&&t!==null?t[Symbol.toStringTag]==="ArrayBuffer"||t[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ro(t){if(typeof t!="object"||t===null)return t;if(typeof t.toJSON=="function")return t.toJSON();if(Array.isArray(t))return t.map(To);let e={};for(let r of Object.keys(t))e[r]=To(t[r]);return e}function To(t){return typeof t=="bigint"?t.toString():Ro(t)}var Ll=/^(\s*alter\s)/i,Ao=G("prisma:client");function sn(t,e,r,n){if(!(t!=="postgresql"&&t!=="cockroachdb")&&r.length>0&&Ll.exec(e))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var an=({clientMethod:t,activeProvider:e})=>r=>{let n="",i;if(or(r))n=r.sql,i={values:rt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:rt(s||[]),__prismaRawParameters__:!0}}else switch(e){case"sqlite":case"mysql":{n=r.sql,i={values:rt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:rt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Po(r),i={values:rt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${e} provider does not support ${t}`)}return i?.values?Ao(`prisma.${t}(${n}, ${i.values})`):Ao(`prisma.${t}(${n})`),{query:n,parameters:i}},So={requestArgsToMiddlewareArgs(t){return[t.strings,...t.values]},middlewareArgsToRequestArgs(t){let[e,...r]=t;return new ee(e,r)}},ko={requestArgsToMiddlewareArgs(t){return[t]},middlewareArgsToRequestArgs(t){return t[0]}};u();c();m();p();d();l();function ln(t){return function(r,n){let i,o=(s=t)=>{try{return s===void 0||s?.kind==="itx"?i??=Oo(r(s)):Oo(r(s))}catch(a){return Promise.reject(a)}};return{get spec(){return n},then(s,a){return o().then(s,a)},catch(s){return o().catch(s)},finally(s){return o().finally(s)},requestTransaction(s){let a=o(s);return a.requestTransaction?a.requestTransaction(s):a},[Symbol.toStringTag]:"PrismaPromise"}}}function Oo(t){return typeof t.then=="function"?t:Promise.resolve(t)}u();c();m();p();d();l();var Fl=Dr.split(".")[0],Ul={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},dispatchEngineSpans(){},getActiveContext(){},runInChildSpan(t,e){return e()}},un=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(e){return this.getGlobalTracingHelper().getTraceParent(e)}dispatchEngineSpans(e){return this.getGlobalTracingHelper().dispatchEngineSpans(e)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(e,r){return this.getGlobalTracingHelper().runInChildSpan(e,r)}getGlobalTracingHelper(){let e=globalThis[`V${Fl}_PRISMA_INSTRUMENTATION`],r=globalThis.PRISMA_INSTRUMENTATION;return e?.helper??r?.helper??Ul}};function Io(){return new un}u();c();m();p();d();l();function Mo(t,e=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--t===0&&r(e()),i?.(n)}}}u();c();m();p();d();l();function Do(t){return typeof t=="string"?t:t.reduce((e,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?e:e&&(r==="info"||e==="info")?"info":n},void 0)}u();c();m();p();d();l();var yr=class{_middlewares=[];use(e){this._middlewares.push(e)}get(e){return this._middlewares[e]}has(e){return!!this._middlewares[e]}length(){return this._middlewares.length}};u();c();m();p();d();l();var Lo=ot(ti());u();c();m();p();d();l();function hr(t){return typeof t.batchRequestIdx=="number"}u();c();m();p();d();l();function _o(t){if(t.action!=="findUnique"&&t.action!=="findUniqueOrThrow")return;let e=[];return t.modelName&&e.push(t.modelName),t.query.arguments&&e.push(cn(t.query.arguments)),e.push(cn(t.query.selection)),e.join("")}function cn(t){return`(${Object.keys(t).sort().map(r=>{let n=t[r];return typeof n=="object"&&n!==null?`(${r} ${cn(n)})`:r}).join(" ")})`}u();c();m();p();d();l();var Nl={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateManyAndReturn:!0,updateOne:!0,upsertOne:!0};function mn(t){return Nl[t]}u();c();m();p();d();l();var br=class{constructor(e){this.options=e;this.batches={}}batches;tickActive=!1;request(e){let r=this.options.batchBy(e);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:e,resolve:n,reject:i})})):this.options.singleLoader(e)}dispatchBatches(){for(let e in this.batches){let r=this.batches[e];delete this.batches[e],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iLe("bigint",r));case"bytes-array":return e.map(r=>Le("bytes",r));case"decimal-array":return e.map(r=>Le("decimal",r));case"datetime-array":return e.map(r=>Le("datetime",r));case"date-array":return e.map(r=>Le("date",r));case"time-array":return e.map(r=>Le("time",r));default:return e}}function wr(t){let e=[],r=ql(t);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(R=>R.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),y=n.some(R=>mn(R.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:$l(o),containsWrite:y,customDataProxyFetch:i})).map((R,O)=>{if(R instanceof Error)return R;try{return this.mapQueryEngineResult(n[O],R)}catch(A){return A}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Fo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:mn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:_o(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(e){try{return await this.dataloader.request(e)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=e;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:e.globalOmit})}}mapQueryEngineResult({dataPath:e,unpacker:r},n){let i=n?.data,o=this.unpack(i,e,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:o}:o}handleAndLogRequestError(e){try{this.handleRequestError(e)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:e.clientMethod,timestamp:new Date}),r}}handleRequestError({error:e,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Bl(e),Vl(e,i))throw e;if(e instanceof Z&&jl(e)){let y=Uo(e.meta);Zt({args:o,errors:[y],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let f=e.message;if(n&&(f=jt({callsite:n,originalMethod:r,isPanic:e.isPanic,showColors:this.client._errorFormat==="pretty",message:f})),f=this.sanitizeMessage(f),e.code){let y=s?{modelName:s,...e.meta}:e.meta;throw new Z(f,{code:e.code,clientVersion:this.client._clientVersion,meta:y,batchRequestIdx:e.batchRequestIdx})}else{if(e.isPanic)throw new xe(f,this.client._clientVersion);if(e instanceof Q)throw new Q(f,{clientVersion:this.client._clientVersion,batchRequestIdx:e.batchRequestIdx});if(e instanceof D)throw new D(f,this.client._clientVersion);if(e instanceof xe)throw new xe(f,this.client._clientVersion)}throw e.clientVersion=this.client._clientVersion,e}sanitizeMessage(e){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Lo.default)(e):e}unpack(e,r,n){if(!e||(e.data&&(e=e.data),!e))return e;let i=Object.keys(e)[0],o=Object.values(e)[0],s=r.filter(y=>y!=="select"&&y!=="include"),a=Zr(o,s),f=i==="queryRaw"?wr(a):Ve(a);return n?n(f):f}get[Symbol.toStringTag](){return"RequestHandler"}};function $l(t){if(t){if(t.kind==="batch")return{kind:"batch",options:{isolationLevel:t.isolationLevel}};if(t.kind==="itx")return{kind:"itx",options:Fo(t)};Ee(t,"Unknown transaction kind")}}function Fo(t){return{id:t.id,payload:t.payload}}function Vl(t,e){return hr(t)&&e?.kind==="batch"&&t.batchRequestIdx!==e.index}function jl(t){return t.code==="P2009"||t.code==="P2012"}function Uo(t){if(t.kind==="Union")return{kind:"Union",errors:t.errors.map(Uo)};if(Array.isArray(t.selectionPath)){let[,...e]=t.selectionPath;return{...t,selectionPath:e}}return t}u();c();m();p();d();l();var No=yo;u();c();m();p();d();l();var jo=ot($r());u();c();m();p();d();l();var _=class extends Error{constructor(e){super(e+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};re(_,"PrismaClientConstructorValidationError");var qo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Bo=["pretty","colorless","minimal"],$o=["info","query","warn","error"],Ql={datasources:(t,{datasourceNames:e})=>{if(t){if(typeof t!="object"||Array.isArray(t))throw new _(`Invalid value ${JSON.stringify(t)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(t)){if(!e.includes(r)){let i=nt(r,e)||` Available datasources: ${e.join(", ")}`;throw new _(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new _(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new _(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new _(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(t,e)=>{if(!t&&Be(e.generator)==="client")throw new _('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.');if(t===null)return;if(t===void 0)throw new _('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!gr(e).includes("driverAdapters"))throw new _('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Be(e.generator)==="binary")throw new _('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:t=>{if(typeof t<"u"&&typeof t!="string")throw new _(`Invalid value ${JSON.stringify(t)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:t=>{if(t){if(typeof t!="string")throw new _(`Invalid value ${JSON.stringify(t)} for "errorFormat" provided to PrismaClient constructor.`);if(!Bo.includes(t)){let e=nt(t,Bo);throw new _(`Invalid errorFormat ${t} provided to PrismaClient constructor.${e}`)}}},log:t=>{if(!t)return;if(!Array.isArray(t))throw new _(`Invalid value ${JSON.stringify(t)} for "log" provided to PrismaClient constructor.`);function e(r){if(typeof r=="string"&&!$o.includes(r)){let n=nt(r,$o);throw new _(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of t){e(r);let n={level:e,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=nt(i,o);throw new _(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new _(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:t=>{if(!t)return;let e=t.maxWait;if(e!=null&&e<=0)throw new _(`Invalid value ${e} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=t.timeout;if(r!=null&&r<=0)throw new _(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(t,e)=>{if(typeof t!="object")throw new _('"omit" option is expected to be an object.');if(t===null)throw new _('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(t)){let o=Gl(n,e.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let f=o.fields.find(y=>y.name===s);if(!f){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(f.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new _(Wl(t,r))},__internal:t=>{if(!t)return;let e=["debug","engine","configOverride"];if(typeof t!="object")throw new _(`Invalid value ${JSON.stringify(t)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(t))if(!e.includes(r)){let n=nt(r,e);throw new _(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Qo(t,e){for(let[r,n]of Object.entries(t)){if(!qo.includes(r)){let i=nt(r,qo);throw new _(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Ql[r](n,e)}if(t.datasourceUrl&&t.datasources)throw new _('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function nt(t,e){if(e.length===0||typeof t!="string")return"";let r=Jl(t,e);return r?` Did you mean "${r}"?`:""}function Jl(t,e){if(e.length===0)return null;let r=e.map(i=>({value:i,distance:(0,jo.default)(t,i)}));r.sort((i,o)=>i.distanceTe(n)===e);if(r)return t[r]}function Wl(t,e){let r=Ye(t);for(let o of e)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Xt(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}u();c();m();p();d();l();function Jo(t){return t.length===0?Promise.resolve([]):new Promise((e,r)=>{let n=new Array(t.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===t.length&&(o=!0,i?r(i):e(n)))},f=y=>{o||(o=!0,r(y))};for(let y=0;y{n[y]=C,a()},C=>{if(!hr(C)){f(C);return}C.batchRequestIdx===y?f(C):(i||(i=C),a())})})}var Se=G("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Kl={requestArgsToMiddlewareArgs:t=>t,middlewareArgsToRequestArgs:t=>t},Hl=Symbol.for("prisma.client.transaction.id"),zl={id:0,nextId(){return++this.id}};function Ko(t){class e{_originalClient=this;_runtimeDataModel;_requestHandler;_connectionPromise;_disconnectionPromise;_engineConfig;_accelerateEngineConfig;_clientVersion;_errorFormat;_tracingHelper;_middlewares=new yr;_previewFeatures;_activeProvider;_globalOmit;_extensions;_engine;_appliedParent;_createPrismaPromise=ln();constructor(n){t=n?.__internal?.configOverride?.(t)??t,fo(t),n&&Qo(n,t);let i=new sr().on("error",()=>{});this._extensions=Xe.empty(),this._previewFeatures=gr(t),this._clientVersion=t.clientVersion??No,this._activeProvider=t.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Io();let o=t.relativeEnvPaths&&{rootEnvPath:t.relativeEnvPaths.rootEnvPath&&Nt.resolve(t.dirname,t.relativeEnvPaths.rootEnvPath),schemaEnvPath:t.relativeEnvPaths.schemaEnvPath&&Nt.resolve(t.dirname,t.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=n.adapter;let f=t.activeProvider==="postgresql"||t.activeProvider==="cockroachdb"?"postgres":t.activeProvider;if(s.provider!==f)throw new D(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new D("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=t.injectableEdgeEnv?.();try{let f=n??{},y=f.__internal??{},C=y.debug===!0;C&&G.enable("prisma:client");let R=Nt.resolve(t.dirname,t.relativePath);qn.existsSync(R)||(R=t.dirname),Se("dirname",t.dirname),Se("relativePath",t.relativePath),Se("cwd",R);let O=y.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=t.runtimeDataModel,this._engineConfig={cwd:R,dirname:t.dirname,enableDebugLogs:C,allowTriggerPanic:O.allowTriggerPanic,prismaPath:O.binaryPath??void 0,engineEndpoint:O.endpoint,generator:t.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&Do(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(A=>typeof A=="string"?A==="query":A.level==="query")),env:a?.parsed??{},flags:[],engineWasm:t.engineWasm,compilerWasm:t.compilerWasm,clientVersion:t.clientVersion,engineVersion:t.engineVersion,previewFeatures:this._previewFeatures,activeProvider:t.activeProvider,inlineSchema:t.inlineSchema,overrideDatasources:go(f,t.datasourceNames),inlineDatasources:t.inlineDatasources,inlineSchemaHash:t.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:i,isBundled:t.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:dr,getBatchRequestPayload:ur,prismaGraphQLToJSError:cr,PrismaClientUnknownRequestError:Q,PrismaClientInitializationError:D,PrismaClientKnownRequestError:Z,debug:G("prisma:client:accelerateEngine"),engineVersion:Wo.version,clientVersion:t.clientVersion}},Se("clientVersion",t.clientVersion),this._engine=Eo(t,this._engineConfig),this._requestHandler=new Er(this,i),f.log)for(let A of f.log){let I=typeof A=="string"?A:A.emit==="stdout"?A.level:null;I&&this.$on(I,k=>{ut.log(`${ut.tags[I]??""}`,k.message||k.query)})}}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=Ct(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){return n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i),this}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Nn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:an({clientMethod:i,activeProvider:a}),callsite:Re(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Go(n,i);return sn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new K("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(sn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(t.activeProvider!=="mongodb")throw new K(`The ${t.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:xo,callsite:Re(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:an({clientMethod:i,activeProvider:a}),callsite:Re(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Go(n,i));throw new K("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new K("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=zl.nextId(),s=Mo(n.length),a=n.map((f,y)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let C=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,R={kind:"batch",id:o,index:y,isolationLevel:C,lock:s};return f.requestTransaction?.(R)??f});return Jo(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let y={kind:"itx",...a};f=await n(this._createItxClient(y)),await this._engine.transaction("commit",o,a)}catch(y){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),y}return f}_createItxClient(n){return le(Ct(le(Xi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>ln(n)),H(Hl,()=>n.id)])),[et(no)])}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Kl,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,f=async y=>{let C=this._middlewares.get(++a);if(C)return this._tracingHelper.runInChildSpan(s.middleware,M=>C(y,se=>(M?.end(),f(se))));let{runInTransaction:R,args:O,...A}=y,I={...n,...A};O&&(I.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&R===!1&&delete I.transaction;let k=await ao(this,I);return I.model?ro({result:k,modelName:I.model,args:I.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>f(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:y,transaction:C,unpacker:R,otelParentCtx:O,customDataProxyFetch:A}){try{n=y?y(n):n;let I={name:"serialize"},k=this._tracingHelper.runInChildSpan(I,()=>nr({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return G.enabled("prisma:client")&&(Se("Prisma Client call:"),Se(`prisma.${i}(${Vi(n)})`),Se("Generated request:"),Se(JSON.stringify(k,null,2)+` -`)),C?.kind==="batch"&&await C.lock,this._requestHandler.request({protocolQuery:k,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:C,unpacker:R,otelParentCtx:O,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:A})}catch(I){throw I.clientVersion=this._clientVersion,I}}$metrics=new Ze(this);_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}$extends=Zi}return e}function Go(t,e){return Yl(t)?[new ee(t,e),So]:[t,ko]}function Yl(t){return Array.isArray(t)&&Array.isArray(t.raw)}u();c();m();p();d();l();var Xl=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ho(t){return new Proxy(t,{get(e,r){if(r in e)return e[r];if(!Xl.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();m();p();d();l();l();0&&(module.exports={DMMF,Debug,Decimal,Extensions,MetricsClient,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,createParam,defineDmmfProperty,deserializeJsonResponse,deserializeRawResult,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=wasm-engine-edge.js.map diff --git a/backend/generated/prisma/schema.prisma b/backend/generated/prisma/schema.prisma deleted file mode 100644 index 74ceda7..0000000 --- a/backend/generated/prisma/schema.prisma +++ /dev/null @@ -1,327 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -generator client { - provider = "prisma-client-js" - output = "../generated/prisma" -} - -datasource db { - provider = "postgresql" - url = env("DATABASE_URL") -} - -model Admin { - id Int @id @default(autoincrement()) - email String @unique - password String - name String - role String @default("admin") - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - schemeServices SchemeService[] - certificateServices CertificateService[] - contactServices ContactService[] -} - -model SchemeService { - id Int @id @default(autoincrement()) - name String - summary String - type String? - targetAudience String[] - applicationMode String - onlineUrl String? - offlineAddress String? - status String @default("draft") // draft, pending, published - isActive Boolean @default(true) // Admin dashboard control - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - // Admin relation - adminId Int - admin Admin @relation(fields: [adminId], references: [id]) - - // Extended details - eligibilityDetails String[] - schemeDetails String[] - processDetails String[] - - // Process flows - processNew String? - processUpdate String? - processLost String? - processSurrender String? - - // Document requirements - docNew String? - docUpdate String? - docLost String? - docSurrender String? - - // Related entities - contacts ContactPerson[] - documents SupportiveDocument[] -} - -model ContactPerson { - id Int @id @default(autoincrement()) - serviceName String - district String - subDistrict String - block String - name String - designation String - contact String - email String - - schemeServiceId Int - schemeService SchemeService @relation(fields: [schemeServiceId], references: [id], onDelete: Cascade) -} - -model SupportiveDocument { - id Int @id @default(autoincrement()) - slNo Int - documentType String - validProof String - isRequired Boolean @default(true) - - schemeServiceId Int - schemeService SchemeService @relation(fields: [schemeServiceId], references: [id], onDelete: Cascade) -} - -model CertificateService { - id Int @id @default(autoincrement()) - name String - summary String - type String? - targetAudience String[] - applicationMode String - onlineUrl String? - offlineAddress String? - status String @default("draft") // draft, pending, published - isActive Boolean @default(true) // Admin dashboard control - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - // Admin relation - adminId Int - admin Admin @relation(fields: [adminId], references: [id]) - - // Extended details - eligibilityDetails String[] - certificateDetails String[] - processDetails String[] - - // Process flows - processNew String? - processUpdate String? - processLost String? - processSurrender String? - - // Document requirements - docNew String? - docUpdate String? - docLost String? - docSurrender String? - - // Related entities - contacts CertificateContact[] - documents CertificateDocument[] - processSteps CertificateProcessStep[] - eligibilityItems CertificateEligibility[] -} - -model CertificateContact { - id Int @id @default(autoincrement()) - serviceName String - district String - subDistrict String - block String - name String - designation String - contact String - email String - applicationType String @default("New Application") // New Application, Lost Application, etc. - - certificateServiceId Int - certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade) -} - -model CertificateDocument { - id Int @id @default(autoincrement()) - slNo Int - documentType String - validProof String - isRequired Boolean @default(true) - applicationType String @default("New Application") // New Application, Lost Application, etc. - - certificateServiceId Int - certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade) -} - -model CertificateProcessStep { - id Int @id @default(autoincrement()) - slNo Int - stepDetails String - applicationType String @default("New Application") // New Application, Lost Application, etc. - - certificateServiceId Int - certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade) -} - -model CertificateEligibility { - id Int @id @default(autoincrement()) - eligibilityDetail String - applicationType String @default("New Application") // New Application, Lost Application, etc. - - certificateServiceId Int - certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade) -} - -model ContactService { - id Int @id @default(autoincrement()) - name String - summary String - type String? - targetAudience String[] - applicationMode String - onlineUrl String? - offlineAddress String? - status String @default("draft") // draft, pending, published - isActive Boolean @default(true) // Admin dashboard control - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - // Admin relation - adminId Int - admin Admin @relation(fields: [adminId], references: [id]) - - // Extended details - eligibilityDetails String[] - contactDetails String[] - processDetails String[] - - // Process flows - processNew String? - processUpdate String? - processLost String? - processSurrender String? - - // Document requirements - docNew String? - docUpdate String? - docLost String? - docSurrender String? - - // Related entities - contacts ContactServiceContact[] - documents ContactServiceDocument[] -} - -model ContactServiceContact { - id Int @id @default(autoincrement()) - serviceName String - district String - subDistrict String - block String - name String - designation String - contact String - email String - - contactServiceId Int - contactService ContactService @relation(fields: [contactServiceId], references: [id], onDelete: Cascade) - - // Related entities for office management - posts Post[] -} - -model ContactServiceDocument { - id Int @id @default(autoincrement()) - slNo Int - documentType String - validProof String - isRequired Boolean @default(true) - - contactServiceId Int - contactService ContactService @relation(fields: [contactServiceId], references: [id], onDelete: Cascade) -} - -model Post { - id Int @id @default(autoincrement()) - postName String // Changed from 'title' to match frontend - rank String // Changed from 'level' to match frontend - description String? - department String? - status String @default("active") // active, inactive - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - // Office relation - officeId Int - office ContactServiceContact @relation(fields: [officeId], references: [id], onDelete: Cascade) - - // Related entities - employees Employee[] -} - -model Employee { - id Int @id @default(autoincrement()) - name String - email String - phone String - designation String - employeeId String? // Employee ID/Number (optional) - joiningDate DateTime? - salary Float? - status String @default("active") // active, inactive, on_leave - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - // Post relation - postId Int - post Post @relation(fields: [postId], references: [id], onDelete: Cascade) -} - -model Feedback { - id Int @id @default(autoincrement()) - name String - email String - phone String? - subject String - message String - rating Int? // 1-5 star rating (optional) - category String? // General, Service, Technical, etc. - status String @default("new") // new, resolved - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - resolvedAt DateTime? - resolvedBy String? // Admin name who resolved it - adminNotes String? // Internal notes by admin -} - -model Grievance { - id Int @id @default(autoincrement()) - name String - email String - phone String - address String - subject String - description String - category String? // Service Related, Technical, Policy, etc. - priority String @default("medium") // low, medium, high, urgent - status String @default("new") // new, pending, solved - attachments String[] // File paths or URLs - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - // Admin tracking - assignedTo String? // Admin name who is handling - adminNotes String? // Internal notes by admin - resolvedAt DateTime? - - // Tracking information - trackingId String @unique // Unique tracking ID for users -} diff --git a/backend/generated/prisma/wasm.d.ts b/backend/generated/prisma/wasm.d.ts deleted file mode 100644 index bc20c6c..0000000 --- a/backend/generated/prisma/wasm.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./index" \ No newline at end of file diff --git a/backend/generated/prisma/wasm.js b/backend/generated/prisma/wasm.js deleted file mode 100644 index 8421acf..0000000 --- a/backend/generated/prisma/wasm.js +++ /dev/null @@ -1,425 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum, - Public, - getRuntime, - skip -} = require('./runtime/index-browser.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 6.13.0 - * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd - */ -Prisma.prismaVersion = { - client: "6.13.0", - engine: "361e86d0ea4987e9f53a565309b3eed797a6bcbd" -} - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' -}); - -exports.Prisma.AdminScalarFieldEnum = { - id: 'id', - email: 'email', - password: 'password', - name: 'name', - role: 'role', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SchemeServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - schemeDetails: 'schemeDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.ContactPersonScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - schemeServiceId: 'schemeServiceId' -}; - -exports.Prisma.SupportiveDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - schemeServiceId: 'schemeServiceId' -}; - -exports.Prisma.CertificateServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - certificateDetails: 'certificateDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.CertificateContactScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateProcessStepScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - stepDetails: 'stepDetails', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.CertificateEligibilityScalarFieldEnum = { - id: 'id', - eligibilityDetail: 'eligibilityDetail', - applicationType: 'applicationType', - certificateServiceId: 'certificateServiceId' -}; - -exports.Prisma.ContactServiceScalarFieldEnum = { - id: 'id', - name: 'name', - summary: 'summary', - type: 'type', - targetAudience: 'targetAudience', - applicationMode: 'applicationMode', - onlineUrl: 'onlineUrl', - offlineAddress: 'offlineAddress', - status: 'status', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - adminId: 'adminId', - eligibilityDetails: 'eligibilityDetails', - contactDetails: 'contactDetails', - processDetails: 'processDetails', - processNew: 'processNew', - processUpdate: 'processUpdate', - processLost: 'processLost', - processSurrender: 'processSurrender', - docNew: 'docNew', - docUpdate: 'docUpdate', - docLost: 'docLost', - docSurrender: 'docSurrender' -}; - -exports.Prisma.ContactServiceContactScalarFieldEnum = { - id: 'id', - serviceName: 'serviceName', - district: 'district', - subDistrict: 'subDistrict', - block: 'block', - name: 'name', - designation: 'designation', - contact: 'contact', - email: 'email', - contactServiceId: 'contactServiceId' -}; - -exports.Prisma.ContactServiceDocumentScalarFieldEnum = { - id: 'id', - slNo: 'slNo', - documentType: 'documentType', - validProof: 'validProof', - isRequired: 'isRequired', - contactServiceId: 'contactServiceId' -}; - -exports.Prisma.PostScalarFieldEnum = { - id: 'id', - postName: 'postName', - rank: 'rank', - description: 'description', - department: 'department', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - officeId: 'officeId' -}; - -exports.Prisma.EmployeeScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - designation: 'designation', - employeeId: 'employeeId', - joiningDate: 'joiningDate', - salary: 'salary', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - postId: 'postId' -}; - -exports.Prisma.FeedbackScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - subject: 'subject', - message: 'message', - rating: 'rating', - category: 'category', - status: 'status', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - resolvedAt: 'resolvedAt', - resolvedBy: 'resolvedBy', - adminNotes: 'adminNotes' -}; - -exports.Prisma.GrievanceScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - phone: 'phone', - address: 'address', - subject: 'subject', - description: 'description', - category: 'category', - priority: 'priority', - status: 'status', - attachments: 'attachments', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - assignedTo: 'assignedTo', - adminNotes: 'adminNotes', - resolvedAt: 'resolvedAt', - trackingId: 'trackingId' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - Admin: 'Admin', - SchemeService: 'SchemeService', - ContactPerson: 'ContactPerson', - SupportiveDocument: 'SupportiveDocument', - CertificateService: 'CertificateService', - CertificateContact: 'CertificateContact', - CertificateDocument: 'CertificateDocument', - CertificateProcessStep: 'CertificateProcessStep', - CertificateEligibility: 'CertificateEligibility', - ContactService: 'ContactService', - ContactServiceContact: 'ContactServiceContact', - ContactServiceDocument: 'ContactServiceDocument', - Post: 'Post', - Employee: 'Employee', - Feedback: 'Feedback', - Grievance: 'Grievance' -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message - const runtime = getRuntime() - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` - - throw new Error(message) - } - }) - } -} - -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma) diff --git a/backend/index.ts b/backend/index.ts index 6f3ef1f..fd0fabb 100644 --- a/backend/index.ts +++ b/backend/index.ts @@ -1,11 +1,24 @@ +import dotenv from "dotenv"; +dotenv.config(); // Must be first — modules read env vars at import time + import express from "express"; import cors from "cors"; -import dotenv from "dotenv"; +import helmet from "helmet"; +import compression from "compression"; +import cookieParser from "cookie-parser"; import path from "path"; -import { PrismaClient } from "@prisma/client"; +import { prisma, queryCache } from "./lib/prisma"; + +// Import middleware +import { globalLimiter, apiLimiter } from "./middleware/rateLimiter"; +import { errorHandler, sanitizeInput } from "./middleware/errorHandler"; // Import routes import adminAuthRoutes from "./routes/adminAuth"; +import departmentRoutes from "./routes/departments"; +import adminManagementRoutes from "./routes/adminManagement"; +import auditLogRoutes from "./routes/auditLogs"; +import notificationRoutes from "./routes/notifications"; import schemeServiceRoutes from "./routes/schemeService"; import certificateServiceRoutes from "./routes/certificateService"; import contactServiceRoutes from "./routes/contactService"; @@ -13,105 +26,206 @@ import officeManagementRoutes from "./routes/officeManagement"; import feedbackRoutes from "./routes/feedback"; import grievanceRoutes from "./routes/grievance"; -dotenv.config(); - const app = express(); -const prisma = new PrismaClient(); + +// Trust the first proxy (Render load balancer) to ensure correct IP resolution for rate limiting +app.set("trust proxy", 1); + const PORT = process.env.PORT || 3001; -// Middleware +// ─── Performance: Response Compression ─── app.use( - cors({ - origin: [ - process.env.FRONTEND_URL || "http://localhost:5173", + compression({ + level: 6, // Balanced speed vs compression ratio + threshold: 1024, // Only compress responses > 1KB + filter: (req, res) => { + if (req.headers["x-no-compression"]) return false; + return compression.filter(req, res); + }, + }), +); + +// ─── Security Middleware ─── +app.use( + helmet({ + contentSecurityPolicy: { + directives: { + defaultSrc: ["'self'"], + scriptSrc: ["'self'"], + styleSrc: ["'self'", "'unsafe-inline'", "https://fonts.googleapis.com"], + imgSrc: ["'self'", "data:", "https:"], + fontSrc: ["'self'", "https://fonts.gstatic.com"], + connectSrc: ["'self'"], + }, + }, + crossOriginEmbedderPolicy: false, + crossOriginResourcePolicy: { policy: "cross-origin" }, + // Additional security headers + hsts: { + maxAge: 31536000, + includeSubDomains: true, + preload: true, + }, + referrerPolicy: { policy: "strict-origin-when-cross-origin" }, + }), +); + +// ─── CORS Configuration ─── +const allowedOrigins = [ + process.env.FRONTEND_URL || "http://localhost:5173", + ...(process.env.NODE_ENV !== "production" + ? [ + "http://localhost:5173", "http://localhost:5174", "http://localhost:8080", "http://localhost:8081", "http://localhost:3000", - ], + ] + : []), +].map(o => o.replace(/\/$/, "")).filter(Boolean); + +const allowedOriginsSet = new Set(allowedOrigins); + +app.use( + cors({ + origin: (origin, callback) => { + // Allow server-to-server requests (no origin) e.g. health checks, self-ping + if (!origin) { + return callback(null, true); + } + if (allowedOriginsSet.has(origin.replace(/\/$/, ""))) { + callback(null, true); + } else { + callback(new Error("Not allowed by CORS")); + } + }, credentials: true, + methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], + allowedHeaders: ["Content-Type", "Authorization"], + maxAge: 86400, // Pre-flight cache: 24 hours }), ); -app.use(express.json()); -app.use(express.urlencoded({ extended: true })); - -// Request logging middleware -app.use((req, res, next) => { - console.log(`${req.method} ${req.path}`); - console.log("Headers:", req.headers); - console.log("Body:", req.body); - next(); -}); -// Routes +// ─── Body Parsing (with size limits for security) ─── +app.use(express.json({ limit: "500kb" })); +app.use(express.urlencoded({ extended: true, limit: "500kb" })); +app.use(cookieParser()); + +// ─── Rate Limiting ─── +app.use("/api/", globalLimiter); + +// ─── Input Sanitization ─── +app.use(sanitizeInput); + +// ─── Performance: ETag support for conditional requests ─── +app.set("etag", "strong"); + +// ─── Request Logging (Development Only) ─── +if (process.env.NODE_ENV === "development") { + app.use((req, _res, next) => { + console.log(`${req.method} ${req.path}`); + next(); + }); +} + +// ─── API Routes ─── app.use("/api/auth", adminAuthRoutes); +app.use("/api/departments", departmentRoutes); +app.use("/api/admin", adminManagementRoutes); +app.use("/api/audit-logs", auditLogRoutes); +app.use("/api/notifications", notificationRoutes); app.use("/api/scheme-services", schemeServiceRoutes); app.use("/api/certificate-services", certificateServiceRoutes); app.use("/api/contact-services", contactServiceRoutes); app.use("/api/offices", officeManagementRoutes); app.use("/api/feedbacks", feedbackRoutes); app.use("/api/grievances", grievanceRoutes); -app.use("/api/feedbacks", feedbackRoutes); -app.use("/api/grievances", grievanceRoutes); -app.get("/api/test", (req, res) => { - res.json({ status: "OK", message: "Test route working" }); +// ─── Health Check (with cache headers) ─── +app.get("/api/health", (_req, res) => { + res.set("Cache-Control", "no-cache"); + res.json({ status: "OK", message: "Server is running", timestamp: new Date().toISOString() }); }); -// Health check -app.get("/api/health", (req, res) => { - res.json({ status: "OK", message: "Server is running" }); -}); +// ─── Serve Uploads (PDFs and images) ─── +const uploadsPath = path.join(__dirname, "uploads"); +app.use("/uploads", express.static(uploadsPath, { + maxAge: "7d", + etag: true, +})); -// Serve static files from the React app build directory +// ─── Serve Frontend ─── const clientBuildPath = path.join(__dirname, "../dist/spa"); -app.use(express.static(clientBuildPath)); +app.use(express.static(clientBuildPath, { + maxAge: "1y", + immutable: true, + etag: true, +})); -// Error handling middleware -app.use( - ( - err: any, - req: express.Request, - res: express.Response, - next: express.NextFunction, - ) => { - console.error(err.stack); - res.status(500).json({ - error: "Something went wrong!", - message: - process.env.NODE_ENV === "development" - ? err.message - : "Internal server error", - }); - }, -); +// ─── Error Handling ─── +app.use(errorHandler); -// Catch-all handler: send back React's index.html file for any non-API routes +// ─── SPA Catch-all ─── app.get("*", (req, res) => { - // Don't serve index.html for API routes if (req.path.startsWith("/api/")) { - res.status(404).json({ error: "API route not found" }); - return; + return res.status(404).json({ error: "API route not found" }); } const indexPath = path.join(clientBuildPath, "index.html"); res.sendFile(indexPath, (err) => { if (err) { - console.error("Error serving index.html:", err); res.status(500).json({ error: "Failed to serve application" }); } }); }); -// Graceful shutdown -process.on("SIGINT", async () => { - console.log("Shutting down gracefully..."); +// ─── Graceful Shutdown ─── +const gracefulShutdown = async (signal: string) => { + console.log(`${signal} received, shutting down gracefully...`); + queryCache.destroy(); await prisma.$disconnect(); process.exit(0); -}); +}; + +process.on("SIGINT", () => gracefulShutdown("SIGINT")); +process.on("SIGTERM", () => gracefulShutdown("SIGTERM")); + +// ─── Periodic Session Cleanup (every 6 hours) ─── +setInterval(async () => { + try { + await prisma.session.deleteMany({ + where: { + OR: [ + { expiresAt: { lt: new Date() } }, + { isActive: false }, + ], + }, + }); + } catch (e) { + console.error("Session cleanup error:", e); + } +}, 6 * 60 * 60 * 1000); app.listen(PORT, () => { console.log(`Server is running on port ${PORT}`); + console.log(`Environment: ${process.env.NODE_ENV || "development"}`); + + // ─── Keep-Alive: Prevent Render free tier from spinning down ─── + if (process.env.RENDER_EXTERNAL_URL || process.env.NODE_ENV === "production") { + const keepAliveUrl = `${process.env.RENDER_EXTERNAL_URL || `http://localhost:${PORT}`}/api/health`; + const KEEP_ALIVE_INTERVAL = 14 * 60 * 1000; // 14 minutes (Render spins down after 15 min) + + setInterval(async () => { + try { + const res = await fetch(keepAliveUrl); + console.log(`[Keep-Alive] Pinged ${keepAliveUrl} — Status: ${res.status}`); + } catch (err) { + console.error("[Keep-Alive] Ping failed:", err); + } + }, KEEP_ALIVE_INTERVAL); + + console.log(`[Keep-Alive] Self-ping enabled every 14 min → ${keepAliveUrl}`); + } }); export { prisma }; diff --git a/backend/lib/auditLog.ts b/backend/lib/auditLog.ts new file mode 100644 index 0000000..63ad96a --- /dev/null +++ b/backend/lib/auditLog.ts @@ -0,0 +1,46 @@ +import { prisma } from "../lib/prisma"; + +interface AuditLogEntry { + action: string; + entity: string; + entityId?: number; + details?: any; + adminId?: number; + ipAddress?: string; + userAgent?: string; +} + +export const createAuditLog = async (entry: AuditLogEntry): Promise => { + try { + await prisma.auditLog.create({ + data: { + action: entry.action, + entity: entry.entity, + entityId: entry.entityId, + details: entry.details || {}, + adminId: entry.adminId, + ipAddress: entry.ipAddress, + userAgent: entry.userAgent, + }, + }); + } catch (error) { + // Don't let audit logging failures break the main flow + console.error("Audit log creation failed:", error); + } +}; + +export const AuditActions = { + LOGIN: "LOGIN", + LOGOUT: "LOGOUT", + LOGIN_FAILED: "LOGIN_FAILED", + REGISTER: "REGISTER", + CREATE: "CREATE", + UPDATE: "UPDATE", + DELETE: "DELETE", + PUBLISH: "PUBLISH", + TOGGLE_ACTIVE: "TOGGLE_ACTIVE", + ASSIGN: "ASSIGN", + ESCALATE: "ESCALATE", + STATUS_CHANGE: "STATUS_CHANGE", + PASSWORD_CHANGE: "PASSWORD_CHANGE", +} as const; diff --git a/backend/lib/fileUpload.ts b/backend/lib/fileUpload.ts new file mode 100644 index 0000000..8be6333 --- /dev/null +++ b/backend/lib/fileUpload.ts @@ -0,0 +1,184 @@ +import multer from "multer"; +import path from "path"; +import crypto from "crypto"; +import sharp from "sharp"; +import fs from "fs"; +import os from "os"; + +// ─── Oracle OCI PAR (Pre-Authenticated Request) Configuration ─── +// The PAR URL should end with /o/ e.g.: +// https://objectstorage..oraclecloud.com/p//n//b//o/ +const OCI_PAR_URL = process.env.OCI_PAR_URL; + +if (!OCI_PAR_URL) { + console.warn( + "⚠ WARNING: OCI_PAR_URL is not set. File uploads will fail. " + + "Set this to your Oracle OCI Pre-Authenticated Request URL.", + ); +} + +// ─── Helpers ─── + +// Generate a secure random filename +const generateFilename = (originalName: string): string => { + const ext = path.extname(originalName).toLowerCase(); + const hash = crypto.randomBytes(16).toString("hex"); + const timestamp = Date.now(); + return `${timestamp}-${hash}${ext}`; +}; + +// Upload a buffer to OCI Object Storage via PAR PUT +const uploadToOCI = async ( + buffer: Buffer, + objectName: string, + contentType: string, +): Promise => { + if (!OCI_PAR_URL) { + throw new Error("OCI_PAR_URL environment variable is not configured"); + } + + // Ensure base URL ends with / + const baseUrl = OCI_PAR_URL.endsWith("/") ? OCI_PAR_URL : `${OCI_PAR_URL}/`; + const url = `${baseUrl}${objectName}`; + + const response = await fetch(url, { + method: "PUT", + body: new Uint8Array(buffer), + headers: { + "Content-Length": buffer.length.toString(), + "Content-Type": contentType, + }, + }); + + if (!response.ok) { + const errorText = await response.text().catch(() => "Unknown error"); + throw new Error(`OCI upload failed (${response.status}): ${errorText}`); + } + + return url; +}; + +// ─── Multer Middleware (memory storage for both — buffers go to OCI) ─── + +export const pdfUpload = multer({ + storage: multer.diskStorage({ + destination: os.tmpdir(), + filename: (_req, file, cb) => { + cb(null, generateFilename(file.originalname)); + } + }), + limits: { + fileSize: 10 * 1024 * 1024, // 10MB max + files: 1, + }, + fileFilter: (_req, file, cb) => { + if (file.mimetype !== "application/pdf") { + cb(new Error("Only PDF files are allowed")); + return; + } + cb(null, true); + }, +}); + +export const imageUpload = multer({ + storage: multer.diskStorage({ + destination: os.tmpdir(), + filename: (_req, file, cb) => { + cb(null, generateFilename(file.originalname)); + } + }), + limits: { + fileSize: 5 * 1024 * 1024, // 5MB max + files: 1, + }, + fileFilter: (_req, file, cb) => { + const allowedTypes = ["image/jpeg", "image/png", "image/webp"]; + if (!allowedTypes.includes(file.mimetype)) { + cb(new Error("Only JPEG, PNG, or WebP images are allowed")); + return; + } + cb(null, true); + }, +}); + +// ─── Upload Functions (OCI Object Storage) ─── + +/** + * Upload a PDF file to OCI Object Storage. + * @returns The full OCI URL of the uploaded PDF. + */ +export const uploadPDFToOCI = async ( + file: Express.Multer.File, +): Promise => { + const filename = path.basename(file.path); + const objectName = `pdfs/${filename}`; + + try { + const fileBuffer = await fs.promises.readFile(file.path); + if (!fileBuffer || fileBuffer.length === 0) { + throw new Error("PDF file buffer is empty"); + } + + return await uploadToOCI(fileBuffer, objectName, "application/pdf"); + } finally { + // Always cleanup the temporary file + try { + if (fs.existsSync(file.path)) { + await fs.promises.unlink(file.path); + } + } catch (cleanupErr) { + console.error(`Failed to cleanup temp file ${file.path}:`, cleanupErr); + } + } +}; + +/** + * Process (resize + compress to WebP) and upload an image to OCI Object Storage. + * @returns The full OCI URL of the uploaded image. + */ +export const uploadImageToOCI = async ( + file: Express.Multer.File, +): Promise => { + const originalName = file.originalname; + const filename = generateFilename( + originalName.replace(/\.[^.]+$/, ".webp"), + ); + const objectName = `images/${filename}`; + + try { + const processedBuffer = await sharp(file.path) + .resize(800, 800, { + fit: "inside", + withoutEnlargement: true, + }) + .webp({ quality: 75 }) + .toBuffer(); + + return await uploadToOCI(processedBuffer, objectName, "image/webp"); + } finally { + // Always cleanup the temporary file + try { + if (fs.existsSync(file.path)) { + await fs.promises.unlink(file.path); + } + } catch (cleanupErr) { + console.error(`Failed to cleanup temp file ${file.path}:`, cleanupErr); + } + } +}; + +/** + * Delete an object from OCI Object Storage via its full URL. + */ +export const deleteFromOCI = async (objectUrl: string): Promise => { + try { + const response = await fetch(objectUrl, { method: "DELETE" }); + if (!response.ok && response.status !== 404) { + console.error( + `Failed to delete object from OCI (${response.status}): ${objectUrl}`, + ); + } + } catch (error) { + console.error("Error deleting from OCI:", error); + } +}; diff --git a/backend/lib/mailer.ts b/backend/lib/mailer.ts new file mode 100644 index 0000000..cc763eb --- /dev/null +++ b/backend/lib/mailer.ts @@ -0,0 +1,27 @@ +import nodemailer from "nodemailer"; + +const transporter = nodemailer.createTransport({ + host: process.env.SMTP_HOST || "smtp.gmail.com", + port: Number(process.env.SMTP_PORT) || 465, + secure: true, // SSL on port 465 — works on Render (port 587/STARTTLS is blocked) + auth: { + user: process.env.SMTP_USER, + pass: process.env.SMTP_PASS, + }, +}); + +export async function sendOTP(email: string, otp: string) { + try { + const info = await transporter.sendMail({ + from: process.env.SMTP_FROM || '"Gov Services Team" ', + to: email, + subject: "Your OTP for Grievance Submission", + text: `Your OTP is ${otp}. It will expire in 10 minutes.`, + html: `Your OTP is ${otp}
It will expire in 10 minutes.`, + }); + + console.log("Message sent: %s", info.messageId); + } catch (err) { + console.error("Failed to send email:", err); + } +} diff --git a/backend/lib/prisma.ts b/backend/lib/prisma.ts new file mode 100644 index 0000000..b1641fe --- /dev/null +++ b/backend/lib/prisma.ts @@ -0,0 +1,158 @@ +import { PrismaClient } from "@prisma/client"; + +const globalForPrisma = globalThis as unknown as { + prisma: PrismaClient | undefined; +}; + +function createPrismaClient() { + return new PrismaClient({ + log: + process.env.NODE_ENV === "production" + ? ["error"] + : ["error", "warn"], + // Connection pool optimization for scale + datasourceUrl: process.env.DATABASE_URL, + }); +} + +export const prisma = globalForPrisma.prisma ?? createPrismaClient(); + +if (process.env.NODE_ENV !== "production") { + globalForPrisma.prisma = prisma; +} + +import Redis from "ioredis"; + +// ─── Scalable Caching (Redis with In-Memory Fallback) ─── +class QueryCache { + private redis: Redis | null = null; + private memoryCache = new Map(); + private useRedis = false; + private readonly maxSize = 500; + private cleanupInterval: NodeJS.Timeout | null = null; + + constructor() { + if (process.env.REDIS_URL) { + try { + this.redis = new Redis(process.env.REDIS_URL, { + maxRetriesPerRequest: 3, + retryStrategy(times) { + if (times > 3) return null; // Stop retrying, fallback to memory + return Math.min(times * 100, 3000); + }, + }); + + this.redis.on("error", (err) => { + console.warn("Redis caching error, falling back to in-memory:", err.message); + this.useRedis = false; + }); + + this.redis.on("ready", () => { + console.log("Redis cache connected successfully."); + this.useRedis = true; + }); + + this.useRedis = true; + } catch (err) { + console.warn("Failed to initialize Redis, using in-memory cache fallback."); + this.useRedis = false; + } + } else { + console.log("REDIS_URL not provided, using in-memory cache."); + } + + // Periodic cleanup for memory cache + this.cleanupInterval = setInterval(() => this.cleanupMemory(), 60_000); + } + + async get(key: string): Promise { + if (this.useRedis && this.redis) { + try { + const cached = await this.redis.get(key); + if (cached) return JSON.parse(cached) as T; + return null; + } catch (err) { + // Fallback silently + } + } + + // Memory Fallback + const entry = this.memoryCache.get(key); + if (!entry) return null; + if (Date.now() > entry.expiresAt) { + this.memoryCache.delete(key); + return null; + } + return entry.data as T; + } + + async set(key: string, data: T, ttlMs: number): Promise { + if (this.useRedis && this.redis) { + try { + await this.redis.set(key, JSON.stringify(data), "PX", ttlMs); + return; + } catch (err) { + // Fallback silently + } + } + + // Memory Fallback + if (this.memoryCache.size >= this.maxSize) { + const firstKey = this.memoryCache.keys().next().value; + if (firstKey) this.memoryCache.delete(firstKey); + } + this.memoryCache.set(key, { data, expiresAt: Date.now() + ttlMs }); + } + + async invalidate(pattern?: string): Promise { + if (this.useRedis && this.redis) { + try { + if (!pattern) { + await this.redis.flushdb(); + } else { + // Use SCAN instead of KEYS for production safety (non-blocking) + let cursor = "0"; + do { + const [nextCursor, keys] = await this.redis.scan( + cursor, "MATCH", `*${pattern}*`, "COUNT", 100 + ); + cursor = nextCursor; + if (keys.length > 0) { + await this.redis.del(...keys); + } + } while (cursor !== "0"); + } + } catch (err) { + // Fallback to memory invalidation if Redis fails + } + } + + // Always invalidate memory + if (!pattern) { + this.memoryCache.clear(); + return; + } + for (const key of this.memoryCache.keys()) { + if (key.includes(pattern)) { + this.memoryCache.delete(key); + } + } + } + + private cleanupMemory(): void { + const now = Date.now(); + for (const [key, entry] of this.memoryCache.entries()) { + if (now > entry.expiresAt) { + this.memoryCache.delete(key); + } + } + } + + destroy(): void { + if (this.cleanupInterval) clearInterval(this.cleanupInterval); + if (this.redis) this.redis.quit(); + this.memoryCache.clear(); + } +} + +export const queryCache = new QueryCache(); diff --git a/backend/middleware/auth.ts b/backend/middleware/auth.ts new file mode 100644 index 0000000..8a579d8 --- /dev/null +++ b/backend/middleware/auth.ts @@ -0,0 +1,186 @@ +import { Request, Response, NextFunction } from "express"; +import jwt from "jsonwebtoken"; +import { prisma, queryCache } from "../lib/prisma"; +import { AdminRequest } from "../types/express"; + +// Ensure JWT_SECRET is set - crash if missing in production +const JWT_SECRET = process.env.JWT_SECRET; +if (!JWT_SECRET && process.env.NODE_ENV === "production") { + console.error("FATAL: JWT_SECRET environment variable is not set. Exiting."); + process.exit(1); +} + +export const getJwtSecret = (): string => { + const secret = process.env.JWT_SECRET; + if (!secret) { + if (process.env.NODE_ENV === "production") { + throw new Error("JWT_SECRET is required in production"); + } + // Only allow fallback in development + return "dev-only-secret-change-in-production"; + } + return secret; +}; + +export const JWT_ACCESS_EXPIRY = "15m"; +export const JWT_REFRESH_EXPIRY = "7d"; +export const REFRESH_TOKEN_COOKIE = "refresh_token"; + +export interface JwtPayload { + adminId: number; + email: string; + role: string; + sessionId?: string; + type?: string; +} + +// Authenticate admin via Bearer token — with cache for DB lookup +export const authenticateAdmin = async ( + req: Request, + res: Response, + next: NextFunction, +) => { + try { + const token = req.header("Authorization")?.replace("Bearer ", ""); + + if (!token) { + return res + .status(401) + .json({ error: "Access denied. No token provided." }); + } + + const decoded = jwt.verify(token, getJwtSecret()) as JwtPayload; + + // Reject refresh tokens being used as access tokens + if (decoded.type === "refresh") { + return res.status(401).json({ error: "Invalid token type." }); + } + + // Check cache first — avoids DB hit on every authenticated request + const cacheKey = `admin:${decoded.adminId}`; + let admin = await queryCache.get(cacheKey); + + if (!admin) { + // Cache miss — fetch from DB + admin = await prisma.admin.findUnique({ + where: { id: decoded.adminId }, + select: { + id: true, + email: true, + name: true, + role: true, + isActive: true, + departmentId: true, + assignedServices: true, + createdById: true, + department: { + select: { id: true, name: true, code: true }, + }, + }, + }); + + if (admin && admin.isActive) { + // Cache for 2 minutes — short enough to catch deactivations quickly + await queryCache.set(cacheKey, admin, 2 * 60 * 1000); + } + } + + if (!admin || !admin.isActive) { + return res.status(401).json({ error: "Invalid or inactive account" }); + } + + req.admin = admin; + next(); + } catch (error) { + if (error instanceof jwt.TokenExpiredError) { + return res.status(401).json({ error: "Token expired", code: "TOKEN_EXPIRED" }); + } + res.status(401).json({ error: "Invalid token" }); + } +}; + +// Require SuperAdmin role +export const requireSuperAdmin = ( + req: Request, + res: Response, + next: NextFunction, +) => { + if (!req.admin || req.admin.role !== "super_admin") { + return res + .status(403) + .json({ error: "Access denied. SuperAdmin privileges required." }); + } + next(); +}; + +// Require Department Admin (or SuperAdmin) +export const requireDeptAdmin = ( + req: Request, + res: Response, + next: NextFunction, +) => { + if (!req.admin) { + return res.status(401).json({ error: "Authentication required" }); + } + if ( + req.admin.role !== "super_admin" && + req.admin.role !== "department_admin" + ) { + return res + .status(403) + .json({ error: "Access denied. Admin privileges required." }); + } + next(); +}; + +// Require any admin role (super_admin, department_admin, or individual_admin) +export const requireAnyAdmin = ( + req: Request, + res: Response, + next: NextFunction, +) => { + if (!req.admin) { + return res.status(401).json({ error: "Authentication required" }); + } + if ( + req.admin.role !== "super_admin" && + req.admin.role !== "department_admin" && + req.admin.role !== "individual_admin" + ) { + return res + .status(403) + .json({ error: "Access denied. Admin privileges required." }); + } + next(); +}; + +// Check if individual admin has access to a specific service +export const requireServiceAccess = (service: string) => { + return (req: Request, res: Response, next: NextFunction) => { + if (!req.admin) { + return res.status(401).json({ error: "Authentication required" }); + } + // Super admin and department admin have full access + if (req.admin.role === "super_admin" || req.admin.role === "department_admin") { + return next(); + } + // Individual admin — check assignedServices + if (req.admin.role === "individual_admin") { + const assignedServices = (req.admin as any).assignedServices || []; + if (assignedServices.includes(service)) { + return next(); + } + } + return res + .status(403) + .json({ error: `Access denied. You don't have permission for ${service}.` }); + }; +}; + +// Scope queries to the admin's department (unless SuperAdmin) +export const getDepartmentScope = (admin: any): { departmentId?: number } => { + if (admin.role === "super_admin") { + return {}; // SuperAdmin sees everything + } + return { departmentId: admin.departmentId || undefined }; +}; diff --git a/backend/middleware/errorHandler.test.ts b/backend/middleware/errorHandler.test.ts new file mode 100644 index 0000000..074ff30 --- /dev/null +++ b/backend/middleware/errorHandler.test.ts @@ -0,0 +1,86 @@ +import { describe, it, expect, vi } from "vitest"; +import { sanitizeInput } from "./errorHandler"; +import { Request, Response, NextFunction } from "express"; + +describe("sanitizeInput middleware", () => { + it("should strip out dangerous HTML tags in object properties", () => { + const req = { + body: { + text: "Hello", + nested: { + iframe: 'World', + safe: "Just text", + }, + }, + } as unknown as Request; + + const res = {} as Response; + const next = vi.fn() as NextFunction; + + sanitizeInput(req, res, next); + + expect(req.body.text).toBe("Hello"); + expect(req.body.nested.iframe).toBe("World"); + expect(req.body.nested.safe).toBe("Just text"); + expect(next).toHaveBeenCalled(); + }); + + it("should handle ReDoS payloads efficiently without catastrophic backtracking", () => { + // A payload that previously caused exponential backtracking on the old regex: + // /)<[^<]*)*<\/script>/gi + const size = 50000; + const maliciousPayload = "safe1", "safe2", "safe3"], + }, + } as unknown as Request; + + const res = {} as Response; + const next = vi.fn() as NextFunction; + + sanitizeInput(req, res, next); + + expect(req.body.items).toEqual(["safe1", "safe2", "safe3"]); + expect(next).toHaveBeenCalled(); + }); + + it("should sanitize req.query as well", () => { + const req = { + query: { + search: "objfindme", + }, + } as unknown as Request; + + const res = {} as Response; + const next = vi.fn() as NextFunction; + + sanitizeInput(req, res, next); + + expect(req.query.search).toBe("findme"); + expect(next).toHaveBeenCalled(); + }); +}); diff --git a/backend/middleware/errorHandler.ts b/backend/middleware/errorHandler.ts new file mode 100644 index 0000000..1b6d8ec --- /dev/null +++ b/backend/middleware/errorHandler.ts @@ -0,0 +1,82 @@ +import { Request, Response, NextFunction } from "express"; + +export interface ApiError extends Error { + statusCode?: number; + status?: number; +} + +// Sanitize error responses — never leak internal details to clients +export const errorHandler = ( + err: ApiError, + req: Request, + res: Response, + _next: NextFunction, +) => { + // Log the full error server-side + if (process.env.NODE_ENV === "development") { + console.error("Error:", err); + } else { + console.error("Error:", err.message || "Unknown error"); + } + + const statusCode = err.statusCode || err.status || 500; + + res.status(statusCode).json({ + error: + process.env.NODE_ENV === "development" + ? err.message + : "Internal server error", + ...(process.env.NODE_ENV === "development" && { stack: err.stack }), + }); +}; + +// 404 handler for unknown API routes +export const notFoundHandler = (req: Request, res: Response) => { + if (req.path.startsWith("/api/")) { + return res.status(404).json({ error: "API route not found" }); + } + // For non-API routes, let the SPA catch-all handle it +}; + +// Input sanitization — strip HTML tags from string inputs +export const sanitizeInput = ( + req: Request, + _res: Response, + next: NextFunction, +) => { + if (req.body && typeof req.body === "object") { + sanitizeObject(req.body); + } + if (req.query && typeof req.query === "object") { + sanitizeObject(req.query); + } + next(); +}; + +function sanitizeObject(obj: any): void { + for (const key of Object.keys(obj)) { + if (typeof obj[key] === "string") { + // Strip dangerous HTML tags but keep safe content + obj[key] = obj[key] + .replace(//gi, "") + .replace(//gi, "") + .replace(/on\w+\s*=\s*["'][^"']*["']/gi, "") + .replace(//gi, "") + .replace(/]*>/gi, "") + .replace(/]*>/gi, ""); + } else if (Array.isArray(obj[key])) { + obj[key].forEach((item: any, index: number) => { + if (typeof item === "string") { + obj[key][index] = item + .replace(//gi, "") + .replace(//gi, "") + .replace(/on\w+\s*=\s*["'][^"']*["']/gi, ""); + } else if (typeof item === "object" && item !== null) { + sanitizeObject(item); + } + }); + } else if (typeof obj[key] === "object" && obj[key] !== null) { + sanitizeObject(obj[key]); + } + } +} diff --git a/backend/middleware/rateLimiter.ts b/backend/middleware/rateLimiter.ts new file mode 100644 index 0000000..49dcd3f --- /dev/null +++ b/backend/middleware/rateLimiter.ts @@ -0,0 +1,70 @@ +import rateLimit from "express-rate-limit"; + +// Global rate limiter: 200 requests per minute per IP (increased for admin dashboard traversal) +export const globalLimiter = rateLimit({ + windowMs: 60 * 1000, // 1 minute + max: 200, + standardHeaders: true, + legacyHeaders: false, + message: { + error: "Too many requests, please try again later.", + }, + // Skip rate limiting for health checks + skip: (req) => req.path === "/api/health", +}); + +// API rate limiter: stricter for write operations +export const apiLimiter = rateLimit({ + windowMs: 60 * 1000, + max: 60, + standardHeaders: true, + legacyHeaders: false, + message: { + error: "Too many API requests, please slow down.", + }, +}); + +// Auth rate limiter: 5 login attempts per 15 minutes per IP +export const authLimiter = rateLimit({ + windowMs: 15 * 60 * 1000, // 15 minutes + max: 5, + standardHeaders: true, + legacyHeaders: false, + message: { + error: "Too many login attempts. Please try again after 15 minutes.", + }, + skipSuccessfulRequests: true, +}); + +// Public submission rate limiter: 10 submissions per hour per IP +export const submissionLimiter = rateLimit({ + windowMs: 60 * 60 * 1000, // 1 hour + max: 10, + standardHeaders: true, + legacyHeaders: false, + message: { + error: "Too many submissions. Please try again later.", + }, +}); + +// Registration rate limiter: 3 per hour per IP (SuperAdmin only anyway) +export const registrationLimiter = rateLimit({ + windowMs: 60 * 60 * 1000, // 1 hour + max: 3, + standardHeaders: true, + legacyHeaders: false, + message: { + error: "Too many registration attempts. Please try again later.", + }, +}); + +// Read-heavy endpoint limiter (generous for dashboard data) +export const readLimiter = rateLimit({ + windowMs: 60 * 1000, // 1 minute + max: 120, + standardHeaders: true, + legacyHeaders: false, + message: { + error: "Too many read requests. Please try again shortly.", + }, +}); diff --git a/backend/package-lock.json b/backend/package-lock.json index bc70bdc..17f17c2 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -10,27 +10,40 @@ "hasInstallScript": true, "dependencies": { "@prisma/client": "^6.13.0", + "@types/bcryptjs": "^2.4.6", + "@types/compression": "^1.8.1", + "@types/cookie-parser": "^1.4.10", + "@types/cors": "^2.8.19", + "@types/express": "^5.0.3", + "@types/ioredis": "^4.28.10", + "@types/jsonwebtoken": "^9.0.10", + "@types/multer": "^2.0.0", + "@types/nodemailer": "^7.0.11", + "@types/sharp": "^0.31.1", + "@types/uuid": "^10.0.0", "bcryptjs": "^3.0.2", + "compression": "^1.8.1", + "cookie-parser": "^1.4.7", "cors": "^2.8.5", + "crypto": "^1.0.1", "dotenv": "^17.2.1", "express": "^4.18.2", + "express-rate-limit": "^8.3.0", "express-validator": "^7.2.1", + "helmet": "^8.1.0", + "ioredis": "^5.10.0", "jsonwebtoken": "^9.0.2", "multer": "^2.0.2", + "nodemailer": "^8.0.1", + "prisma": "^6.13.0", + "sharp": "^0.34.5", + "typescript": "^5.5.3", "uuid": "^11.1.0", "zod": "^3.23.8" }, "devDependencies": { - "@types/bcryptjs": "^2.4.6", - "@types/cors": "^2.8.19", - "@types/express": "^5.0.3", - "@types/jsonwebtoken": "^9.0.10", - "@types/multer": "^2.0.0", - "@types/uuid": "^10.0.0", - "prisma": "^6.13.0", "rimraf": "^6.0.1", "tsx": "^4.20.3", - "typescript": "^5.5.3", "vitest": "^3.1.4" } }, @@ -38,7 +51,6 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", @@ -53,12 +65,21 @@ "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, + "node_modules/@emnapi/runtime": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.8.1.tgz", + "integrity": "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.8", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz", @@ -501,479 +522,1005 @@ "node": ">=18" } }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", - "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", - "dev": true, + "node_modules/@img/colour": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", + "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==", "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, "engines": { - "node": ">=12" + "node": ">=18" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", - "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@prisma/client": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.13.0.tgz", - "integrity": "sha512-8m2+I3dQovkV8CkDMluiwEV1TxV9EXdT6xaCz39O6jYw7mkf5gwfmi+cL4LJsEPwz5tG7sreBwkRpEMJedGYUQ==", - "hasInstallScript": true, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz", + "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==", + "cpu": [ + "arm64" + ], "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=18.18" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, - "peerDependencies": { - "prisma": "*", - "typescript": ">=5.1.0" + "funding": { + "url": "https://opencollective.com/libvips" }, - "peerDependenciesMeta": { - "prisma": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/@prisma/config": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@prisma/config/-/config-6.13.0.tgz", - "integrity": "sha512-OYMM+pcrvj/NqNWCGESSxVG3O7kX6oWuGyvufTUNnDw740KIQvNyA4v0eILgkpuwsKIDU36beZCkUtIt0naTog==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "c12": "3.1.0", - "deepmerge-ts": "7.1.5", - "effect": "3.16.12", - "read-package-up": "11.0.0" - } - }, - "node_modules/@prisma/debug": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.13.0.tgz", - "integrity": "sha512-um+9pfKJW0ihmM83id9FXGi5qEbVJ0Vxi1Gm0xpYsjwUBnw6s2LdPBbrsG9QXRX46K4CLWCTNvskXBup4i9hlw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/@prisma/engines": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.13.0.tgz", - "integrity": "sha512-D+1B79LFvtWA0KTt8ALekQ6A/glB9w10ETknH5Y9g1k2NYYQOQy93ffiuqLn3Pl6IPJG3EsK/YMROKEaq8KBrA==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "@prisma/debug": "6.13.0", - "@prisma/engines-version": "6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd", - "@prisma/fetch-engine": "6.13.0", - "@prisma/get-platform": "6.13.0" - } - }, - "node_modules/@prisma/engines-version": { - "version": "6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd.tgz", - "integrity": "sha512-MpPyKSzBX7P/ZY9odp9TSegnS/yH3CSbchQE9f0yBg3l2QyN59I6vGXcoYcqKC9VTniS1s18AMmhyr1OWavjHg==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/@prisma/fetch-engine": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.13.0.tgz", - "integrity": "sha512-grmmq+4FeFKmaaytA8Ozc2+Tf3BC8xn/DVJos6LL022mfRlMZYjT3hZM0/xG7+5fO95zFG9CkDUs0m1S2rXs5Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@prisma/debug": "6.13.0", - "@prisma/engines-version": "6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd", - "@prisma/get-platform": "6.13.0" - } - }, - "node_modules/@prisma/get-platform": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.13.0.tgz", - "integrity": "sha512-Nii2pX50fY4QKKxQwm7/vvqT6Ku8yYJLZAFX4e2vzHwRdMqjugcOG5hOSLjxqoXb0cvOspV70TOhMzrw8kqAnw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@prisma/debug": "6.13.0" + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.2.4" } }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.2.tgz", - "integrity": "sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA==", + "node_modules/@img/sharp-darwin-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz", + "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==", "cpu": [ - "arm" + "x64" ], - "dev": true, - "license": "MIT", + "license": "Apache-2.0", "optional": true, "os": [ - "android" - ] + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.2.4" + } }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.2.tgz", - "integrity": "sha512-nTeCWY83kN64oQ5MGz3CgtPx8NSOhC5lWtsjTs+8JAJNLcP3QbLCtDDgUKQc/Ro/frpMq4SHUaHN6AMltcEoLQ==", + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz", + "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==", "cpu": [ "arm64" ], - "dev": true, - "license": "MIT", + "license": "LGPL-3.0-or-later", "optional": true, "os": [ - "android" - ] + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.2.tgz", - "integrity": "sha512-HV7bW2Fb/F5KPdM/9bApunQh68YVDU8sO8BvcW9OngQVN3HHHkw99wFupuUJfGR9pYLLAjcAOA6iO+evsbBaPQ==", + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz", + "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==", "cpu": [ - "arm64" + "x64" ], - "dev": true, - "license": "MIT", + "license": "LGPL-3.0-or-later", "optional": true, "os": [ "darwin" - ] + ], + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.2.tgz", - "integrity": "sha512-SSj8TlYV5nJixSsm/y3QXfhspSiLYP11zpfwp6G/YDXctf3Xkdnk4woJIF5VQe0of2OjzTt8EsxnJDCdHd2xMA==", + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz", + "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==", "cpu": [ - "x64" + "arm" ], - "dev": true, - "license": "MIT", + "license": "LGPL-3.0-or-later", "optional": true, "os": [ - "darwin" - ] + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.2.tgz", - "integrity": "sha512-ZyrsG4TIT9xnOlLsSSi9w/X29tCbK1yegE49RYm3tu3wF1L/B6LVMqnEWyDB26d9Ecx9zrmXCiPmIabVuLmNSg==", + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz", + "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==", "cpu": [ "arm64" ], - "dev": true, - "license": "MIT", + "license": "LGPL-3.0-or-later", "optional": true, "os": [ - "freebsd" - ] + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.2.tgz", - "integrity": "sha512-pCgHFoOECwVCJ5GFq8+gR8SBKnMO+xe5UEqbemxBpCKYQddRQMgomv1104RnLSg7nNvgKy05sLsY51+OVRyiVw==", + "node_modules/@img/sharp-libvips-linux-ppc64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz", + "integrity": "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==", "cpu": [ - "x64" + "ppc64" ], - "dev": true, - "license": "MIT", + "license": "LGPL-3.0-or-later", "optional": true, "os": [ - "freebsd" - ] + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.2.tgz", - "integrity": "sha512-EtP8aquZ0xQg0ETFcxUbU71MZlHaw9MChwrQzatiE8U/bvi5uv/oChExXC4mWhjiqK7azGJBqU0tt5H123SzVA==", + "node_modules/@img/sharp-libvips-linux-riscv64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz", + "integrity": "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==", "cpu": [ - "arm" + "riscv64" ], - "dev": true, - "license": "MIT", + "license": "LGPL-3.0-or-later", "optional": true, "os": [ "linux" - ] + ], + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.2.tgz", - "integrity": "sha512-qO7F7U3u1nfxYRPM8HqFtLd+raev2K137dsV08q/LRKRLEc7RsiDWihUnrINdsWQxPR9jqZ8DIIZ1zJJAm5PjQ==", + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz", + "integrity": "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==", "cpu": [ - "arm" + "s390x" ], - "dev": true, - "license": "MIT", + "license": "LGPL-3.0-or-later", "optional": true, "os": [ "linux" - ] + ], + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.2.tgz", - "integrity": "sha512-3dRaqLfcOXYsfvw5xMrxAk9Lb1f395gkoBYzSFcc/scgRFptRXL9DOaDpMiehf9CO8ZDRJW2z45b6fpU5nwjng==", + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz", + "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==", "cpu": [ - "arm64" + "x64" ], - "dev": true, - "license": "MIT", + "license": "LGPL-3.0-or-later", "optional": true, "os": [ "linux" - ] + ], + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.2.tgz", - "integrity": "sha512-fhHFTutA7SM+IrR6lIfiHskxmpmPTJUXpWIsBXpeEwNgZzZZSg/q4i6FU4J8qOGyJ0TR+wXBwx/L7Ho9z0+uDg==", + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz", + "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==", "cpu": [ "arm64" ], - "dev": true, - "license": "MIT", + "license": "LGPL-3.0-or-later", "optional": true, "os": [ "linux" - ] + ], + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.2.tgz", - "integrity": "sha512-i7wfGFXu8x4+FRqPymzjD+Hyav8l95UIZ773j7J7zRYc3Xsxy2wIn4x+llpunexXe6laaO72iEjeeGyUFmjKeA==", + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz", + "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==", "cpu": [ - "loong64" + "x64" ], - "dev": true, - "license": "MIT", + "license": "LGPL-3.0-or-later", "optional": true, "os": [ "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.2.tgz", - "integrity": "sha512-B/l0dFcHVUnqcGZWKcWBSV2PF01YUt0Rvlurci5P+neqY/yMKchGU8ullZvIv5e8Y1C6wOn+U03mrDylP5q9Yw==", + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz", + "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==", "cpu": [ - "ppc64" + "arm" ], - "dev": true, - "license": "MIT", + "license": "Apache-2.0", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.2.4" + } }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.2.tgz", - "integrity": "sha512-32k4ENb5ygtkMwPMucAb8MtV8olkPT03oiTxJbgkJa7lJ7dZMr0GCFJlyvy+K8iq7F/iuOr41ZdUHaOiqyR3iQ==", + "node_modules/@img/sharp-linux-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz", + "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==", "cpu": [ - "riscv64" + "arm64" ], - "dev": true, - "license": "MIT", + "license": "Apache-2.0", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.2.4" + } }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.2.tgz", - "integrity": "sha512-t5B2loThlFEauloaQkZg9gxV05BYeITLvLkWOkRXogP4qHXLkWSbSHKM9S6H1schf/0YGP/qNKtiISlxvfmmZw==", + "node_modules/@img/sharp-linux-ppc64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz", + "integrity": "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==", + "cpu": [ + "ppc64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-ppc64": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-riscv64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz", + "integrity": "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==", "cpu": [ "riscv64" ], - "dev": true, - "license": "MIT", + "license": "Apache-2.0", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-riscv64": "1.2.4" + } }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.2.tgz", - "integrity": "sha512-YKjekwTEKgbB7n17gmODSmJVUIvj8CX7q5442/CK80L8nqOUbMtf8b01QkG3jOqyr1rotrAnW6B/qiHwfcuWQA==", + "node_modules/@img/sharp-linux-s390x": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz", + "integrity": "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==", "cpu": [ "s390x" ], - "dev": true, - "license": "MIT", + "license": "Apache-2.0", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.2.4" + } }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.2.tgz", - "integrity": "sha512-Jj5a9RUoe5ra+MEyERkDKLwTXVu6s3aACP51nkfnK9wJTraCC8IMe3snOfALkrjTYd2G1ViE1hICj0fZ7ALBPA==", + "node_modules/@img/sharp-linux-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz", + "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==", "cpu": [ "x64" ], - "dev": true, - "license": "MIT", + "license": "Apache-2.0", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.2.4" + } }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.2.tgz", - "integrity": "sha512-7kX69DIrBeD7yNp4A5b81izs8BqoZkCIaxQaOpumcJ1S/kmqNFjPhDu1LHeVXv0SexfHQv5cqHsxLOjETuqDuA==", + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz", + "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz", + "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==", "cpu": [ "x64" ], - "dev": true, - "license": "MIT", + "license": "Apache-2.0", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.2.4" + } }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.2.tgz", - "integrity": "sha512-wiJWMIpeaak/jsbaq2HMh/rzZxHVW1rU6coyeNNpMwk5isiPjSTx0a4YLSlYDwBH/WBvLz+EtsNqQScZTLJy3g==", + "node_modules/@img/sharp-wasm32": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz", + "integrity": "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==", + "cpu": [ + "wasm32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.7.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz", + "integrity": "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==", "cpu": [ "arm64" ], - "dev": true, - "license": "MIT", + "license": "Apache-2.0 AND LGPL-3.0-or-later", "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.2.tgz", - "integrity": "sha512-gBgaUDESVzMgWZhcyjfs9QFK16D8K6QZpwAaVNJxYDLHWayOta4ZMjGm/vsAEy3hvlS2GosVFlBlP9/Wb85DqQ==", + "node_modules/@img/sharp-win32-ia32": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz", + "integrity": "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==", "cpu": [ "ia32" ], - "dev": true, - "license": "MIT", + "license": "Apache-2.0 AND LGPL-3.0-or-later", "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.2.tgz", - "integrity": "sha512-CvUo2ixeIQGtF6WvuB87XWqPQkoFAFqW+HUo/WzHwuHDvIwZCtjdWXoYCcr06iKGydiqTclC4jU/TNObC/xKZg==", + "node_modules/@img/sharp-win32-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz", + "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==", "cpu": [ "x64" ], - "dev": true, - "license": "MIT", + "license": "Apache-2.0 AND LGPL-3.0-or-later", "optional": true, "os": [ "win32" - ] - }, - "node_modules/@standard-schema/spec": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz", - "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==", - "dev": true, - "license": "MIT" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } }, - "node_modules/@types/bcryptjs": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.6.tgz", - "integrity": "sha512-9xlo6R2qDs5uixm0bcIqCeMCE6HiQsIyel9KQySStiyqNl2tnj2mP3DX1Nf56MD6KMenNNlBBsy3LJ7gUEQPXQ==", - "dev": true, + "node_modules/@ioredis/commands": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.5.1.tgz", + "integrity": "sha512-JH8ZL/ywcJyR9MmJ5BNqZllXNZQqQbnVZOqpPQqE1vHiFgAw4NHbvE0FOduNU8IX9babitBT46571OnPTT0Zcw==", "license": "MIT" }, - "node_modules/@types/body-parser": { - "version": "1.19.6", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", - "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "@types/connect": "*", - "@types/node": "*" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" } }, - "node_modules/@types/chai": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", - "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", "dev": true, - "license": "MIT", - "dependencies": { - "@types/deep-eql": "*" + "license": "MIT" + }, + "node_modules/@prisma/client": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.13.0.tgz", + "integrity": "sha512-8m2+I3dQovkV8CkDMluiwEV1TxV9EXdT6xaCz39O6jYw7mkf5gwfmi+cL4LJsEPwz5tG7sreBwkRpEMJedGYUQ==", + "hasInstallScript": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "peerDependencies": { + "prisma": "*", + "typescript": ">=5.1.0" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + }, + "typescript": { + "optional": true + } } }, - "node_modules/@types/connect": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", - "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dev": true, - "license": "MIT", + "node_modules/@prisma/config": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@prisma/config/-/config-6.13.0.tgz", + "integrity": "sha512-OYMM+pcrvj/NqNWCGESSxVG3O7kX6oWuGyvufTUNnDw740KIQvNyA4v0eILgkpuwsKIDU36beZCkUtIt0naTog==", + "license": "Apache-2.0", "dependencies": { - "@types/node": "*" + "c12": "3.1.0", + "deepmerge-ts": "7.1.5", + "effect": "3.16.12", + "read-package-up": "11.0.0" } }, - "node_modules/@types/cors": { - "version": "2.8.19", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz", - "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==", - "dev": true, - "license": "MIT", + "node_modules/@prisma/debug": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.13.0.tgz", + "integrity": "sha512-um+9pfKJW0ihmM83id9FXGi5qEbVJ0Vxi1Gm0xpYsjwUBnw6s2LdPBbrsG9QXRX46K4CLWCTNvskXBup4i9hlw==", + "license": "Apache-2.0" + }, + "node_modules/@prisma/engines": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.13.0.tgz", + "integrity": "sha512-D+1B79LFvtWA0KTt8ALekQ6A/glB9w10ETknH5Y9g1k2NYYQOQy93ffiuqLn3Pl6IPJG3EsK/YMROKEaq8KBrA==", + "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@types/node": "*" + "@prisma/debug": "6.13.0", + "@prisma/engines-version": "6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd", + "@prisma/fetch-engine": "6.13.0", + "@prisma/get-platform": "6.13.0" } }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", - "dev": true, + "node_modules/@prisma/engines-version": { + "version": "6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd.tgz", + "integrity": "sha512-MpPyKSzBX7P/ZY9odp9TSegnS/yH3CSbchQE9f0yBg3l2QyN59I6vGXcoYcqKC9VTniS1s18AMmhyr1OWavjHg==", + "license": "Apache-2.0" + }, + "node_modules/@prisma/fetch-engine": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.13.0.tgz", + "integrity": "sha512-grmmq+4FeFKmaaytA8Ozc2+Tf3BC8xn/DVJos6LL022mfRlMZYjT3hZM0/xG7+5fO95zFG9CkDUs0m1S2rXs5Q==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.13.0", + "@prisma/engines-version": "6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd", + "@prisma/get-platform": "6.13.0" + } + }, + "node_modules/@prisma/get-platform": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.13.0.tgz", + "integrity": "sha512-Nii2pX50fY4QKKxQwm7/vvqT6Ku8yYJLZAFX4e2vzHwRdMqjugcOG5hOSLjxqoXb0cvOspV70TOhMzrw8kqAnw==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "6.13.0" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", + "integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz", + "integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz", + "integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz", + "integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz", + "integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz", + "integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz", + "integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz", + "integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz", + "integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz", + "integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz", + "integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz", + "integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz", + "integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz", + "integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz", + "integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz", + "integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz", + "integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz", + "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz", + "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz", + "integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz", + "integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz", + "integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz", + "integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz", + "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz", + "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@standard-schema/spec": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz", + "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==", + "license": "MIT" + }, + "node_modules/@types/bcryptjs": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.6.tgz", + "integrity": "sha512-9xlo6R2qDs5uixm0bcIqCeMCE6HiQsIyel9KQySStiyqNl2tnj2mP3DX1Nf56MD6KMenNNlBBsy3LJ7gUEQPXQ==", + "license": "MIT" + }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*" + } + }, + "node_modules/@types/compression": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@types/compression/-/compression-1.8.1.tgz", + "integrity": "sha512-kCFuWS0ebDbmxs0AXYn6e2r2nrGAb5KwQhknjSPSPgJcGd8+HVSILlUyFhGqML2gk39HcG7D1ydW9/qpYkN00Q==", + "license": "MIT", + "dependencies": { + "@types/express": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cookie-parser": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/@types/cookie-parser/-/cookie-parser-1.4.10.tgz", + "integrity": "sha512-B4xqkqfZ8Wek+rCOeRxsjMS9OgvzebEzzLYw7NHYuvzb7IdxOkI0ZHGgeEBX4PUM7QGVvNSK60T3OvWj3YfBRg==", + "license": "MIT", + "peerDependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/cors": { + "version": "2.8.19", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz", + "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, "license": "MIT" }, "node_modules/@types/estree": { @@ -987,7 +1534,6 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.3.tgz", "integrity": "sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==", - "dev": true, "license": "MIT", "dependencies": { "@types/body-parser": "*", @@ -999,7 +1545,6 @@ "version": "5.0.7", "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.7.tgz", "integrity": "sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ==", - "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", @@ -1012,14 +1557,21 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", - "dev": true, "license": "MIT" }, + "node_modules/@types/ioredis": { + "version": "4.28.10", + "resolved": "https://registry.npmjs.org/@types/ioredis/-/ioredis-4.28.10.tgz", + "integrity": "sha512-69LyhUgrXdgcNDv7ogs1qXZomnfOEnSmrmMFqKgt1XMJxmoOSG/u3wYy13yACIfKuMJ8IhKgHafDO3sx19zVQQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/jsonwebtoken": { "version": "9.0.10", "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.10.tgz", "integrity": "sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA==", - "dev": true, "license": "MIT", "dependencies": { "@types/ms": "*", @@ -1030,21 +1582,18 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "dev": true, "license": "MIT" }, "node_modules/@types/ms": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", - "dev": true, "license": "MIT" }, "node_modules/@types/multer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/multer/-/multer-2.0.0.tgz", "integrity": "sha512-C3Z9v9Evij2yST3RSBktxP9STm6OdMc5uR1xF1SGr98uv8dUlAL2hqwrZ3GVB3uyMyiegnscEK6PGtYvNrjTjw==", - "dev": true, "license": "MIT", "dependencies": { "@types/express": "*" @@ -1054,38 +1603,42 @@ "version": "24.1.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", - "dev": true, "license": "MIT", "dependencies": { "undici-types": "~7.8.0" } }, + "node_modules/@types/nodemailer": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-7.0.11.tgz", + "integrity": "sha512-E+U4RzR2dKrx+u3N4DlsmLaDC6mMZOM/TPROxA0UAPiTgI0y4CEFBmZE+coGWTjakDriRsXG368lNk1u9Q0a2g==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/normalize-package-data": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "dev": true, "license": "MIT" }, "node_modules/@types/qs": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", - "dev": true, "license": "MIT" }, "node_modules/@types/range-parser": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "dev": true, "license": "MIT" }, "node_modules/@types/send": { "version": "0.17.5", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", - "dev": true, "license": "MIT", "dependencies": { "@types/mime": "^1", @@ -1096,7 +1649,6 @@ "version": "1.15.8", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", - "dev": true, "license": "MIT", "dependencies": { "@types/http-errors": "*", @@ -1104,11 +1656,19 @@ "@types/send": "*" } }, + "node_modules/@types/sharp": { + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/@types/sharp/-/sharp-0.31.1.tgz", + "integrity": "sha512-5nWwamN9ZFHXaYEincMSuza8nNfOof8nmO+mcI+Agx1uMUk4/pQnNIcix+9rLPXzKrm1pS34+6WRDbDV0Jn7ag==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/uuid": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-10.0.0.tgz", "integrity": "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==", - "dev": true, "license": "MIT" }, "node_modules/@vitest/expect": { @@ -1287,6 +1847,16 @@ "node": ">=12" } }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, "node_modules/bcryptjs": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-3.0.2.tgz", @@ -1297,29 +1867,71 @@ } }, "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", "license": "MIT", "dependencies": { - "bytes": "3.1.2", + "bytes": "~3.1.2", "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", "type-is": "~1.6.18", - "unpipe": "1.0.0" + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/body-parser/node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/body-parser/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", + "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -1356,7 +1968,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/c12/-/c12-3.1.0.tgz", "integrity": "sha512-uWoS8OU1MEIsOv8p/5a82c3H31LsWVR5qiyXVfBNOzfffjUWtPnhAb4BYI2uG2HfGmZmFjCtui5XNWaps+iFuw==", - "dev": true, "license": "MIT", "dependencies": { "chokidar": "^4.0.3", @@ -1385,7 +1996,6 @@ "version": "16.6.1", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=12" @@ -1464,7 +2074,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dev": true, "license": "MIT", "dependencies": { "readdirp": "^4.0.1" @@ -1480,12 +2089,20 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", - "dev": true, "license": "MIT", "dependencies": { "consola": "^3.2.3" } }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1506,6 +2123,45 @@ "dev": true, "license": "MIT" }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "license": "MIT", + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz", + "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "compressible": "~2.0.18", + "debug": "2.6.9", + "negotiator": "~0.6.4", + "on-headers": "~1.1.0", + "safe-buffer": "5.2.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression/node_modules/negotiator": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/concat-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", @@ -1525,14 +2181,12 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz", "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==", - "dev": true, "license": "MIT" }, "node_modules/consola": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", - "dev": true, "license": "MIT", "engines": { "node": "^14.18.0 || >=16.10.0" @@ -1568,6 +2222,28 @@ "node": ">= 0.6" } }, + "node_modules/cookie-parser": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz", + "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==", + "license": "MIT", + "dependencies": { + "cookie": "0.7.2", + "cookie-signature": "1.0.6" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/cookie-parser/node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", @@ -1602,6 +2278,13 @@ "node": ">= 8" } }, + "node_modules/crypto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz", + "integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==", + "deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.", + "license": "ISC" + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1625,7 +2308,6 @@ "version": "7.1.5", "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.5.tgz", "integrity": "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==", - "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=16.0.0" @@ -1635,9 +2317,17 @@ "version": "6.1.4", "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", - "dev": true, "license": "MIT" }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -1651,7 +2341,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", - "dev": true, "license": "MIT" }, "node_modules/destroy": { @@ -1664,6 +2353,15 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/dotenv": { "version": "17.2.1", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.1.tgz", @@ -1716,7 +2414,6 @@ "version": "3.16.12", "resolved": "https://registry.npmjs.org/effect/-/effect-3.16.12.tgz", "integrity": "sha512-N39iBk0K71F9nb442TLbTkjl24FLUzuvx2i1I2RsEAQsdAdUTuUoW0vlfUXgkMTUOnYqKnWcFfqw4hK4Pw27hg==", - "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.0.0", @@ -1854,39 +2551,39 @@ } }, "node_modules/express": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", - "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.3", - "content-disposition": "0.5.4", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", "content-type": "~1.0.4", - "cookie": "0.7.1", - "cookie-signature": "1.0.6", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", "debug": "2.6.9", "depd": "2.0.0", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.3.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", "merge-descriptors": "1.0.3", "methods": "~1.1.2", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.12", + "path-to-regexp": "~0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.13.0", + "qs": "~6.14.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.19.0", - "serve-static": "1.16.2", + "send": "~0.19.0", + "serve-static": "~1.16.2", "setprototypeof": "1.2.0", - "statuses": "2.0.1", + "statuses": "~2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -1899,14 +2596,32 @@ "url": "https://opencollective.com/express" } }, + "node_modules/express-rate-limit": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.3.0.tgz", + "integrity": "sha512-KJzBawY6fB9FiZGdE/0aftepZ91YlaGIrV8vgblRM3J8X+dHx/aiowJWwkx6LIGyuqGiANsjSwwrbb8mifOJ4Q==", + "license": "MIT", + "dependencies": { + "ip-address": "10.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": ">= 4.11" + } + }, "node_modules/express-validator": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/express-validator/-/express-validator-7.2.1.tgz", - "integrity": "sha512-CjNE6aakfpuwGaHQZ3m8ltCG2Qvivd7RHtVMS/6nVxOM7xVGqr4bhflsm4+N5FP5zI7Zxp+Hae+9RE+o8e3ZOQ==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/express-validator/-/express-validator-7.3.1.tgz", + "integrity": "sha512-IGenaSf+DnWc69lKuqlRE9/i/2t5/16VpH5bXoqdxWz1aCpRvEdrBuu1y95i/iL5QP8ZYVATiwLFhwk3EDl5vg==", "license": "MIT", "dependencies": { "lodash": "^4.17.21", - "validator": "~13.12.0" + "validator": "~13.15.23" }, "engines": { "node": ">= 8.0.0" @@ -1916,14 +2631,12 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.7.tgz", "integrity": "sha512-VO5fQUzZtI6C+vx4w/4BWJpg3s/5l+6pRQEHzFRM8WFi4XffSP1Z+4qi7GbjWbvRQEbdIco5mIMq+zX4rPuLrw==", - "dev": true, "license": "MIT" }, "node_modules/fast-check": { "version": "3.23.2", "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", - "dev": true, "funding": [ { "type": "individual", @@ -1943,11 +2656,14 @@ } }, "node_modules/fdir": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", - "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -1979,7 +2695,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.1.tgz", "integrity": "sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -2101,7 +2816,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/giget/-/giget-2.0.0.tgz", "integrity": "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==", - "dev": true, "license": "MIT", "dependencies": { "citty": "^0.1.6", @@ -2116,15 +2830,16 @@ } }, "node_modules/glob": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", - "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { "foreground-child": "^3.3.1", "jackspeak": "^4.1.1", - "minimatch": "^10.0.3", + "minimatch": "^10.1.1", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^2.0.0" @@ -2175,11 +2890,19 @@ "node": ">= 0.4" } }, + "node_modules/helmet": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-8.1.0.tgz", + "integrity": "sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/hosted-git-info": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", - "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^10.0.1" @@ -2220,7 +2943,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.1.0.tgz", "integrity": "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -2235,6 +2957,62 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "license": "ISC" }, + "node_modules/ioredis": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.10.0.tgz", + "integrity": "sha512-HVBe9OFuqs+Z6n64q09PQvP1/R4Bm+30PAyyD4wIEqssh3v9L21QjCVk4kRLucMBcDokJTcLjsGeVRlq/nH6DA==", + "license": "MIT", + "dependencies": { + "@ioredis/commands": "1.5.1", + "cluster-key-slot": "^1.1.0", + "debug": "^4.3.4", + "denque": "^2.1.0", + "lodash.defaults": "^4.2.0", + "lodash.isarguments": "^3.1.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.1.0" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ioredis" + } + }, + "node_modules/ioredis/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/ioredis/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/ip-address": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -2281,7 +3059,6 @@ "version": "2.5.1", "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.5.1.tgz", "integrity": "sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==", - "dev": true, "license": "MIT", "bin": { "jiti": "lib/jiti-cli.mjs" @@ -2291,7 +3068,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, "license": "MIT" }, "node_modules/jsonwebtoken": { @@ -2334,19 +3110,25 @@ } }, "node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.3.tgz", + "integrity": "sha512-byiJ0FLRdLdSVSReO/U4E7RoEyOCKnEnEPMjq3HxWtvzLsV08/i5RQKsFVNkCldrCaPr2vDNAOMsfs8T/Hze7g==", "license": "MIT", "dependencies": { - "jwa": "^1.4.1", + "jwa": "^1.4.2", "safe-buffer": "^5.0.1" } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "license": "MIT" + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", "license": "MIT" }, "node_modules/lodash.includes": { @@ -2355,6 +3137,12 @@ "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", "license": "MIT" }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==", + "license": "MIT" + }, "node_modules/lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", @@ -2402,7 +3190,6 @@ "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, "license": "ISC" }, "node_modules/magic-string": { @@ -2485,30 +3272,21 @@ } }, "node_modules/minimatch": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", - "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" + "brace-expansion": "^5.0.2" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", @@ -2519,18 +3297,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -2538,21 +3304,22 @@ "license": "MIT" }, "node_modules/multer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz", - "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/multer/-/multer-2.1.1.tgz", + "integrity": "sha512-mo+QTzKlx8R7E5ylSXxWzGoXoZbOsRMpyitcht8By2KHvMbf3tjwosZ/Mu/XYU6UuJ3VZnODIrak5ZrPiPyB6A==", "license": "MIT", "dependencies": { "append-field": "^1.0.0", "busboy": "^1.6.0", "concat-stream": "^2.0.0", - "mkdirp": "^0.5.6", - "object-assign": "^4.1.1", - "type-is": "^1.6.18", - "xtend": "^4.0.2" + "type-is": "^1.6.18" }, "engines": { "node": ">= 10.16.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/nanoid": { @@ -2587,14 +3354,21 @@ "version": "1.6.7", "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", - "dev": true, "license": "MIT" }, + "node_modules/nodemailer": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-8.0.1.tgz", + "integrity": "sha512-5kcldIXmaEjZcHR6F28IKGSgpmZHaF1IXLWFTG+Xh3S+Cce4MiakLtWY+PlBU69fLbRa8HlaGIrC/QolUpHkhg==", + "license": "MIT-0", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/normalize-package-data": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^7.0.0", @@ -2609,7 +3383,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.6.1.tgz", "integrity": "sha512-hlacBiRiv1k9hZFiphPUkfSQ/ZfQzZDzC+8z0wL3lvDAOUu/2NnChkKuMoMjNur/9OpKuz2QsIeiPVN0xM5Q0w==", - "dev": true, "license": "MIT", "dependencies": { "citty": "^0.1.6", @@ -2650,7 +3423,6 @@ "version": "2.0.11", "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz", "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==", - "dev": true, "license": "MIT" }, "node_modules/on-finished": { @@ -2665,6 +3437,15 @@ "node": ">= 0.8" } }, + "node_modules/on-headers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", @@ -2676,7 +3457,6 @@ "version": "8.3.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==", - "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.26.2", @@ -2746,7 +3526,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, "license": "MIT" }, "node_modules/pathval": { @@ -2763,1080 +3542,1657 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", - "dev": true, "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, "license": "ISC" }, - "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.2.0.tgz", + "integrity": "sha512-2SM/GZGAEkPp3KWORxQZns4M+WSeXbC2HEvmOIJe3Cmiv6ieAJvdVhDldtHqM5J1Y7MrR1XhkBT/rMlhh9FdqQ==", + "license": "MIT", + "dependencies": { + "confbox": "^0.2.2", + "exsolve": "^1.0.7", + "pathe": "^2.0.3" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prisma": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.13.0.tgz", + "integrity": "sha512-dfzORf0AbcEyyzxuv2lEwG8g+WRGF/qDQTpHf/6JoHsyF5MyzCEZwClVaEmw3WXcobgadosOboKUgQU0kFs9kw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/config": "6.13.0", + "@prisma/engines": "6.13.0" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=18.18" + }, + "peerDependencies": { + "typescript": ">=5.1.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/raw-body/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, + "node_modules/read-package-up": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/read-package-up/-/read-package-up-11.0.0.tgz", + "integrity": "sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ==", + "license": "MIT", + "dependencies": { + "find-up-simple": "^1.0.0", + "read-pkg": "^9.0.0", + "type-fest": "^4.6.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-9.0.1.tgz", + "integrity": "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==", + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.3", + "normalize-package-data": "^6.0.0", + "parse-json": "^8.0.0", + "type-fest": "^4.6.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "license": "MIT", "engines": { - "node": ">=12" + "node": ">= 14.18.0" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, - "node_modules/pkg-types": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.2.0.tgz", - "integrity": "sha512-2SM/GZGAEkPp3KWORxQZns4M+WSeXbC2HEvmOIJe3Cmiv6ieAJvdVhDldtHqM5J1Y7MrR1XhkBT/rMlhh9FdqQ==", - "dev": true, + "node_modules/redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", "license": "MIT", - "dependencies": { - "confbox": "^0.2.2", - "exsolve": "^1.0.7", - "pathe": "^2.0.3" + "engines": { + "node": ">=4" } }, - "node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], + "node_modules/redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", "license": "MIT", "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" + "redis-errors": "^1.0.0" }, "engines": { - "node": "^10 || ^12 || >=14" + "node": ">=4" } }, - "node_modules/prisma": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.13.0.tgz", - "integrity": "sha512-dfzORf0AbcEyyzxuv2lEwG8g+WRGF/qDQTpHf/6JoHsyF5MyzCEZwClVaEmw3WXcobgadosOboKUgQU0kFs9kw==", + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/rimraf": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", + "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", + "dev": true, + "license": "ISC", "dependencies": { - "@prisma/config": "6.13.0", - "@prisma/engines": "6.13.0" + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" }, "bin": { - "prisma": "build/index.js" + "rimraf": "dist/esm/bin.mjs" }, "engines": { - "node": ">=18.18" - }, - "peerDependencies": { - "typescript": ">=5.1.0" + "node": "20 || >=22" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "node_modules/rollup": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", + "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==", + "dev": true, "license": "MIT", "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" }, "engines": { - "node": ">= 0.10" + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.59.0", + "@rollup/rollup-android-arm64": "4.59.0", + "@rollup/rollup-darwin-arm64": "4.59.0", + "@rollup/rollup-darwin-x64": "4.59.0", + "@rollup/rollup-freebsd-arm64": "4.59.0", + "@rollup/rollup-freebsd-x64": "4.59.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.59.0", + "@rollup/rollup-linux-arm-musleabihf": "4.59.0", + "@rollup/rollup-linux-arm64-gnu": "4.59.0", + "@rollup/rollup-linux-arm64-musl": "4.59.0", + "@rollup/rollup-linux-loong64-gnu": "4.59.0", + "@rollup/rollup-linux-loong64-musl": "4.59.0", + "@rollup/rollup-linux-ppc64-gnu": "4.59.0", + "@rollup/rollup-linux-ppc64-musl": "4.59.0", + "@rollup/rollup-linux-riscv64-gnu": "4.59.0", + "@rollup/rollup-linux-riscv64-musl": "4.59.0", + "@rollup/rollup-linux-s390x-gnu": "4.59.0", + "@rollup/rollup-linux-x64-gnu": "4.59.0", + "@rollup/rollup-linux-x64-musl": "4.59.0", + "@rollup/rollup-openbsd-x64": "4.59.0", + "@rollup/rollup-openharmony-arm64": "4.59.0", + "@rollup/rollup-win32-arm64-msvc": "4.59.0", + "@rollup/rollup-win32-ia32-msvc": "4.59.0", + "@rollup/rollup-win32-x64-gnu": "4.59.0", + "@rollup/rollup-win32-x64-msvc": "4.59.0", + "fsevents": "~2.3.2" } }, - "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", - "dev": true, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "funding": [ { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" + "type": "github", + "url": "https://github.com/sponsors/feross" }, { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" } ], "license": "MIT" }, - "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=0.6" + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.8.0" } }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.8.0" } }, - "node_modules/rc9": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", - "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/sharp": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz", + "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@img/colour": "^1.0.0", + "detect-libc": "^2.1.2", + "semver": "^7.7.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.34.5", + "@img/sharp-darwin-x64": "0.34.5", + "@img/sharp-libvips-darwin-arm64": "1.2.4", + "@img/sharp-libvips-darwin-x64": "1.2.4", + "@img/sharp-libvips-linux-arm": "1.2.4", + "@img/sharp-libvips-linux-arm64": "1.2.4", + "@img/sharp-libvips-linux-ppc64": "1.2.4", + "@img/sharp-libvips-linux-riscv64": "1.2.4", + "@img/sharp-libvips-linux-s390x": "1.2.4", + "@img/sharp-libvips-linux-x64": "1.2.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", + "@img/sharp-libvips-linuxmusl-x64": "1.2.4", + "@img/sharp-linux-arm": "0.34.5", + "@img/sharp-linux-arm64": "0.34.5", + "@img/sharp-linux-ppc64": "0.34.5", + "@img/sharp-linux-riscv64": "0.34.5", + "@img/sharp-linux-s390x": "0.34.5", + "@img/sharp-linux-x64": "0.34.5", + "@img/sharp-linuxmusl-arm64": "0.34.5", + "@img/sharp-linuxmusl-x64": "0.34.5", + "@img/sharp-wasm32": "0.34.5", + "@img/sharp-win32-arm64": "0.34.5", + "@img/sharp-win32-ia32": "0.34.5", + "@img/sharp-win32-x64": "0.34.5" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "license": "MIT", "dependencies": { - "defu": "^6.1.4", - "destr": "^2.0.3" + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/read-package-up": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/read-package-up/-/read-package-up-11.0.0.tgz", - "integrity": "sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "license": "MIT", - "dependencies": { - "find-up-simple": "^1.0.0", - "read-pkg": "^9.0.0", - "type-fest": "^4.6.0" + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" }, "engines": { - "node": ">=18" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/read-pkg": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-9.0.1.tgz", - "integrity": "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==", - "dev": true, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", "license": "MIT", "dependencies": { - "@types/normalize-package-data": "^2.4.3", - "normalize-package-data": "^6.0.0", - "parse-json": "^8.0.0", - "type-fest": "^4.6.0", - "unicorn-magic": "^0.1.0" + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" }, "engines": { - "node": ">=18" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "license": "MIT", "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" }, "engines": { - "node": ">= 6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "dev": true, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, "engines": { - "node": ">= 14.18.0" + "node": ">= 0.4" }, "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } + "license": "ISC" }, - "node_modules/rimraf": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", - "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "license": "ISC", - "dependencies": { - "glob": "^11.0.0", - "package-json-from-dist": "^1.0.0" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, "engines": { - "node": "20 || >=22" + "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rollup": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.46.2.tgz", - "integrity": "sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg==", + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "license": "MIT", "dependencies": { - "@types/estree": "1.0.8" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.46.2", - "@rollup/rollup-android-arm64": "4.46.2", - "@rollup/rollup-darwin-arm64": "4.46.2", - "@rollup/rollup-darwin-x64": "4.46.2", - "@rollup/rollup-freebsd-arm64": "4.46.2", - "@rollup/rollup-freebsd-x64": "4.46.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.46.2", - "@rollup/rollup-linux-arm-musleabihf": "4.46.2", - "@rollup/rollup-linux-arm64-gnu": "4.46.2", - "@rollup/rollup-linux-arm64-musl": "4.46.2", - "@rollup/rollup-linux-loongarch64-gnu": "4.46.2", - "@rollup/rollup-linux-ppc64-gnu": "4.46.2", - "@rollup/rollup-linux-riscv64-gnu": "4.46.2", - "@rollup/rollup-linux-riscv64-musl": "4.46.2", - "@rollup/rollup-linux-s390x-gnu": "4.46.2", - "@rollup/rollup-linux-x64-gnu": "4.46.2", - "@rollup/rollup-linux-x64-musl": "4.46.2", - "@rollup/rollup-win32-arm64-msvc": "4.46.2", - "@rollup/rollup-win32-ia32-msvc": "4.46.2", - "@rollup/rollup-win32-x64-msvc": "4.46.2", - "fsevents": "~2.3.2" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], + "node_modules/spdx-license-ids": { + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", + "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", + "license": "CC0-1.0" + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, "license": "MIT" }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "node_modules/standard-as-callback": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", + "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==", "license": "MIT" }, - "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/std-env": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "dev": true, + "license": "MIT" + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/send": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", - "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "license": "MIT", "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">= 0.8.0" + "node": ">=8" } }, - "node_modules/send/node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "license": "MIT", "engines": { - "node": ">= 0.8" + "node": ">=8" } }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, "license": "MIT" }, - "node_modules/serve-static": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", - "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "license": "MIT", "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.19.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">= 0.8.0" + "node": ">=8" } }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { - "shebang-regex": "^3.0.0" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" + "js-tokens": "^9.0.1" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/antfu" } }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", + "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==", + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" + "fdir": "^6.5.0", + "picomatch": "^4.0.3" }, "engines": { - "node": ">= 0.4" + "node": ">=12.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/side-channel-map": { + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/toidentifier": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD", + "optional": true + }, + "node_modules/tsx": { + "version": "4.20.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.3.tgz", + "integrity": "sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==", + "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" }, "engines": { - "node": ">= 0.4" + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" + "media-typer": "0.3.0", + "mime-types": "~2.1.24" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true, - "license": "ISC" + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", + "node_modules/typescript": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "license": "MIT" + }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "license": "MIT", "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "node": ">= 0.8" } }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true, - "license": "CC-BY-3.0" + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "license": "MIT", - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "engines": { + "node": ">= 0.4.0" } }, - "node_modules/spdx-license-ids": { - "version": "3.0.21", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", - "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true, - "license": "MIT" - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "node_modules/uuid": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "license": "MIT", - "engines": { - "node": ">= 0.8" + "bin": { + "uuid": "dist/esm/bin/uuid" } }, - "node_modules/std-env": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", - "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", - "dev": true, - "license": "MIT" + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "node_modules/validator": { + "version": "13.15.26", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.26.tgz", + "integrity": "sha512-spH26xU080ydGggxRyR1Yhcbgx+j3y5jbNXk/8L+iRvdIEQ4uTRH2Sgf2dokud6Q4oAtsbNvJ1Ft+9xmm6IZcA==", + "license": "MIT", "engines": { - "node": ">=10.0.0" + "node": ">= 0.10" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" + "engines": { + "node": ">= 0.8" } }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "node_modules/vite": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz", + "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", "dev": true, "license": "MIT", "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "esbuild": "^0.27.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" }, "engines": { - "node": ">=12" + "node": "^20.19.0 || >=22.12.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" }, "engines": { - "node": ">=8" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/vite-node/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "dev": true, "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, "engines": { - "node": ">=8" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "node_modules/vite-node/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", + "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==", + "cpu": [ + "ppc64" + ], "dev": true, "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz", + "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=18" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz", + "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz", + "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/strip-literal": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", - "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz", + "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "js-tokens": "^9.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" } }, - "node_modules/strip-literal/node_modules/js-tokens": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", - "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinybench": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz", + "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/tinyexec": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", - "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==", + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz", + "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/tinyglobby": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", - "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz", + "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" + "node": ">=18" } }, - "node_modules/tinypool": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", - "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz", + "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": ">=18" } }, - "node_modules/tinyrainbow": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", - "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz", + "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=14.0.0" + "node": ">=18" } }, - "node_modules/tinyspy": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", - "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz", + "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=14.0.0" + "node": ">=18" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz", + "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==", + "cpu": [ + "loong64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.6" + "node": ">=18" } }, - "node_modules/tsx": { - "version": "4.20.3", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.3.tgz", - "integrity": "sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==", + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz", + "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==", + "cpu": [ + "mips64el" + ], "dev": true, "license": "MIT", - "dependencies": { - "esbuild": "~0.25.0", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" + "node": ">=18" } }, - "node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz", + "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz", + "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==", + "cpu": [ + "riscv64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 0.6" + "node": ">=18" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "license": "MIT" - }, - "node_modules/typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz", + "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==", + "cpu": [ + "s390x" + ], "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=14.17" + "node": ">=18" } }, - "node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz", + "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/unicorn-magic": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", - "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "node_modules/vite/node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz", + "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz", + "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">= 0.8" + "node": ">=18" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "node_modules/vite/node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz", + "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": ">= 0.4.0" + "node": ">=18" } }, - "node_modules/uuid": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", - "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz", + "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==", + "cpu": [ + "x64" ], + "dev": true, "license": "MIT", - "bin": { - "uuid": "dist/esm/bin/uuid" + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "node_modules/vite/node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz", + "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" } }, - "node_modules/validator": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", - "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz", + "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">= 0.10" + "node": ">=18" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz", + "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">= 0.8" + "node": ">=18" } }, - "node_modules/vite": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.0.6.tgz", - "integrity": "sha512-MHFiOENNBd+Bd9uvc8GEsIzdkn1JxMmEeYX35tI3fv0sJBUTfW5tQsoaOwuY4KhBI09A3dUJ/DXf2yxPVPUceg==", + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz", + "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", - "dependencies": { - "esbuild": "^0.25.0", - "fdir": "^6.4.6", - "picomatch": "^4.0.3", - "postcss": "^8.5.6", - "rollup": "^4.40.0", - "tinyglobby": "^0.2.14" - }, - "bin": { - "vite": "bin/vite.js" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^20.19.0 || >=22.12.0", - "jiti": ">=1.21.0", - "less": "^4.0.0", - "lightningcss": "^1.21.0", - "sass": "^1.70.0", - "sass-embedded": "^1.70.0", - "stylus": ">=0.54.8", - "sugarss": "^5.0.0", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } + "node": ">=18" } }, - "node_modules/vite-node": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", - "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz", + "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.4.1", - "es-module-lexer": "^1.7.0", - "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" + "node": ">=18" } }, - "node_modules/vite-node/node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "node_modules/vite/node_modules/esbuild": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", + "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", "dev": true, + "hasInstallScript": true, "license": "MIT", - "dependencies": { - "ms": "^2.1.3" + "bin": { + "esbuild": "bin/esbuild" }, "engines": { - "node": ">=6.0" + "node": ">=18" }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.3", + "@esbuild/android-arm": "0.27.3", + "@esbuild/android-arm64": "0.27.3", + "@esbuild/android-x64": "0.27.3", + "@esbuild/darwin-arm64": "0.27.3", + "@esbuild/darwin-x64": "0.27.3", + "@esbuild/freebsd-arm64": "0.27.3", + "@esbuild/freebsd-x64": "0.27.3", + "@esbuild/linux-arm": "0.27.3", + "@esbuild/linux-arm64": "0.27.3", + "@esbuild/linux-ia32": "0.27.3", + "@esbuild/linux-loong64": "0.27.3", + "@esbuild/linux-mips64el": "0.27.3", + "@esbuild/linux-ppc64": "0.27.3", + "@esbuild/linux-riscv64": "0.27.3", + "@esbuild/linux-s390x": "0.27.3", + "@esbuild/linux-x64": "0.27.3", + "@esbuild/netbsd-arm64": "0.27.3", + "@esbuild/netbsd-x64": "0.27.3", + "@esbuild/openbsd-arm64": "0.27.3", + "@esbuild/openbsd-x64": "0.27.3", + "@esbuild/openharmony-arm64": "0.27.3", + "@esbuild/sunos-x64": "0.27.3", + "@esbuild/win32-arm64": "0.27.3", + "@esbuild/win32-ia32": "0.27.3", + "@esbuild/win32-x64": "0.27.3" } }, - "node_modules/vite-node/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, "node_modules/vitest": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", @@ -4073,15 +5429,6 @@ "node": ">=8" } }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, "node_modules/zod": { "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", diff --git a/backend/package.json b/backend/package.json index 5de0680..15f073a 100644 --- a/backend/package.json +++ b/backend/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "scripts": { "dev": "tsx watch index.ts", - "build": "rimraf dist && tsc && echo TypeScript compilation completed && echo Build artifacts generated successfully", + "build": "rm -rf dist && tsc && echo TypeScript compilation completed && echo Build artifacts generated successfully", "start": "node dist/index.js", "test": "vitest --run", "postinstall": "prisma generate", @@ -14,32 +14,46 @@ "db:migrate": "prisma migrate dev", "db:studio": "prisma studio", "db:reset": "prisma migrate reset", - "build:verbose": "rimraf dist && tsc --listFiles && echo TypeScript compilation completed with verbose output", + "db:seed": "tsx prisma/seed.ts", + "build:verbose": "rm -rf dist && tsc --listFiles && echo TypeScript compilation completed with verbose output", "build:check": "tsc --noEmit && echo Type checking passed" }, "dependencies": { "@prisma/client": "^6.13.0", + "@types/bcryptjs": "^2.4.6", + "@types/compression": "^1.8.1", + "@types/cookie-parser": "^1.4.10", + "@types/cors": "^2.8.19", + "@types/express": "^5.0.3", + "@types/ioredis": "^4.28.10", + "@types/jsonwebtoken": "^9.0.10", + "@types/multer": "^2.0.0", + "@types/nodemailer": "^7.0.11", + "@types/sharp": "^0.31.1", + "@types/uuid": "^10.0.0", "bcryptjs": "^3.0.2", + "compression": "^1.8.1", + "cookie-parser": "^1.4.7", "cors": "^2.8.5", + "crypto": "^1.0.1", "dotenv": "^17.2.1", "express": "^4.18.2", + "express-rate-limit": "^8.3.0", "express-validator": "^7.2.1", + "helmet": "^8.1.0", + "ioredis": "^5.10.0", "jsonwebtoken": "^9.0.2", "multer": "^2.0.2", + "nodemailer": "^8.0.1", + "prisma": "^6.13.0", + "sharp": "^0.34.5", + "typescript": "^5.5.3", "uuid": "^11.1.0", "zod": "^3.23.8" }, "devDependencies": { - "@types/bcryptjs": "^2.4.6", - "@types/cors": "^2.8.19", - "@types/express": "^5.0.3", - "@types/jsonwebtoken": "^9.0.10", - "@types/multer": "^2.0.0", - "@types/uuid": "^10.0.0", - "prisma": "^6.13.0", "rimraf": "^6.0.1", "tsx": "^4.20.3", - "typescript": "^5.5.3", "vitest": "^3.1.4" } } diff --git a/backend/prisma/migrations/20260307160801_production_upgrade/migration.sql b/backend/prisma/migrations/20260307160801_production_upgrade/migration.sql new file mode 100644 index 0000000..32dcca5 --- /dev/null +++ b/backend/prisma/migrations/20260307160801_production_upgrade/migration.sql @@ -0,0 +1,230 @@ +/* + Warnings: + + - You are about to drop the column `department` on the `Grievance` table. All the data in the column will be lost. + +*/ +-- AlterTable +ALTER TABLE "public"."Admin" ADD COLUMN "departmentId" INTEGER, +ADD COLUMN "isActive" BOOLEAN NOT NULL DEFAULT true, +ADD COLUMN "lastLogin" TIMESTAMP(3), +ADD COLUMN "lockedUntil" TIMESTAMP(3), +ADD COLUMN "loginAttempts" INTEGER NOT NULL DEFAULT 0, +ADD COLUMN "phone" TEXT, +ALTER COLUMN "role" SET DEFAULT 'department_admin'; + +-- AlterTable +ALTER TABLE "public"."CertificateService" ADD COLUMN "departmentId" INTEGER; + +-- AlterTable +ALTER TABLE "public"."ContactService" ADD COLUMN "departmentId" INTEGER; + +-- AlterTable +ALTER TABLE "public"."Feedback" ADD COLUMN "departmentId" INTEGER; + +-- AlterTable +ALTER TABLE "public"."Grievance" DROP COLUMN "department", +ADD COLUMN "departmentId" INTEGER, +ADD COLUMN "escalatedAt" TIMESTAMP(3), +ADD COLUMN "escalatedTo" TEXT, +ADD COLUMN "responseCount" INTEGER NOT NULL DEFAULT 0, +ADD COLUMN "slaDeadline" TIMESTAMP(3); + +-- AlterTable +ALTER TABLE "public"."SchemeService" ADD COLUMN "departmentId" INTEGER; + +-- CreateTable +CREATE TABLE "public"."Department" ( + "id" SERIAL NOT NULL, + "name" TEXT NOT NULL, + "code" TEXT NOT NULL, + "description" TEXT, + "contactEmail" TEXT, + "contactPhone" TEXT, + "isActive" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "Department_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "public"."AuditLog" ( + "id" SERIAL NOT NULL, + "action" TEXT NOT NULL, + "entity" TEXT NOT NULL, + "entityId" INTEGER, + "details" JSONB, + "ipAddress" TEXT, + "userAgent" TEXT, + "adminId" INTEGER, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "AuditLog_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "public"."Session" ( + "id" TEXT NOT NULL, + "adminId" INTEGER NOT NULL, + "token" TEXT NOT NULL, + "ipAddress" TEXT, + "userAgent" TEXT, + "expiresAt" TIMESTAMP(3) NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "isActive" BOOLEAN NOT NULL DEFAULT true, + + CONSTRAINT "Session_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "public"."Notification" ( + "id" SERIAL NOT NULL, + "adminId" INTEGER NOT NULL, + "title" TEXT NOT NULL, + "message" TEXT NOT NULL, + "type" TEXT NOT NULL, + "isRead" BOOLEAN NOT NULL DEFAULT false, + "link" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "Notification_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "public"."GrievanceActivity" ( + "id" SERIAL NOT NULL, + "grievanceId" INTEGER NOT NULL, + "action" TEXT NOT NULL, + "fromValue" TEXT, + "toValue" TEXT, + "note" TEXT, + "performedBy" TEXT, + "adminId" INTEGER, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "GrievanceActivity_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "Department_name_key" ON "public"."Department"("name"); + +-- CreateIndex +CREATE UNIQUE INDEX "Department_code_key" ON "public"."Department"("code"); + +-- CreateIndex +CREATE INDEX "AuditLog_adminId_idx" ON "public"."AuditLog"("adminId"); + +-- CreateIndex +CREATE INDEX "AuditLog_entity_entityId_idx" ON "public"."AuditLog"("entity", "entityId"); + +-- CreateIndex +CREATE INDEX "AuditLog_createdAt_idx" ON "public"."AuditLog"("createdAt"); + +-- CreateIndex +CREATE UNIQUE INDEX "Session_token_key" ON "public"."Session"("token"); + +-- CreateIndex +CREATE INDEX "Session_adminId_idx" ON "public"."Session"("adminId"); + +-- CreateIndex +CREATE INDEX "Session_token_idx" ON "public"."Session"("token"); + +-- CreateIndex +CREATE INDEX "Session_expiresAt_idx" ON "public"."Session"("expiresAt"); + +-- CreateIndex +CREATE INDEX "Notification_adminId_isRead_idx" ON "public"."Notification"("adminId", "isRead"); + +-- CreateIndex +CREATE INDEX "GrievanceActivity_grievanceId_idx" ON "public"."GrievanceActivity"("grievanceId"); + +-- CreateIndex +CREATE INDEX "Admin_email_idx" ON "public"."Admin"("email"); + +-- CreateIndex +CREATE INDEX "Admin_role_idx" ON "public"."Admin"("role"); + +-- CreateIndex +CREATE INDEX "Admin_departmentId_idx" ON "public"."Admin"("departmentId"); + +-- CreateIndex +CREATE INDEX "CertificateService_status_isActive_idx" ON "public"."CertificateService"("status", "isActive"); + +-- CreateIndex +CREATE INDEX "CertificateService_departmentId_status_idx" ON "public"."CertificateService"("departmentId", "status"); + +-- CreateIndex +CREATE INDEX "CertificateService_createdAt_idx" ON "public"."CertificateService"("createdAt"); + +-- CreateIndex +CREATE INDEX "ContactService_status_isActive_idx" ON "public"."ContactService"("status", "isActive"); + +-- CreateIndex +CREATE INDEX "ContactService_departmentId_status_idx" ON "public"."ContactService"("departmentId", "status"); + +-- CreateIndex +CREATE INDEX "ContactService_createdAt_idx" ON "public"."ContactService"("createdAt"); + +-- CreateIndex +CREATE INDEX "Feedback_status_departmentId_idx" ON "public"."Feedback"("status", "departmentId"); + +-- CreateIndex +CREATE INDEX "Feedback_createdAt_idx" ON "public"."Feedback"("createdAt"); + +-- CreateIndex +CREATE INDEX "Feedback_email_idx" ON "public"."Feedback"("email"); + +-- CreateIndex +CREATE INDEX "Grievance_status_departmentId_idx" ON "public"."Grievance"("status", "departmentId"); + +-- CreateIndex +CREATE INDEX "Grievance_createdAt_idx" ON "public"."Grievance"("createdAt"); + +-- CreateIndex +CREATE INDEX "Grievance_trackingId_idx" ON "public"."Grievance"("trackingId"); + +-- CreateIndex +CREATE INDEX "Grievance_email_idx" ON "public"."Grievance"("email"); + +-- CreateIndex +CREATE INDEX "Grievance_priority_status_idx" ON "public"."Grievance"("priority", "status"); + +-- CreateIndex +CREATE INDEX "SchemeService_status_isActive_idx" ON "public"."SchemeService"("status", "isActive"); + +-- CreateIndex +CREATE INDEX "SchemeService_departmentId_status_idx" ON "public"."SchemeService"("departmentId", "status"); + +-- CreateIndex +CREATE INDEX "SchemeService_createdAt_idx" ON "public"."SchemeService"("createdAt"); + +-- AddForeignKey +ALTER TABLE "public"."AuditLog" ADD CONSTRAINT "AuditLog_adminId_fkey" FOREIGN KEY ("adminId") REFERENCES "public"."Admin"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "public"."Session" ADD CONSTRAINT "Session_adminId_fkey" FOREIGN KEY ("adminId") REFERENCES "public"."Admin"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "public"."Notification" ADD CONSTRAINT "Notification_adminId_fkey" FOREIGN KEY ("adminId") REFERENCES "public"."Admin"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "public"."GrievanceActivity" ADD CONSTRAINT "GrievanceActivity_grievanceId_fkey" FOREIGN KEY ("grievanceId") REFERENCES "public"."Grievance"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "public"."Admin" ADD CONSTRAINT "Admin_departmentId_fkey" FOREIGN KEY ("departmentId") REFERENCES "public"."Department"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "public"."SchemeService" ADD CONSTRAINT "SchemeService_departmentId_fkey" FOREIGN KEY ("departmentId") REFERENCES "public"."Department"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "public"."CertificateService" ADD CONSTRAINT "CertificateService_departmentId_fkey" FOREIGN KEY ("departmentId") REFERENCES "public"."Department"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "public"."ContactService" ADD CONSTRAINT "ContactService_departmentId_fkey" FOREIGN KEY ("departmentId") REFERENCES "public"."Department"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "public"."Feedback" ADD CONSTRAINT "Feedback_departmentId_fkey" FOREIGN KEY ("departmentId") REFERENCES "public"."Department"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "public"."Grievance" ADD CONSTRAINT "Grievance_departmentId_fkey" FOREIGN KEY ("departmentId") REFERENCES "public"."Department"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/backend/prisma/schema.prisma b/backend/prisma/schema.prisma index bb12943..7fefe87 100644 --- a/backend/prisma/schema.prisma +++ b/backend/prisma/schema.prisma @@ -10,18 +10,128 @@ datasource db { url = env("DATABASE_URL") } -model Admin { +// ─── Department Model ─── +model Department { + id Int @id @default(autoincrement()) + name String @unique + code String @unique // e.g., "POL", "REV", "HLT" + description String? + contactEmail String? + contactPhone String? + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + // Relations + admins Admin[] + schemeServices SchemeService[] + certificateServices CertificateService[] + contactServices ContactService[] + grievances Grievance[] + feedbacks Feedback[] +} + +// ─── Audit Log ─── +model AuditLog { id Int @id @default(autoincrement()) - email String @unique - password String - name String - role String @default("admin") + action String // CREATE, UPDATE, DELETE, LOGIN, etc. + entity String // Admin, SchemeService, Grievance, etc. + entityId Int? + details Json? // What changed (old value -> new value) + ipAddress String? + userAgent String? + adminId Int? + admin Admin? @relation(fields: [adminId], references: [id]) createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt + + @@index([adminId]) + @@index([entity, entityId]) + @@index([createdAt]) +} + +// ─── Session Management (for token revocation) ─── +model Session { + id String @id @default(uuid()) + adminId Int + admin Admin @relation(fields: [adminId], references: [id], onDelete: Cascade) + token String @unique + ipAddress String? + userAgent String? + expiresAt DateTime + createdAt DateTime @default(now()) + isActive Boolean @default(true) + + @@index([adminId]) + @@index([token]) + @@index([expiresAt]) +} + +// ─── Notification System ─── +model Notification { + id Int @id @default(autoincrement()) + adminId Int + admin Admin @relation(fields: [adminId], references: [id], onDelete: Cascade) + title String + message String + type String // grievance_new, feedback_new, escalation, system + isRead Boolean @default(false) + link String? // Deep link to the relevant page + createdAt DateTime @default(now()) + + @@index([adminId, isRead]) +} + +// ─── Grievance Activity Log ─── +model GrievanceActivity { + id Int @id @default(autoincrement()) + grievanceId Int + grievance Grievance @relation(fields: [grievanceId], references: [id], onDelete: Cascade) + action String // status_change, assigned, note_added, escalated + fromValue String? + toValue String? + note String? + performedBy String? // Admin name + adminId Int? + createdAt DateTime @default(now()) + + @@index([grievanceId]) +} + +model Admin { + id Int @id @default(autoincrement()) + email String @unique + password String + name String + phone String? + role String @default("department_admin") // "super_admin" | "department_admin" | "individual_admin" + isActive Boolean @default(true) + lastLogin DateTime? + loginAttempts Int @default(0) + lockedUntil DateTime? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + // Department relation + departmentId Int? + department Department? @relation(fields: [departmentId], references: [id]) + + // Assigned services for individual admins (e.g. ["schemes", "certificates", "contacts", "grievances", "feedback"]) + assignedServices String[] @default([]) + + // Track who created this admin + createdById Int? schemeServices SchemeService[] certificateServices CertificateService[] contactServices ContactService[] + auditLogs AuditLog[] + sessions Session[] + notifications Notification[] + + @@index([email]) + @@index([role]) + @@index([departmentId]) + @@index([createdById]) } model SchemeService { @@ -34,7 +144,7 @@ model SchemeService { onlineUrl String? offlineAddress String? status String @default("draft") // draft, pending, published - isActive Boolean @default(true) // Admin dashboard control + isActive Boolean @default(true) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -42,6 +152,10 @@ model SchemeService { adminId Int admin Admin @relation(fields: [adminId], references: [id]) + // Department relation + departmentId Int? + department Department? @relation(fields: [departmentId], references: [id]) + // Extended details eligibilityDetails String[] schemeDetails String[] @@ -64,9 +178,19 @@ model SchemeService { docLost String? docSurrender String? + // Publisher tracking + publishedBy Int? + publishedByName String? + pdfUrl String? + // Related entities contacts ContactPerson[] documents SupportiveDocument[] + + @@index([status, isActive]) + @@index([departmentId, status]) + @@index([createdAt]) + @@index([adminId]) } model ContactPerson { @@ -104,8 +228,8 @@ model CertificateService { applicationMode String onlineUrl String? offlineAddress String? - status String @default("draft") // draft, pending, published - isActive Boolean @default(true) // Admin dashboard control + status String @default("draft") + isActive Boolean @default(true) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -113,6 +237,10 @@ model CertificateService { adminId Int admin Admin @relation(fields: [adminId], references: [id]) + // Department relation + departmentId Int? + department Department? @relation(fields: [departmentId], references: [id]) + // Extended details eligibilityDetails String[] certificateDetails String[] @@ -134,11 +262,21 @@ model CertificateService { docLost String? docSurrender String? + // Publisher tracking + publishedBy Int? + publishedByName String? + pdfUrl String? + // Related entities contacts CertificateContact[] documents CertificateDocument[] processSteps CertificateProcessStep[] eligibilityItems CertificateEligibility[] + + @@index([status, isActive]) + @@index([departmentId, status]) + @@index([createdAt]) + @@index([adminId]) } model CertificateContact { @@ -151,7 +289,7 @@ model CertificateContact { designation String contact String email String - applicationType String @default("New Application") // New Application, Lost Application, etc. + applicationType String @default("New Application") certificateServiceId Int certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade) @@ -163,7 +301,7 @@ model CertificateDocument { documentType String validProof String isRequired Boolean @default(true) - applicationType String @default("New Application") // New Application, Lost Application, etc. + applicationType String @default("New Application") certificateServiceId Int certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade) @@ -173,7 +311,7 @@ model CertificateProcessStep { id Int @id @default(autoincrement()) slNo Int stepDetails String - applicationType String @default("New Application") // New Application, Lost Application, etc. + applicationType String @default("New Application") certificateServiceId Int certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade) @@ -182,7 +320,7 @@ model CertificateProcessStep { model CertificateEligibility { id Int @id @default(autoincrement()) eligibilityDetail String - applicationType String @default("New Application") // New Application, Lost Application, etc. + applicationType String @default("New Application") certificateServiceId Int certificateService CertificateService @relation(fields: [certificateServiceId], references: [id], onDelete: Cascade) @@ -197,8 +335,8 @@ model ContactService { applicationMode String onlineUrl String? offlineAddress String? - status String @default("draft") // draft, pending, published - isActive Boolean @default(true) // Admin dashboard control + status String @default("draft") + isActive Boolean @default(true) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -206,6 +344,10 @@ model ContactService { adminId Int admin Admin @relation(fields: [adminId], references: [id]) + // Department relation + departmentId Int? + department Department? @relation(fields: [departmentId], references: [id]) + // Extended details eligibilityDetails String[] contactDetails String[] @@ -223,9 +365,19 @@ model ContactService { docLost String? docSurrender String? + // Publisher tracking + publishedBy Int? + publishedByName String? + pdfUrl String? + // Related entities contacts ContactServiceContact[] documents ContactServiceDocument[] + + @@index([status, isActive]) + @@index([departmentId, status]) + @@index([createdAt]) + @@index([adminId]) } model ContactServiceContact { @@ -259,11 +411,11 @@ model ContactServiceDocument { model Post { id Int @id @default(autoincrement()) - postName String // Changed from 'title' to match frontend - rank String // Changed from 'level' to match frontend + postName String + rank String description String? department String? - status String @default("active") // active, inactive + status String @default("active") createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -281,10 +433,10 @@ model Employee { email String phone String designation String - employeeId String? // Employee ID/Number (optional) + employeeId String? joiningDate DateTime? salary Float? - status String @default("active") // active, inactive, on_leave + status String @default("active") createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -296,45 +448,80 @@ model Employee { model Feedback { id Int @id @default(autoincrement()) name String - email String? // Made optional for WhatsApp bot compatibility + email String? phone String? - subject String @default("General Feedback") // Made optional with default - message String @default("") // Made optional with default - comment String? // Added for WhatsApp bot compatibility - rating Int? // 1-5 star rating (optional) - category String? // General, Service, Technical, etc. - serviceType String? // Added for WhatsApp bot compatibility - source String @default("web") // web, whatsapp, mobile - status String @default("new") // new, resolved + subject String @default("General Feedback") + message String @default("") + comment String? + rating Int? + category String? + serviceType String? + source String @default("web") + status String @default("new") createdAt DateTime @default(now()) updatedAt DateTime @updatedAt resolvedAt DateTime? - resolvedBy String? // Admin name who resolved it - adminNotes String? // Internal notes by admin + resolvedBy String? + adminNotes String? + + // Department relation + departmentId Int? + department Department? @relation(fields: [departmentId], references: [id]) + + @@index([status, departmentId]) + @@index([createdAt]) + @@index([email]) } model Grievance { - id Int @id @default(autoincrement()) - name String - email String - phone String - address String - subject String - description String - category String? // Service Related, Technical, Policy, etc. - department String? // Added for WhatsApp bot compatibility - priority String @default("medium") // low, medium, high, urgent - status String @default("new") // new, pending, solved - attachments String[] // File paths or URLs - source String @default("web") // web, whatsapp, mobile - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt + id Int @id @default(autoincrement()) + name String + email String + phone String + address String + subject String + description String + category String? + priority String @default("medium") + status String @default("new") + attachments String[] + imageUrl String? + source String @default("web") + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt // Admin tracking - assignedTo String? // Admin name who is handling - adminNotes String? // Internal notes by admin - resolvedAt DateTime? + assignedTo String? + adminNotes String? + resolvedAt DateTime? // Tracking information - trackingId String @unique // Unique tracking ID for users + trackingId String @unique + + // Department relation + departmentId Int? + department Department? @relation(fields: [departmentId], references: [id]) + activities GrievanceActivity[] + + // Escalation & SLA + escalatedAt DateTime? + escalatedTo String? + slaDeadline DateTime? + responseCount Int @default(0) + + @@index([status, departmentId]) + @@index([createdAt]) + @@index([email]) + @@index([priority, status]) +} + +// ─── OTP Verification ─── +model VerificationOTP { + id Int @id @default(autoincrement()) + email String @unique + otp String + expiresAt DateTime + createdAt DateTime @default(now()) + + @@index([email]) } diff --git a/backend/prisma/seed.ts b/backend/prisma/seed.ts new file mode 100644 index 0000000..e924d67 --- /dev/null +++ b/backend/prisma/seed.ts @@ -0,0 +1,738 @@ +import { PrismaClient } from "@prisma/client"; +import bcrypt from "bcryptjs"; + +const prisma = new PrismaClient(); + +type DepartmentSeed = { + name: string; + code: string; + description: string; + contactEmail: string; + contactPhone: string; + schemeType: string; + certificateType: string; +}; + +const departmentsData: DepartmentSeed[] = [ + { + name: "Police Department", + code: "POL", + description: "Law enforcement, FIR services, citizen safety and emergency response.", + contactEmail: "contact.police@gov.in", + contactPhone: "1800-120-0101", + schemeType: "Central", + certificateType: "Public Safety", + }, + { + name: "Revenue Department", + code: "REV", + description: "Land records, tax assessments, registrations and mutations.", + contactEmail: "contact.revenue@gov.in", + contactPhone: "1800-120-0102", + schemeType: "State", + certificateType: "Revenue", + }, + { + name: "Health Department", + code: "HLT", + description: "Primary and tertiary healthcare, preventive care, public health programs.", + contactEmail: "contact.health@gov.in", + contactPhone: "1800-120-0103", + schemeType: "Healthcare", + certificateType: "Medical", + }, + { + name: "Education Department", + code: "EDU", + description: "School administration, scholarships, examinations and literacy.", + contactEmail: "contact.education@gov.in", + contactPhone: "1800-120-0104", + schemeType: "Education", + certificateType: "Academic", + }, + { + name: "Public Works Department", + code: "PWD", + description: "Road and bridge works, building maintenance, civic infrastructure.", + contactEmail: "contact.pwd@gov.in", + contactPhone: "1800-120-0105", + schemeType: "State", + certificateType: "Infrastructure", + }, + { + name: "Agriculture Department", + code: "AGR", + description: "Farmer support, crop advisory, irrigation and subsidy delivery.", + contactEmail: "contact.agri@gov.in", + contactPhone: "1800-120-0106", + schemeType: "Agriculture", + certificateType: "Agricultural", + }, + { + name: "Social Welfare", + code: "SOC", + description: "Pensions, disability support, social security and inclusion schemes.", + contactEmail: "contact.social@gov.in", + contactPhone: "1800-120-0107", + schemeType: "Social Welfare", + certificateType: "Welfare", + }, + { + name: "Water Resources Department", + code: "WRD", + description: "Drinking water supply, irrigation planning and watershed management.", + contactEmail: "contact.water@gov.in", + contactPhone: "1800-120-0108", + schemeType: "State", + certificateType: "Water Resources", + }, + { + name: "Electricity Department", + code: "ELC", + description: "Power distribution, metering, billing and new electrical connections.", + contactEmail: "contact.electricity@gov.in", + contactPhone: "1800-120-0109", + schemeType: "Central", + certificateType: "Electrical", + }, + { + name: "Transport Department", + code: "TRN", + description: "Licensing, registrations, permits, road transport facilitation.", + contactEmail: "contact.transport@gov.in", + contactPhone: "1800-120-0110", + schemeType: "Employment", + certificateType: "Transport", + }, +]; + +function buildSchemeDetails(dept: DepartmentSeed) { + return { + name: `${dept.name} Integrated Citizen Assistance Scheme`, + summary: `A detailed, multi-component assistance scheme by the ${dept.name} focused on service access, subsidies, grievance support, and citizen facilitation through digital and field channels.`, + type: dept.schemeType, + targetAudience: [ + "Citizens", + "Students", + "Women", + "Senior Citizens", + "Persons with Disabilities", + "Rural Households", + "Urban Low-Income Families", + ], + applicationMode: "both", + onlineUrl: `https://${dept.code.toLowerCase()}.gov.in/schemes/integrated-assistance`, + offlineAddress: `${dept.name} Citizen Facilitation Center, State Secretariat Campus`, + eligibilityDetails: [ + "Applicant must be a permanent resident of the state with a valid domicile certificate.", + "Family annual income should be within the threshold notified in the latest department circular.", + "Applicant should not be a duplicate beneficiary of equivalent central or state benefit under the same category.", + "Valid Aadhaar and mobile number linked with bank account is mandatory for DBT-enabled components.", + "Priority categories include widows, single mothers, landless workers, and households in notified vulnerable clusters.", + "Applicants with pending fraud or blacklisting records in departmental systems are ineligible until cleared.", + "For student-linked benefits, enrollment verification through recognized institutions is required.", + "For business-linked benefits, valid UDYAM/GST registration should be provided where applicable.", + ], + schemeDetails: [ + "Provides direct financial support in quarterly cycles through Aadhaar-enabled DBT.", + "Includes optional service vouchers redeemable at empaneled centers for priority services.", + "Supports both online and assisted offline application workflows through district facilitation desks.", + "Auto-tracks SLA milestones and notifies applicants via SMS/email for each processing stage.", + "Integrates grievance escalation matrix with department nodal officers for delayed applications.", + "Offers annual compliance renewal process to maintain beneficiary eligibility continuity.", + "Maintains audit-ready digital logs for each verification and sanction decision.", + "Provides district-level dashboard analytics for workload balancing and pendency review.", + ], + processDetails: [ + "1. Create applicant profile with eKYC and contact verification.", + "2. Select benefit category and complete rule-driven application form.", + "3. Upload mandatory and conditional documents in PDF/JPEG format.", + "4. Application receives block-level scrutiny and field verification where required.", + "5. District authority performs sanction check and approves/rejects with reasons.", + "6. Approved applications are queued for treasury/DBT disbursal cycle.", + "7. Beneficiary receives sanction order and downloadable acknowledgment.", + "8. Renewal reminder is generated before annual validity expiry.", + ], + benefitDetails: [ + "Quarterly financial assistance between INR 3,000 and INR 15,000 based on category.", + "Fee reimbursement for selected citizen-facing services capped per policy.", + "Priority processing window for emergency and vulnerable-category cases.", + "Access to helpline and assisted service counters without additional facilitation charge.", + "Eligibility for linked complementary departmental micro-schemes.", + ], + applicationProcess: [ + "Profile Creation", + "Application Drafting", + "Document Upload", + "Verification", + "Approval Workflow", + "Benefit Disbursal", + "Post-Sanction Monitoring", + ], + requiredDocuments: [ + "Aadhaar Card", + "Domicile Certificate", + "Income Certificate", + "Recent Passport Photograph", + "Bank Passbook (first page)", + "Category Certificate (if applicable)", + "Disability Certificate (if applicable)", + "Institution/Employer Letter (category specific)", + ], + processNew: "New applications are processed through eKYC, document scrutiny, and district-level sanction with a target SLA of 30 calendar days.", + processUpdate: "Update requests allow correction of demographic, bank, and category-linked data after OTP-authenticated consent and validation checks.", + processLost: "For lost sanction letters/cards, a duplicate can be requested using registered mobile + declaration and is issued within 7 working days.", + processSurrender: "Voluntary surrender is accepted online/offline with declaration; pending dues are reconciled and closure order is generated.", + docNew: "Identity, address, income, and category proofs are mandatory for new applications.", + docUpdate: "Only changed fields require supporting documents, along with a self-declaration for data correction.", + docLost: "Self-declaration and FIR/DD entry (if available) are accepted for duplicate issuance.", + docSurrender: "Signed surrender request and any issued physical artifacts are required where applicable.", + }; +} + +function buildCertificateMatrices(dept: DepartmentSeed, index: number) { + const appTypes = [ + "New Application", + "Update Application", + "Lost Application", + "Surrender Application", + ] as const; + + const processSteps = appTypes.flatMap((applicationType) => [ + { + slNo: 1, + stepDetails: `Register request for ${applicationType.toLowerCase()} and generate acknowledgement token.`, + applicationType, + }, + { + slNo: 2, + stepDetails: "Submit mandatory and conditional documents in prescribed format.", + applicationType, + }, + { + slNo: 3, + stepDetails: "Department officer performs digital scrutiny and field verification (if required).", + applicationType, + }, + { + slNo: 4, + stepDetails: "Competent authority records decision and digitally signs outcome document.", + applicationType, + }, + { + slNo: 5, + stepDetails: "Citizen receives downloadable certificate/order and SMS/email notification.", + applicationType, + }, + ]); + + const eligibilityItems = appTypes.flatMap((applicationType) => [ + { + eligibilityDetail: `Applicant must satisfy ${applicationType.toLowerCase()} criteria notified by ${dept.name}.`, + applicationType, + }, + { + eligibilityDetail: "Applicant identity must be verifiable through approved government ID.", + applicationType, + }, + { + eligibilityDetail: "No unresolved compliance mismatch should exist in departmental records.", + applicationType, + }, + ]); + + const documents = appTypes.flatMap((applicationType) => [ + { + slNo: 1, + documentType: "Identity Proof", + validProof: "Aadhaar / Passport / Voter ID", + isRequired: true, + applicationType, + }, + { + slNo: 2, + documentType: "Address Proof", + validProof: "Utility Bill / Ration Card / Lease Document", + isRequired: true, + applicationType, + }, + { + slNo: 3, + documentType: "Supporting Proof", + validProof: + applicationType === "Lost Application" + ? "FIR / DD Entry / Signed Loss Declaration" + : applicationType === "Update Application" + ? "Previous Certificate + Change Supporting Document" + : applicationType === "Surrender Application" + ? "Surrender Declaration + Original Certificate" + : "Application-specific evidence as per service rulebook", + isRequired: true, + applicationType, + }, + ]); + + const contacts = appTypes.map((applicationType, idx) => ({ + serviceName: `${dept.code} Unified Certificate Service`, + district: `District ${index + 1}`, + subDistrict: idx % 2 === 0 ? "Central" : "North", + block: idx % 2 === 0 ? "Block A" : "Block B", + name: `${dept.code} Certificate Officer ${idx + 1}`, + designation: "Verification & Issuance Officer", + contact: `88${index}${idx}77554${idx}`.slice(0, 10), + email: `cert.${applicationType.toLowerCase().split(" ")[0]}.${dept.code.toLowerCase()}@gov.in`, + applicationType, + })); + + return { processSteps, eligibilityItems, documents, contacts }; +} + +function buildContactOffices(dept: DepartmentSeed, index: number) { + return [ + { + serviceName: `${dept.name} State Control Office`, + district: "State Capital", + subDistrict: "Central", + block: "Secretariat Block", + name: `${dept.code} Central Helpdesk`, + designation: "Chief Public Information Officer", + contact: `1800-42${(500 + index).toString().padStart(4, "0")}`, + email: `cpio.${dept.code.toLowerCase()}@gov.in`, + posts: { + create: [ + { + postName: "Citizen Support Executive", + rank: "Class C", + description: "Handles first-contact calls, ticket creation, and citizen guidance.", + department: dept.name, + employees: { + create: [ + { + name: `Support Officer ${dept.code}-01`, + email: `support01.${dept.code.toLowerCase()}@gov.in`, + phone: `98${index}1100110`.slice(0, 10), + designation: "Helpdesk Executive", + employeeId: `EMP-${dept.code}-001`, + }, + { + name: `Support Officer ${dept.code}-02`, + email: `support02.${dept.code.toLowerCase()}@gov.in`, + phone: `98${index}1100111`.slice(0, 10), + designation: "Helpdesk Executive", + employeeId: `EMP-${dept.code}-002`, + }, + ], + }, + }, + { + postName: "Grievance Redressal Officer", + rank: "Class B", + description: "Owns escalations, SLA breaches, and final response coordination.", + department: dept.name, + employees: { + create: [ + { + name: `Redressal Officer ${dept.code}-01`, + email: `gro.${dept.code.toLowerCase()}@gov.in`, + phone: `98${index}2200220`.slice(0, 10), + designation: "Senior Grievance Officer", + employeeId: `EMP-${dept.code}-003`, + }, + ], + }, + }, + ], + }, + }, + { + serviceName: `${dept.name} District Facilitation Office`, + district: `District ${index + 1}`, + subDistrict: "North Zone", + block: "Administrative Block", + name: `${dept.code} District Service Office`, + designation: "District Public Information Officer", + contact: `1800-42${(600 + index).toString().padStart(4, "0")}`, + email: `dpio.${dept.code.toLowerCase()}@gov.in`, + posts: { + create: [ + { + postName: "Regional Coordinator", + rank: "Class B", + description: "Coordinates district service camps and inter-office workflows.", + department: dept.name, + employees: { + create: [ + { + name: `Regional Coordinator ${dept.code}-01`, + email: `regional.${dept.code.toLowerCase()}@gov.in`, + phone: `98${index}3300330`.slice(0, 10), + designation: "Coordinator", + employeeId: `EMP-${dept.code}-101`, + }, + ], + }, + }, + { + postName: "Technical Support Officer", + rank: "Class C", + description: "Resolves portal, document upload, and digital certificate issues.", + department: dept.name, + employees: { + create: [ + { + name: `Tech Officer ${dept.code}-01`, + email: `tech.${dept.code.toLowerCase()}@gov.in`, + phone: `98${index}4400440`.slice(0, 10), + designation: "Technical Support", + employeeId: `EMP-${dept.code}-102`, + }, + ], + }, + }, + ], + }, + }, + { + serviceName: `${dept.name} Sub-Division Facilitation Counter`, + district: `District ${index + 1}`, + subDistrict: "South Zone", + block: "Citizen Service Complex", + name: `${dept.code} Sub-Division Counter`, + designation: "Assistant Public Facilitation Officer", + contact: `1800-42${(700 + index).toString().padStart(4, "0")}`, + email: `subdivision.${dept.code.toLowerCase()}@gov.in`, + posts: { + create: [ + { + postName: "Counter Assistant", + rank: "Class D", + description: "Supports walk-in citizens with tokening, form checks, and queue assistance.", + department: dept.name, + employees: { + create: [ + { + name: `Counter Assistant ${dept.code}-01`, + email: `counter.${dept.code.toLowerCase()}@gov.in`, + phone: `98${index}5500550`.slice(0, 10), + designation: "Citizen Counter Assistant", + employeeId: `EMP-${dept.code}-201`, + }, + ], + }, + }, + ], + }, + }, + ]; +} + +async function seed() { + console.log("🌱 Seeding database with comprehensive and deeply detailed sample data...\n"); + + const defaultPassword = "Password@123"; + const hashedPassword = await bcrypt.hash(defaultPassword, 12); + + // Keep departments/admins; refresh service/grievance/feedback data for deterministic results. + await prisma.notification.deleteMany({}); + await prisma.grievanceActivity.deleteMany({}); + await prisma.verificationOTP.deleteMany({}); + await prisma.grievance.deleteMany({}); + await prisma.feedback.deleteMany({}); + await prisma.contactService.deleteMany({}); + await prisma.certificateService.deleteMany({}); + await prisma.schemeService.deleteMany({}); + + const adminCredentials: Array<{ dept: string; email: string; password: string }> = []; + + for (let i = 0; i < departmentsData.length; i++) { + const deptInfo = departmentsData[i]; + + const department = await prisma.department.upsert({ + where: { code: deptInfo.code }, + update: { + name: deptInfo.name, + description: deptInfo.description, + contactEmail: deptInfo.contactEmail, + contactPhone: deptInfo.contactPhone, + isActive: true, + }, + create: { + name: deptInfo.name, + code: deptInfo.code, + description: deptInfo.description, + contactEmail: deptInfo.contactEmail, + contactPhone: deptInfo.contactPhone, + isActive: true, + }, + }); + + const email = `admin@${deptInfo.code.toLowerCase()}.gov.in`; + const admin = await prisma.admin.upsert({ + where: { email }, + update: { + password: hashedPassword, + name: `${deptInfo.name} Admin`, + role: "department_admin", + isActive: true, + departmentId: department.id, + assignedServices: ["schemes", "certificates", "contacts", "grievances", "feedbacks"], + }, + create: { + email, + password: hashedPassword, + name: `${deptInfo.name} Admin`, + role: "department_admin", + isActive: true, + departmentId: department.id, + assignedServices: ["schemes", "certificates", "contacts", "grievances", "feedbacks"], + }, + }); + + adminCredentials.push({ dept: deptInfo.name, email, password: defaultPassword }); + + const scheme = buildSchemeDetails(deptInfo); + await prisma.schemeService.create({ + data: { + name: scheme.name, + summary: scheme.summary, + type: scheme.type, + targetAudience: scheme.targetAudience, + applicationMode: scheme.applicationMode, + onlineUrl: scheme.onlineUrl, + offlineAddress: scheme.offlineAddress, + status: "published", + isActive: true, + adminId: admin.id, + departmentId: department.id, + eligibilityDetails: scheme.eligibilityDetails, + schemeDetails: scheme.schemeDetails, + processDetails: scheme.processDetails, + benefitDetails: scheme.benefitDetails, + applicationProcess: scheme.applicationProcess, + requiredDocuments: scheme.requiredDocuments, + processNew: scheme.processNew, + processUpdate: scheme.processUpdate, + processLost: scheme.processLost, + processSurrender: scheme.processSurrender, + docNew: scheme.docNew, + docUpdate: scheme.docUpdate, + docLost: scheme.docLost, + docSurrender: scheme.docSurrender, + contacts: { + create: [ + { + serviceName: scheme.name, + district: `District ${i + 1}`, + subDistrict: "Central", + block: "Primary Block", + name: `${deptInfo.code} Scheme Nodal Officer`, + designation: "Nodal Scheme Officer", + contact: `99${i}6012345`.slice(0, 10), + email: `scheme.nodal.${deptInfo.code.toLowerCase()}@gov.in`, + }, + { + serviceName: scheme.name, + district: `District ${i + 1}`, + subDistrict: "North", + block: "Block B", + name: `${deptInfo.code} District Implementation Officer`, + designation: "District Implementation Officer", + contact: `99${i}6012346`.slice(0, 10), + email: `scheme.district.${deptInfo.code.toLowerCase()}@gov.in`, + }, + ], + }, + documents: { + create: [ + { slNo: 1, documentType: "Identity Document", validProof: "Aadhaar / Voter ID / Passport", isRequired: true }, + { slNo: 2, documentType: "Address Proof", validProof: "Utility Bill / Domicile / Rent Agreement", isRequired: true }, + { slNo: 3, documentType: "Income Certificate", validProof: "Issued by competent revenue authority", isRequired: true }, + { slNo: 4, documentType: "Bank Verification", validProof: "Passbook or cancelled cheque", isRequired: true }, + { slNo: 5, documentType: "Category Supporting Proof", validProof: "Category/disability/student proofs where applicable", isRequired: false }, + ], + }, + }, + }); + + const certificateMatrices = buildCertificateMatrices(deptInfo, i); + await prisma.certificateService.create({ + data: { + name: `${deptInfo.code} Unified Eligibility Certificate`, + summary: `A highly detailed, multi-scenario certification service by ${deptInfo.name} supporting new, update, lost, and surrender workflows with transparent eligibility and process tracking.`, + type: deptInfo.certificateType, + targetAudience: ["Citizens", "Businesses", "Institutions", "Vendors"], + applicationMode: "both", + onlineUrl: `https://${deptInfo.code.toLowerCase()}.gov.in/certificates/unified-eligibility`, + offlineAddress: `${deptInfo.name} District e-Governance Counter`, + status: "published", + isActive: true, + adminId: admin.id, + departmentId: department.id, + eligibilityDetails: [ + "Applicant must satisfy service-specific statutory and departmental criteria.", + "Applicant profile must not have unresolved fraud/compliance flags.", + "All mandatory documents should be legible and valid on date of submission.", + "In-person verification may be mandated for high-risk categories.", + ], + certificateDetails: [ + "Certificate is digitally signed and downloadable from applicant dashboard.", + "QR-based verification endpoint is embedded for public authenticity checks.", + "Tamper-evident metadata includes issuance date, application type, and issuing authority code.", + "Reissue history and amendment trail are retained for audit and legal traceability.", + ], + processDetails: [ + "Submission and verification are application-type aware (new/update/lost/surrender).", + "Escalation workflow auto-triggers for pending files beyond configured SLA.", + "Service status can be tracked using acknowledgment number and registered contact.", + "Certified output is issued only after mandatory compliance checks pass.", + ], + applicationProcess: [ + "Application Registration", + "Document Upload", + "Preliminary Scrutiny", + "Field Verification (if required)", + "Approving Authority Review", + "Digital Issuance", + ], + requiredDocuments: [ + "Identity Proof", + "Address Proof", + "Service-Specific Supporting Proof", + "Declaration Form", + "Legacy Certificate Copy (for update/lost/surrender)", + ], + processNew: "New application requires full document set and baseline verification before issuance.", + processUpdate: "Update application permits correction/amendment with delta-document validation.", + processLost: "Lost application supports duplicate issuance against declaration and traceable reference.", + processSurrender: "Surrender application records closure intent and archives certificate lifecycle status.", + docNew: "Identity + address + baseline eligibility proofs.", + docUpdate: "Existing certificate + change request evidence.", + docLost: "Loss declaration + FIR/DD reference if available.", + docSurrender: "Surrender declaration + original certificate details.", + processSteps: { create: certificateMatrices.processSteps }, + eligibilityItems: { create: certificateMatrices.eligibilityItems }, + documents: { create: certificateMatrices.documents }, + contacts: { create: certificateMatrices.contacts }, + }, + }); + + await prisma.contactService.create({ + data: { + name: `${deptInfo.name} Contact, Office & Escalation Network`, + summary: `Comprehensive contact service for ${deptInfo.name} with state, district and subdivision offices, mapped posts, designated employees, and escalation channels.`, + type: "General Contacts", + targetAudience: ["Citizens", "Media", "Inter-Department Officers", "Vendors"], + applicationMode: "both", + onlineUrl: `https://${deptInfo.code.toLowerCase()}.gov.in/contact-services`, + offlineAddress: `${deptInfo.name} Main Secretariat Helpdesk and District Facilitation Counters`, + status: "published", + isActive: true, + adminId: admin.id, + departmentId: department.id, + eligibilityDetails: [ + "Open access service for all citizens and organizations requiring official assistance.", + "Emergency escalation available for time-bound or critical service disruptions.", + ], + contactDetails: [ + `Primary Helpline: ${deptInfo.contactPhone}`, + `Nodal Email: ${deptInfo.contactEmail}`, + "Working Hours: 10:00 AM to 6:00 PM (Mon-Sat)", + "Escalation Window: 48 hours from unresolved ticket timestamp", + ], + processDetails: [ + "Citizen raises query via phone/email/portal.", + "Ticket is categorized and routed to office-level post owner.", + "Assigned employee responds and records closure note.", + "Escalation path auto-activates for unresolved or overdue tickets.", + ], + processNew: "New service ticket is assigned to office-level queue and acknowledged instantly.", + processUpdate: "Existing ticket can be updated with additional evidence and comments.", + processLost: "Legacy reference lookup support available when ticket details are partially missing.", + processSurrender: "Users may close ticket voluntarily after confirming resolution.", + docNew: "Optional supporting documents can be attached for faster diagnosis.", + docUpdate: "Additional clarifications/documents can be appended to same ticket.", + docLost: "Identity + service reference details required for lookup.", + docSurrender: "Closure consent confirmation through portal or recorded phone consent.", + contacts: { create: buildContactOffices(deptInfo, i) }, + documents: { + create: [ + { slNo: 1, documentType: "Ticket Request Form", validProof: "Online form or signed offline request", isRequired: false }, + { slNo: 2, documentType: "Supporting Evidence", validProof: "Screenshots, receipts, or correspondence copy", isRequired: false }, + { slNo: 3, documentType: "Authorization Letter", validProof: "Required when represented by authorized agent", isRequired: false }, + ], + }, + }, + }); + + await prisma.grievance.create({ + data: { + name: `Citizen ${deptInfo.code} Grievance`, + email: `grievance.${deptInfo.code.toLowerCase()}@example.com`, + phone: `97${i}7001200`.slice(0, 10), + address: `Ward ${i + 11}, Civic Avenue, District ${i + 1}`, + subject: `Delay and repeated rework in ${deptInfo.name} service processing`, + description: + `I submitted all mandatory documents for a ${deptInfo.name} service and received acknowledgment 32 days ago. The portal timeline shows repeated 'under verification' states without any deficiency memo. The local office informed that the file moved between counters twice due to internal routing issues. This delay has impacted a time-sensitive requirement. Please review the case, provide reasoned status, and process it within the notified SLA with accountability details.`, + category: "SLA Delay", + priority: "high", + status: "pending", + attachments: [ + `ack-${deptInfo.code.toLowerCase()}-${i + 1}.pdf`, + `timeline-${deptInfo.code.toLowerCase()}-${i + 1}.png`, + `office-visit-notes-${deptInfo.code.toLowerCase()}-${i + 1}.txt`, + ], + source: "web", + trackingId: `GRV-${deptInfo.code}-SEED-${String(i + 1).padStart(3, "0")}`, + departmentId: department.id, + }, + }); + + await prisma.feedback.create({ + data: { + name: `Citizen ${deptInfo.code} Feedback`, + email: `feedback.${deptInfo.code.toLowerCase()}@example.com`, + phone: `96${i}8803300`.slice(0, 10), + subject: `${deptInfo.name} portal and counter experience feedback`, + message: + `The ${deptInfo.name} portal is generally stable and the service list is useful. The form guidance and document checklist are clear, but queue visibility at district counters can be improved. If the portal adds estimated waiting time, auto-reminders for pending documents, and office-wise slot availability, it would significantly reduce repeat visits. Overall experience is good, with scope for better real-time tracking and mobile-first UI improvements.`, + category: "Service Experience", + serviceType: "Citizen Services", + rating: 4, + source: "web", + status: "new", + departmentId: department.id, + }, + }); + + console.log(`✅ Seeded complete detailed dataset for ${deptInfo.name}`); + } + + const superAdminEmail = process.env.SUPER_ADMIN_EMAIL || "admin@govservices.in"; + const superAdminPassword = process.env.SUPER_ADMIN_PASSWORD || "Admin@123456"; + const superAdminHashed = await bcrypt.hash(superAdminPassword, 12); + + await prisma.admin.upsert({ + where: { email: superAdminEmail }, + update: { role: "super_admin", password: superAdminHashed, isActive: true }, + create: { + email: superAdminEmail, + password: superAdminHashed, + name: "Super Admin", + role: "super_admin", + isActive: true, + }, + }); + + console.log("\n🔑 Department Admin Credentials:"); + console.table(adminCredentials); + console.log("\n🌱 Seeding complete. Services are now deeply populated across all departments.\n"); +} + +seed() + .catch((error) => { + console.error("Seeding failed:", error); + process.exit(1); + }) + .finally(async () => { + await prisma.$disconnect(); + }); diff --git a/backend/routes/adminAuth.ts b/backend/routes/adminAuth.ts index 5009df4..91787c1 100644 --- a/backend/routes/adminAuth.ts +++ b/backend/routes/adminAuth.ts @@ -2,19 +2,51 @@ import express, { Request, Response } from "express"; import bcrypt from "bcryptjs"; import jwt from "jsonwebtoken"; import { body, validationResult } from "express-validator"; -import { PrismaClient } from "@prisma/client"; +import { prisma } from "../lib/prisma"; +import { + authenticateAdmin, + requireSuperAdmin, + requireDeptAdmin, + getJwtSecret, + JWT_ACCESS_EXPIRY, + JWT_REFRESH_EXPIRY, + REFRESH_TOKEN_COOKIE, + JwtPayload, +} from "../middleware/auth"; +import { authLimiter, registrationLimiter } from "../middleware/rateLimiter"; +import { createAuditLog, AuditActions } from "../lib/auditLog"; import "../types/express"; const router = express.Router(); -const prisma = new PrismaClient(); -// Register admin +// Password policy: min 8 chars, 1 upper, 1 lower, 1 number, 1 special +const PASSWORD_REGEX = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/; +const MAX_LOGIN_ATTEMPTS = 5; +const LOCKOUT_DURATION_MS = 15 * 60 * 1000; // 15 minutes + +// ─── Create Admin (SuperAdmin or DeptAdmin for individual_admin) ─── router.post( "/register", + authenticateAdmin, + requireDeptAdmin, + registrationLimiter, [ body("email").isEmail().normalizeEmail(), - body("password").isLength({ min: 6 }), + body("password") + .isLength({ min: 8 }) + .withMessage("Password must be at least 8 characters") + .matches(PASSWORD_REGEX) + .withMessage( + "Password must contain at least 1 uppercase, 1 lowercase, 1 number, and 1 special character (@$!%*?&)", + ), body("name").trim().isLength({ min: 2 }), + body("role") + .optional() + .isIn(["super_admin", "department_admin", "individual_admin"]) + .withMessage("Role must be super_admin, department_admin, or individual_admin"), + body("departmentId").optional().isInt(), + body("phone").optional().isMobilePhone("any"), + body("assignedServices").optional().isArray(), ], async (req: Request, res: Response) => { try { @@ -23,7 +55,19 @@ router.post( return res.status(400).json({ errors: errors.array() }); } - const { email, password, name } = req.body; + const { email, password, name, role = "department_admin", departmentId, phone, assignedServices } = req.body; + + // Department admin can only create individual_admin + if (req.admin!.role === "department_admin") { + if (role !== "individual_admin") { + return res.status(403).json({ error: "Department admins can only create individual admins" }); + } + } + + // Only super_admin can create super_admin or department_admin + if ((role === "super_admin" || role === "department_admin") && req.admin!.role !== "super_admin") { + return res.status(403).json({ error: "Only super admins can create this role" }); + } // Check if admin already exists const existingAdmin = await prisma.admin.findUnique({ @@ -31,14 +75,52 @@ router.post( }); if (existingAdmin) { - return res - .status(400) - .json({ error: "Admin already exists with this email" }); + return res.status(400).json({ error: "Admin already exists with this email" }); + } + + // Determine departmentId for individual_admin + let effectiveDeptId = departmentId; + if (role === "individual_admin" && req.admin!.role === "department_admin") { + // Force same department as the creating dept admin + effectiveDeptId = req.admin!.departmentId; + } + + // If department_admin or individual_admin, require departmentId + if ((role === "department_admin" || role === "individual_admin") && !effectiveDeptId) { + return res.status(400).json({ error: "Department ID is required for department and individual admins" }); + } + + // Verify department exists if provided + if (effectiveDeptId) { + const dept = await prisma.department.findUnique({ where: { id: effectiveDeptId } }); + if (!dept) { + return res.status(400).json({ error: "Department not found" }); + } + + // Enforce only one department_admin per department + if (role === "department_admin") { + const existingDeptAdmin = await prisma.admin.findFirst({ + where: { departmentId: effectiveDeptId, role: "department_admin" }, + }); + if (existingDeptAdmin) { + return res.status(400).json({ + error: "This department already has a department admin. Each department can only have one department admin.", + }); + } + } + } + + // Validate assignedServices + const validServices = ["schemes", "certificates", "contacts", "grievances", "feedback"]; + if (assignedServices && assignedServices.length > 0) { + const invalid = assignedServices.filter((s: string) => !validServices.includes(s)); + if (invalid.length > 0) { + return res.status(400).json({ error: `Invalid services: ${invalid.join(", ")}. Valid: ${validServices.join(", ")}` }); + } } // Hash password - const saltRounds = 12; - const hashedPassword = await bcrypt.hash(password, saltRounds); + const hashedPassword = await bcrypt.hash(password, 12); // Create admin const admin = await prisma.admin.create({ @@ -46,28 +128,40 @@ router.post( email, password: hashedPassword, name, - role: "admin", + role, + phone, + departmentId: effectiveDeptId || null, + assignedServices: role === "individual_admin" ? (assignedServices || []) : [], + createdById: req.admin!.id, }, select: { id: true, email: true, name: true, role: true, + phone: true, + departmentId: true, + assignedServices: true, + createdById: true, + department: { select: { id: true, name: true, code: true } }, createdAt: true, }, }); - // Generate JWT token - const token = jwt.sign( - { adminId: admin.id, email: admin.email, role: admin.role }, - process.env.JWT_SECRET || "your-secret-key", - { expiresIn: "24h" }, - ); + // Audit log + await createAuditLog({ + action: AuditActions.REGISTER, + entity: "Admin", + entityId: admin.id, + details: { email, name, role, departmentId }, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); res.status(201).json({ - message: "Admin registered successfully", + message: "Admin created successfully", admin, - token, }); } catch (error) { console.error("Registration error:", error); @@ -76,9 +170,10 @@ router.post( }, ); -// Login admin +// ─── Login ─── router.post( "/login", + authLimiter, [body("email").isEmail().normalizeEmail(), body("password").notEmpty()], async (req: Request, res: Response) => { try { @@ -89,28 +184,124 @@ router.post( const { email, password } = req.body; - // Find admin const admin = await prisma.admin.findUnique({ where: { email }, + include: { + department: { select: { id: true, name: true, code: true } }, + }, }); if (!admin) { return res.status(401).json({ error: "Invalid credentials" }); } + // Check if account is locked + if (admin.lockedUntil && admin.lockedUntil > new Date()) { + const remainingMs = admin.lockedUntil.getTime() - Date.now(); + const remainingMin = Math.ceil(remainingMs / 60000); + return res.status(423).json({ + error: `Account locked. Try again in ${remainingMin} minute(s).`, + }); + } + + // Check if account is active + if (!admin.isActive) { + return res.status(403).json({ error: "Account is deactivated. Contact a SuperAdmin." }); + } + // Verify password const isValidPassword = await bcrypt.compare(password, admin.password); if (!isValidPassword) { + // Increment login attempts + const newAttempts = admin.loginAttempts + 1; + const updateData: any = { loginAttempts: newAttempts }; + + if (newAttempts >= MAX_LOGIN_ATTEMPTS) { + updateData.lockedUntil = new Date(Date.now() + LOCKOUT_DURATION_MS); + } + + await prisma.admin.update({ + where: { id: admin.id }, + data: updateData, + }); + + await createAuditLog({ + action: AuditActions.LOGIN_FAILED, + entity: "Admin", + entityId: admin.id, + details: { email, attempts: newAttempts }, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + if (newAttempts >= MAX_LOGIN_ATTEMPTS) { + return res.status(423).json({ + error: "Account locked due to too many failed attempts. Try again in 15 minutes.", + }); + } + return res.status(401).json({ error: "Invalid credentials" }); } - // Generate JWT token - const token = jwt.sign( - { adminId: admin.id, email: admin.email, role: admin.role }, - process.env.JWT_SECRET || "your-secret-key", - { expiresIn: "24h" }, + // Reset login attempts on success + await prisma.admin.update({ + where: { id: admin.id }, + data: { + loginAttempts: 0, + lockedUntil: null, + lastLogin: new Date(), + }, + }); + + // Generate access token + const payload: JwtPayload = { + adminId: admin.id, + email: admin.email, + role: admin.role, + }; + + const accessToken = jwt.sign(payload, getJwtSecret(), { + expiresIn: JWT_ACCESS_EXPIRY, + }); + + // Generate refresh token + const refreshToken = jwt.sign( + { ...payload, type: "refresh" }, + getJwtSecret(), + { expiresIn: JWT_REFRESH_EXPIRY }, ); + // Store session + await prisma.session.create({ + data: { + adminId: admin.id, + token: refreshToken, + ipAddress: req.ip || undefined, + userAgent: req.get("user-agent") || undefined, + expiresAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), + }, + }); + + // Audit log + await createAuditLog({ + action: AuditActions.LOGIN, + entity: "Admin", + entityId: admin.id, + details: { email }, + adminId: admin.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + // Set refresh token as httpOnly cookie + res.cookie(REFRESH_TOKEN_COOKIE, refreshToken, { + httpOnly: true, + secure: true, // Always required when SameSite is None + sameSite: "none", // Must be "none" to allow cross-site cookies between Vercel and Render + maxAge: 7 * 24 * 60 * 60 * 1000, // 7 days + path: "/api/auth", + }); + res.json({ message: "Login successful", admin: { @@ -118,8 +309,12 @@ router.post( email: admin.email, name: admin.name, role: admin.role, + phone: admin.phone, + departmentId: admin.departmentId, + department: admin.department, + assignedServices: (admin as any).assignedServices || [], }, - token, + token: accessToken, }); } catch (error) { console.error("Login error:", error); @@ -128,42 +323,218 @@ router.post( }, ); -// Verify token middleware -export const authenticateAdmin = async (req: any, res: any, next: any) => { +// ─── Refresh Token ─── +router.post("/refresh", authLimiter, async (req: Request, res: Response) => { try { - const token = req.header("Authorization")?.replace("Bearer ", ""); + const refreshToken = + req.cookies?.[REFRESH_TOKEN_COOKIE] || + req.body?.refreshToken; - if (!token) { - return res - .status(401) - .json({ error: "Access denied. No token provided." }); + if (!refreshToken) { + return res.status(401).json({ error: "No refresh token provided" }); } - const decoded = jwt.verify( - token, - process.env.JWT_SECRET || "your-secret-key", - ) as any; + // Verify refresh token + let decoded: any; + try { + decoded = jwt.verify(refreshToken, getJwtSecret()); + } catch { + return res.status(401).json({ error: "Invalid refresh token" }); + } - // Verify admin exists - const admin = await prisma.admin.findUnique({ - where: { id: decoded.adminId }, - select: { id: true, email: true, name: true, role: true }, + // Check session exists and is active + const session = await prisma.session.findUnique({ + where: { token: refreshToken }, + include: { + admin: { + select: { + id: true, + email: true, + name: true, + role: true, + isActive: true, + departmentId: true, + department: { select: { id: true, name: true, code: true } }, + }, + }, + }, }); - if (!admin) { - return res.status(401).json({ error: "Invalid token" }); + if (!session || !session.isActive || !session.admin.isActive) { + return res.status(401).json({ error: "Session expired or invalid" }); } - req.admin = admin; - next(); + // Rotate refresh token + const newPayload: JwtPayload = { + adminId: session.admin.id, + email: session.admin.email, + role: session.admin.role, + }; + + const newAccessToken = jwt.sign(newPayload, getJwtSecret(), { + expiresIn: JWT_ACCESS_EXPIRY, + }); + + const newRefreshToken = jwt.sign( + { ...newPayload, type: "refresh" }, + getJwtSecret(), + { expiresIn: JWT_REFRESH_EXPIRY }, + ); + + // Update session with new token + await prisma.session.update({ + where: { id: session.id }, + data: { + token: newRefreshToken, + expiresAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), + }, + }); + + res.cookie(REFRESH_TOKEN_COOKIE, newRefreshToken, { + httpOnly: true, + secure: true, // Always required when SameSite is None + sameSite: "none", // Must be "none" to allow cross-site cookies between Vercel and Render + maxAge: 7 * 24 * 60 * 60 * 1000, + path: "/api/auth", + }); + + res.json({ + token: newAccessToken, + admin: session.admin, + }); + } catch (error) { + console.error("Refresh token error:", error); + res.status(500).json({ error: "Internal server error" }); + } +}); + +// ─── Logout ─── +router.post("/logout", authenticateAdmin, async (req: Request, res: Response) => { + try { + const refreshToken = req.cookies?.[REFRESH_TOKEN_COOKIE]; + + if (refreshToken) { + // Deactivate the session + await prisma.session.updateMany({ + where: { token: refreshToken }, + data: { isActive: false }, + }); + } + + await createAuditLog({ + action: AuditActions.LOGOUT, + entity: "Admin", + entityId: req.admin!.id, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + res.clearCookie(REFRESH_TOKEN_COOKIE, { + path: "/api/auth", + secure: true, + sameSite: "none" + }); + res.json({ message: "Logged out successfully" }); } catch (error) { - res.status(401).json({ error: "Invalid token" }); + console.error("Logout error:", error); + res.status(500).json({ error: "Internal server error" }); } -}; +}); -// Get current admin profile -router.get("/profile", authenticateAdmin, (req: any, res) => { - res.json({ admin: req.admin }); +// ─── Get Profile ─── +router.get("/profile", authenticateAdmin, async (req: Request, res: Response) => { + try { + const admin = await prisma.admin.findUnique({ + where: { id: req.admin!.id }, + select: { + id: true, + email: true, + name: true, + role: true, + phone: true, + isActive: true, + lastLogin: true, + departmentId: true, + assignedServices: true, + createdById: true, + department: { select: { id: true, name: true, code: true } }, + createdAt: true, + }, + }); + + res.json({ admin }); + } catch (error) { + console.error("Profile fetch error:", error); + res.status(500).json({ error: "Internal server error" }); + } }); +// ─── Change Password ─── +router.put( + "/change-password", + authenticateAdmin, + [ + body("currentPassword").notEmpty().withMessage("Current password is required"), + body("newPassword") + .isLength({ min: 8 }) + .matches(PASSWORD_REGEX) + .withMessage( + "New password must be at least 8 chars with 1 upper, 1 lower, 1 number, 1 special char", + ), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ errors: errors.array() }); + } + + const { currentPassword, newPassword } = req.body; + + const admin = await prisma.admin.findUnique({ + where: { id: req.admin!.id }, + }); + + if (!admin) { + return res.status(404).json({ error: "Admin not found" }); + } + + const isValid = await bcrypt.compare(currentPassword, admin.password); + if (!isValid) { + return res.status(400).json({ error: "Current password is incorrect" }); + } + + const hashedPassword = await bcrypt.hash(newPassword, 12); + await prisma.admin.update({ + where: { id: admin.id }, + data: { password: hashedPassword }, + }); + + // Invalidate all sessions except current + await prisma.session.updateMany({ + where: { adminId: admin.id }, + data: { isActive: false }, + }); + + await createAuditLog({ + action: AuditActions.PASSWORD_CHANGE, + entity: "Admin", + entityId: admin.id, + adminId: admin.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + res.json({ message: "Password changed successfully. Please login again." }); + } catch (error) { + console.error("Password change error:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// Re-export middleware for backward compatibility +export { authenticateAdmin } from "../middleware/auth"; + export default router; diff --git a/backend/routes/adminManagement.ts b/backend/routes/adminManagement.ts new file mode 100644 index 0000000..af0bb47 --- /dev/null +++ b/backend/routes/adminManagement.ts @@ -0,0 +1,497 @@ +import express, { Request, Response } from "express"; +import bcrypt from "bcryptjs"; +import { body, param, validationResult } from "express-validator"; +import { prisma } from "../lib/prisma"; +import { authenticateAdmin, requireSuperAdmin, requireDeptAdmin } from "../middleware/auth"; +import { createAuditLog, AuditActions } from "../lib/auditLog"; +import "../types/express"; + +const router = express.Router(); + +// Helper: Check if the requesting admin can manage the target admin +const canManageAdmin = (requester: any, targetAdmin: any): boolean => { + if (requester.role === "super_admin") return true; + if (requester.role === "department_admin") { + // Dept admins can only manage individual_admins in their department + return ( + targetAdmin.role === "individual_admin" && + targetAdmin.departmentId === requester.departmentId + ); + } + return false; +}; + +// ─── List Admins (SuperAdmin: all, DeptAdmin: own department) ─── +router.get( + "/", + authenticateAdmin, + requireDeptAdmin, + async (req: Request, res: Response) => { + try { + const where: any = {}; + + if (req.admin!.role === "department_admin") { + // Dept admin only sees individual admins in their department + where.departmentId = req.admin!.departmentId; + where.role = "individual_admin"; + } + + const page = parseInt(req.query.page as string) || 1; + const parsedLimit = parseInt(req.query.limit as string); + const limit = Math.max(1, Math.min(isNaN(parsedLimit) ? 10 : parsedLimit, 100)); + const skip = (page - 1) * limit; + + const [admins, total] = await Promise.all([ + prisma.admin.findMany({ + where, + select: { + id: true, + email: true, + name: true, + role: true, + phone: true, + isActive: true, + lastLogin: true, + departmentId: true, + assignedServices: true, + createdById: true, + department: { select: { id: true, name: true, code: true } }, + createdAt: true, + _count: { + select: { + schemeServices: true, + certificateServices: true, + contactServices: true, + }, + }, + }, + orderBy: { createdAt: "desc" }, + skip, + take: limit, + }), + prisma.admin.count({ where }), + ]); + + res.json({ + admins, + pagination: { + page, + limit, + total, + pages: Math.ceil(total / limit), + }, + }); + } catch (error) { + console.error("Error fetching admins:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Get Admin by ID (SuperAdmin or DeptAdmin for own dept) ─── +router.get( + "/:id", + authenticateAdmin, + requireDeptAdmin, + param("id").isInt(), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + const admin = await prisma.admin.findUnique({ + where: { id }, + select: { + id: true, + email: true, + name: true, + role: true, + phone: true, + isActive: true, + lastLogin: true, + loginAttempts: true, + lockedUntil: true, + departmentId: true, + assignedServices: true, + createdById: true, + department: { select: { id: true, name: true, code: true } }, + createdAt: true, + updatedAt: true, + _count: { + select: { + schemeServices: true, + certificateServices: true, + contactServices: true, + sessions: { where: { isActive: true } }, + }, + }, + }, + }); + + if (!admin) { + return res.status(404).json({ error: "Admin not found" }); + } + + // Dept admin can only see individual admins in their department + if (req.admin!.role === "department_admin") { + if (admin.role !== "individual_admin" || admin.departmentId !== req.admin!.departmentId) { + return res.status(403).json({ error: "Access denied" }); + } + } + + res.json({ admin }); + } catch (error) { + console.error("Error fetching admin:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Update Admin (SuperAdmin or DeptAdmin for own dept individual admins) ─── +router.put( + "/:id", + authenticateAdmin, + requireDeptAdmin, + param("id").isInt(), + [ + body("name").optional().trim().isLength({ min: 2 }), + body("email").optional().isEmail().normalizeEmail(), + body("role").optional().isIn(["super_admin", "department_admin", "individual_admin"]), + body("departmentId").optional().isInt(), + body("phone").optional().isMobilePhone("any"), + body("assignedServices").optional().isArray(), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ errors: errors.array() }); + } + + const id = parseInt(req.params.id); + const { name, email, role, departmentId, phone, assignedServices } = req.body; + + // Fetch target admin + const targetAdmin = await prisma.admin.findUnique({ where: { id } }); + if (!targetAdmin) { + return res.status(404).json({ error: "Admin not found" }); + } + + // Check permissions + if (!canManageAdmin(req.admin!, targetAdmin)) { + return res.status(403).json({ error: "Access denied. Cannot manage this admin." }); + } + + // Don't allow removing your own super_admin role + if (id === req.admin!.id && role && role !== "super_admin") { + return res.status(400).json({ error: "Cannot change your own role" }); + } + + // Dept admin cannot change role to anything other than individual_admin + if (req.admin!.role === "department_admin" && role && role !== "individual_admin") { + return res.status(403).json({ error: "You can only assign the individual_admin role" }); + } + + const updateData: any = {}; + if (name) updateData.name = name; + if (email) updateData.email = email; + if (role) updateData.role = role; + if (phone !== undefined) updateData.phone = phone; + if (departmentId !== undefined) updateData.departmentId = departmentId; + if (assignedServices !== undefined) updateData.assignedServices = assignedServices; + + const admin = await prisma.admin.update({ + where: { id }, + data: updateData, + select: { + id: true, + email: true, + name: true, + role: true, + phone: true, + isActive: true, + departmentId: true, + assignedServices: true, + department: { select: { id: true, name: true, code: true } }, + }, + }); + + await createAuditLog({ + action: AuditActions.UPDATE, + entity: "Admin", + entityId: id, + details: updateData, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + res.json({ message: "Admin updated successfully", admin }); + } catch (error: any) { + if (error.code === "P2025") { + return res.status(404).json({ error: "Admin not found" }); + } + console.error("Error updating admin:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Toggle Admin Active/Inactive (SuperAdmin or DeptAdmin for own dept) ─── +router.patch( + "/:id/toggle", + authenticateAdmin, + requireDeptAdmin, + param("id").isInt(), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + // Don't allow deactivating yourself + if (id === req.admin!.id) { + return res.status(400).json({ error: "Cannot deactivate your own account" }); + } + + const admin = await prisma.admin.findUnique({ where: { id } }); + if (!admin) { + return res.status(404).json({ error: "Admin not found" }); + } + + // Check permissions + if (!canManageAdmin(req.admin!, admin)) { + return res.status(403).json({ error: "Access denied. Cannot manage this admin." }); + } + + const updated = await prisma.admin.update({ + where: { id }, + data: { isActive: !admin.isActive }, + select: { + id: true, + email: true, + name: true, + role: true, + isActive: true, + }, + }); + + // If deactivating, invalidate all sessions + if (!updated.isActive) { + await prisma.session.updateMany({ + where: { adminId: id }, + data: { isActive: false }, + }); + } + + await createAuditLog({ + action: AuditActions.TOGGLE_ACTIVE, + entity: "Admin", + entityId: id, + details: { isActive: updated.isActive }, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + res.json({ + message: `Admin ${updated.isActive ? "activated" : "deactivated"} successfully`, + admin: updated, + }); + } catch (error) { + console.error("Error toggling admin:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Delete Admin (SuperAdmin or DeptAdmin for own dept individual admins) ─── +router.delete( + "/:id", + authenticateAdmin, + requireDeptAdmin, + param("id").isInt(), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + if (id === req.admin!.id) { + return res.status(400).json({ error: "Cannot delete your own account" }); + } + + const targetAdmin = await prisma.admin.findUnique({ where: { id } }); + if (!targetAdmin) { + return res.status(404).json({ error: "Admin not found" }); + } + + // Check permissions + if (!canManageAdmin(req.admin!, targetAdmin)) { + return res.status(403).json({ error: "Access denied. Cannot manage this admin." }); + } + + // Cascade delete all related records in a transaction + await prisma.$transaction(async (tx) => { + // Clean up services created by this admin + // SchemeService sub-relations + await tx.contactPerson.deleteMany({ where: { schemeService: { adminId: id } } }); + await tx.supportiveDocument.deleteMany({ where: { schemeService: { adminId: id } } }); + await tx.schemeService.deleteMany({ where: { adminId: id } }); + + // CertificateService sub-relations + await tx.certificateContact.deleteMany({ where: { certificateService: { adminId: id } } }); + await tx.certificateDocument.deleteMany({ where: { certificateService: { adminId: id } } }); + await tx.certificateProcessStep.deleteMany({ where: { certificateService: { adminId: id } } }); + await tx.certificateEligibility.deleteMany({ where: { certificateService: { adminId: id } } }); + await tx.certificateService.deleteMany({ where: { adminId: id } }); + + // ContactService sub-relations (offices -> posts -> employees) + await tx.employee.deleteMany({ + where: { post: { office: { contactService: { adminId: id } } } }, + }); + await tx.post.deleteMany({ + where: { office: { contactService: { adminId: id } } }, + }); + await tx.contactServiceContact.deleteMany({ where: { contactService: { adminId: id } } }); + await tx.contactServiceDocument.deleteMany({ where: { contactService: { adminId: id } } }); + await tx.contactService.deleteMany({ where: { adminId: id } }); + + // Nullify audit log references + await tx.auditLog.updateMany({ + where: { adminId: id }, + data: { adminId: null }, + }); + + // Nullify grievance activity references + await tx.grievanceActivity.updateMany({ + where: { adminId: id }, + data: { adminId: null }, + }); + + // Delete sessions and notifications + await tx.session.deleteMany({ where: { adminId: id } }); + await tx.notification.deleteMany({ where: { adminId: id } }); + + // Finally delete the admin + await tx.admin.delete({ where: { id } }); + }); + + await createAuditLog({ + action: AuditActions.DELETE, + entity: "Admin", + entityId: id, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + res.json({ message: "Admin deleted successfully" }); + } catch (error: any) { + if (error.code === "P2025") { + return res.status(404).json({ error: "Admin not found" }); + } + console.error("Error deleting admin:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Unlock Admin Account (SuperAdmin or DeptAdmin for own dept) ─── +router.patch( + "/:id/unlock", + authenticateAdmin, + requireDeptAdmin, + param("id").isInt(), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + const targetAdmin = await prisma.admin.findUnique({ where: { id } }); + if (!targetAdmin) { + return res.status(404).json({ error: "Admin not found" }); + } + + // Check permissions + if (!canManageAdmin(req.admin!, targetAdmin)) { + return res.status(403).json({ error: "Access denied" }); + } + + const admin = await prisma.admin.update({ + where: { id }, + data: { loginAttempts: 0, lockedUntil: null }, + select: { id: true, email: true, name: true }, + }); + + res.json({ message: "Admin account unlocked", admin }); + } catch (error: any) { + if (error.code === "P2025") { + return res.status(404).json({ error: "Admin not found" }); + } + console.error("Error unlocking admin:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Reset Admin Password (SuperAdmin or DeptAdmin for own dept) ─── +router.patch( + "/:id/reset-password", + authenticateAdmin, + requireDeptAdmin, + param("id").isInt(), + [ + body("newPassword") + .isLength({ min: 8 }) + .matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])/) + .withMessage("Password must meet complexity requirements"), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ errors: errors.array() }); + } + + const id = parseInt(req.params.id); + const { newPassword } = req.body; + + const targetAdmin = await prisma.admin.findUnique({ where: { id } }); + if (!targetAdmin) { + return res.status(404).json({ error: "Admin not found" }); + } + + // Check permissions + if (!canManageAdmin(req.admin!, targetAdmin)) { + return res.status(403).json({ error: "Access denied" }); + } + + const hashedPassword = await bcrypt.hash(newPassword, 12); + await prisma.admin.update({ + where: { id }, + data: { password: hashedPassword, loginAttempts: 0, lockedUntil: null }, + }); + + // Invalidate all sessions + await prisma.session.updateMany({ + where: { adminId: id }, + data: { isActive: false }, + }); + + await createAuditLog({ + action: AuditActions.PASSWORD_CHANGE, + entity: "Admin", + entityId: id, + details: { resetBy: req.admin!.id }, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + res.json({ message: "Password reset successfully" }); + } catch (error: any) { + if (error.code === "P2025") { + return res.status(404).json({ error: "Admin not found" }); + } + console.error("Error resetting password:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +export default router; diff --git a/backend/routes/auditLogs.ts b/backend/routes/auditLogs.ts new file mode 100644 index 0000000..4bfc640 --- /dev/null +++ b/backend/routes/auditLogs.ts @@ -0,0 +1,93 @@ +import express, { Request, Response } from "express"; +import { query, param, validationResult } from "express-validator"; +import { prisma } from "../lib/prisma"; +import { authenticateAdmin, requireSuperAdmin } from "../middleware/auth"; +import "../types/express"; + +const router = express.Router(); + +// ─── Get Audit Logs (SuperAdmin only) ─── +router.get( + "/", + authenticateAdmin, + requireSuperAdmin, + [ + query("page").optional().isInt({ min: 1 }), + query("limit").optional().isInt({ min: 1, max: 100 }), + query("action").optional().isString(), + query("entity").optional().isString(), + query("adminId").optional().isInt(), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ errors: errors.array() }); + } + + const page = parseInt(req.query.page as string) || 1; + const limit = Math.min(parseInt(req.query.limit as string) || 50, 100); + const skip = (page - 1) * limit; + + const where: any = {}; + if (req.query.action) where.action = req.query.action; + if (req.query.entity) where.entity = req.query.entity; + if (req.query.adminId) where.adminId = parseInt(req.query.adminId as string); + + const [logs, total] = await Promise.all([ + prisma.auditLog.findMany({ + where, + include: { + admin: { select: { id: true, name: true, email: true } }, + }, + skip, + take: limit, + orderBy: { createdAt: "desc" }, + }), + prisma.auditLog.count({ where }), + ]); + + res.json({ + logs, + pagination: { + page, + limit, + total, + pages: Math.ceil(total / limit), + }, + }); + } catch (error) { + console.error("Error fetching audit logs:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Get Audit Logs for specific entity ─── +router.get( + "/:entity/:entityId", + authenticateAdmin, + requireSuperAdmin, + [param("entity").isString(), param("entityId").isInt()], + async (req: Request, res: Response) => { + try { + const { entity, entityId } = req.params; + + const logs = await prisma.auditLog.findMany({ + where: { entity, entityId: parseInt(entityId) }, + include: { + admin: { select: { id: true, name: true, email: true } }, + }, + orderBy: { createdAt: "desc" }, + take: 100, + }); + + res.json({ logs }); + } catch (error) { + console.error("Error fetching entity audit logs:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +export default router; diff --git a/backend/routes/certificateService.ts b/backend/routes/certificateService.ts index 697218b..5716def 100644 --- a/backend/routes/certificateService.ts +++ b/backend/routes/certificateService.ts @@ -1,18 +1,29 @@ import express, { Request, Response } from "express"; -import { PrismaClient } from "@prisma/client"; import { body, param, validationResult } from "express-validator"; -import { authenticateAdmin } from "./adminAuth"; +import { prisma } from "../lib/prisma"; +import { queryCache } from "../lib/prisma"; +import { authenticateAdmin } from "../middleware/auth"; +import { readLimiter } from "../middleware/rateLimiter"; +import { pdfUpload, uploadPDFToOCI, deleteFromOCI } from "../lib/fileUpload"; import "../types/express"; const router = express.Router(); -const prisma = new PrismaClient(); + +const getServiceAccessWhere = (admin: NonNullable) => { + if (admin.role === "super_admin") return {}; + if (admin.role === "department_admin" && admin.departmentId) { + return { departmentId: admin.departmentId }; + } + return { adminId: admin.id }; +}; // GET /api/certificate-services - Get all certificate services router.get("/", authenticateAdmin, async (req: Request, res: Response) => { try { - console.log("Fetching certificate services for admin:", req.admin?.id); + const adminWhereClause = getServiceAccessWhere(req.admin!); const certificateServices = await prisma.certificateService.findMany({ + where: adminWhereClause, include: { contacts: true, documents: true, @@ -25,7 +36,6 @@ router.get("/", authenticateAdmin, async (req: Request, res: Response) => { orderBy: { createdAt: "desc" }, }); - console.log(`Found ${certificateServices.length} certificate services`); res.json({ success: true, @@ -36,7 +46,7 @@ router.get("/", authenticateAdmin, async (req: Request, res: Response) => { res.status(500).json({ success: false, message: "Failed to fetch certificate services", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }); @@ -58,10 +68,13 @@ router.get( } const id = parseInt(req.params.id); - console.log(`Fetching certificate service with ID: ${id}`); + const adminWhereClause = getServiceAccessWhere(req.admin!); - const certificateService = await prisma.certificateService.findUnique({ - where: { id }, + const certificateService = await prisma.certificateService.findFirst({ + where: { + id, + ...adminWhereClause, + }, include: { contacts: true, documents: true, @@ -72,14 +85,12 @@ router.get( }); if (!certificateService) { - console.log(`Certificate service with ID ${id} not found`); return res.status(404).json({ success: false, message: "Certificate service not found", }); } - console.log(`Found certificate service: ${certificateService.name}`); res.json({ success: true, @@ -90,7 +101,7 @@ router.get( res.status(500).json({ success: false, message: "Failed to fetch certificate service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -122,8 +133,10 @@ router.post( } const adminId = req.admin!.id; - console.log("Creating certificate service for admin:", adminId); - console.log("Request body:", req.body); + const departmentId = + req.admin!.role === "super_admin" + ? req.body.departmentId ?? null + : req.admin!.departmentId ?? null; const { name, @@ -146,6 +159,7 @@ router.post( offlineAddress, status: "draft", adminId, + departmentId, eligibilityDetails: [], certificateDetails: [], processDetails: [], @@ -159,11 +173,6 @@ router.post( }, }); - console.log( - "Certificate service created successfully:", - certificateService.id, - ); - res.status(201).json({ success: true, certificateService, @@ -174,7 +183,7 @@ router.post( res.status(500).json({ success: false, message: "Failed to create certificate service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -197,12 +206,14 @@ router.patch( } const id = parseInt(req.params.id); - console.log(`Updating certificate service with ID: ${id}`); - console.log("Update data:", req.body); + const adminWhereClause = getServiceAccessWhere(req.admin!); // Check if certificate service exists - const existingService = await prisma.certificateService.findUnique({ - where: { id }, + const existingService = await prisma.certificateService.findFirst({ + where: { + id, + ...adminWhereClause, + }, }); if (!existingService) { @@ -212,18 +223,20 @@ router.patch( }); } - // Extract relationship fields and nested data that shouldn't be directly updated - const { - contacts, - documents, - processSteps, - eligibilityItems, - admin, - createdAt, - updatedAt, - id: bodyId, - ...updateData - } = req.body; + // Extract only whitelisted scalar fields to prevent mass assignment + const allowedFields = [ + "name", "summary", "applicationMode", "type", + "onlineUrl", "offlineAddress", "isActive", + "applicationFee", "processingTime", "validityPeriod", + ] as const; + const updateData: Record = {}; + for (const field of allowedFields) { + if (req.body[field] !== undefined) { + updateData[field] = req.body[field]; + } + } + + const { contacts, documents, processSteps, eligibilityItems } = req.body; let prismaUpdateData: any = updateData; @@ -295,7 +308,6 @@ router.patch( }, }); - console.log("Certificate service updated successfully"); res.json({ success: true, @@ -307,7 +319,7 @@ router.patch( res.status(500).json({ success: false, message: "Failed to update certificate service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -330,10 +342,13 @@ router.patch( } const id = parseInt(req.params.id); - console.log(`Publishing certificate service with ID: ${id}`); + const adminWhereClause = getServiceAccessWhere(req.admin!); - const existingService = await prisma.certificateService.findUnique({ - where: { id }, + const existingService = await prisma.certificateService.findFirst({ + where: { + id, + ...adminWhereClause, + }, }); if (!existingService) { @@ -343,9 +358,17 @@ router.patch( }); } + const admin = req.admin!; + const publisherName = + admin.role === "super_admin" ? "Admin" : admin.name; + const publishedService = await prisma.certificateService.update({ where: { id }, - data: { status: "published" }, + data: { + status: "published", + publishedBy: admin.id, + publishedByName: publisherName, + }, include: { contacts: true, documents: true, @@ -355,19 +378,88 @@ router.patch( }, }); - console.log("Certificate service published successfully"); res.json({ success: true, certificateService: publishedService, message: "Certificate service published successfully", }); + + // Invalidate public cache + await queryCache.invalidate("certs:public"); } catch (error) { console.error("Error publishing certificate service:", error); res.status(500).json({ success: false, message: "Failed to publish certificate service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", + }); + } + }, +); + +// POST /api/certificate-services/:id/upload-pdf - Upload PDF for certificate service +router.post( + "/:id/upload-pdf", + authenticateAdmin, + param("id").isInt().withMessage("ID must be a valid integer"), + pdfUpload.single("pdf"), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + if (!req.file) { + return res.status(400).json({ + success: false, + message: "No PDF file uploaded", + }); + } + + const existingService = await prisma.certificateService.findFirst({ + where: { + id, + ...getServiceAccessWhere(req.admin!), + }, + }); + + if (!existingService) { + return res.status(404).json({ + success: false, + message: "Certificate service not found", + }); + } + + // Delete old PDF from OCI if it exists + if (existingService.pdfUrl?.startsWith("https://")) { + await deleteFromOCI(existingService.pdfUrl); + } + + const pdfUrl = await uploadPDFToOCI(req.file); + + const updatedService = await prisma.certificateService.update({ + where: { id }, + data: { pdfUrl }, + include: { + contacts: true, + documents: true, + admin: { + select: { id: true, name: true, email: true }, + }, + }, + }); + + res.json({ + success: true, + certificateService: updatedService, + pdfUrl, + message: "PDF uploaded successfully", + }); + } catch (error) { + console.error("Error uploading PDF:", error); + res.status(500).json({ + success: false, + message: "Failed to upload PDF", + error: "An internal error occurred", }); } }, @@ -407,7 +499,7 @@ router.patch( const existingService = await prisma.certificateService.findFirst({ where: { id: serviceId, - adminId: req.admin.id, + ...getServiceAccessWhere(req.admin), }, }); @@ -437,17 +529,19 @@ router.patch( res.json({ success: true, - message: `Certificate service ${ - isActive ? "activated" : "deactivated" - } successfully`, + message: `Certificate service ${isActive ? "activated" : "deactivated" + } successfully`, certificateService: updatedService, }); + + // Invalidate public cache + await queryCache.invalidate("certs:public"); } catch (error) { console.error("Toggle certificate service active status error:", error); res.status(500).json({ success: false, message: "Failed to toggle certificate service status", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -470,10 +564,13 @@ router.delete( } const id = parseInt(req.params.id); - console.log(`Deleting certificate service with ID: ${id}`); + const adminWhereClause = getServiceAccessWhere(req.admin!); - const existingService = await prisma.certificateService.findUnique({ - where: { id }, + const existingService = await prisma.certificateService.findFirst({ + where: { + id, + ...adminWhereClause, + }, }); if (!existingService) { @@ -487,7 +584,9 @@ router.delete( where: { id }, }); - console.log("Certificate service deleted successfully"); + // Invalidate public cache + await queryCache.invalidate("certs:public"); + res.json({ success: true, @@ -498,7 +597,7 @@ router.delete( res.status(500).json({ success: false, message: "Failed to delete certificate service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -507,13 +606,23 @@ router.delete( // PUBLIC ROUTES (no authentication required) // GET /api/certificate-services/public/list - Get all published certificate services (public) -router.get("/public/list", async (req: Request, res: Response) => { +router.get("/public/list", readLimiter, async (req: Request, res: Response) => { try { const { page = 1, limit = 10, search } = req.query; const pageNum = parseInt(page as string); - const limitNum = parseInt(limit as string); + const limitNum = Math.min(parseInt(limit as string) || 10, 100); const offset = (pageNum - 1) * limitNum; + // Use cache for non-search queries + const cacheKey = search ? null : `certs:public:list:${pageNum}:${limitNum}`; + if (cacheKey) { + const cached = await queryCache.get(cacheKey); + if (cached) { + res.set("Cache-Control", "public, max-age=60, s-maxage=120"); + return res.json(cached); + } + } + let whereClause: any = { status: "published", isActive: true, @@ -546,7 +655,7 @@ router.get("/public/list", async (req: Request, res: Response) => { const totalPages = Math.ceil(total / limitNum); - res.json({ + const result = { success: true, certificateServices, pagination: { @@ -555,19 +664,27 @@ router.get("/public/list", async (req: Request, res: Response) => { total, pages: totalPages, }, - }); + }; + + // Cache non-search results for 2 minutes + if (cacheKey) { + await queryCache.set(cacheKey, result, 120_000); // 2min cache + } + res.set("X-Cache", "MISS"); + res.set("Cache-Control", "public, max-age=60, s-maxage=120"); + res.json(result); } catch (error) { console.error("Error fetching public certificate services:", error); res.status(500).json({ success: false, message: "Failed to fetch certificate services", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }); // GET /api/certificate-services/public/:id - Get specific published certificate service (public) -router.get("/public/:id", async (req: Request, res: Response) => { +router.get("/public/:id", readLimiter, async (req: Request, res: Response) => { try { const serviceId = parseInt(req.params.id); @@ -608,7 +725,7 @@ router.get("/public/:id", async (req: Request, res: Response) => { res.status(500).json({ success: false, message: "Failed to fetch certificate service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }); diff --git a/backend/routes/contactService.ts b/backend/routes/contactService.ts index ab9d80b..05976c9 100644 --- a/backend/routes/contactService.ts +++ b/backend/routes/contactService.ts @@ -1,30 +1,51 @@ import express, { Request, Response } from "express"; -import { PrismaClient } from "@prisma/client"; import { body, param, validationResult } from "express-validator"; -import { authenticateAdmin } from "./adminAuth"; +import { prisma } from "../lib/prisma"; +import { queryCache } from "../lib/prisma"; +import { authenticateAdmin } from "../middleware/auth"; +import { readLimiter } from "../middleware/rateLimiter"; +import { pdfUpload, uploadPDFToOCI, deleteFromOCI } from "../lib/fileUpload"; import "../types/express"; const router = express.Router(); -const prisma = new PrismaClient(); + +// Helper to get authorization where clause based on admin role +const getAdminWhereClause = (admin: NonNullable) => { + if (admin.role === "super_admin") return {}; + if (admin.role === "department_admin" && admin.departmentId) { + return { departmentId: admin.departmentId }; + } + return { adminId: admin.id }; +}; + +// Deep include for full contact service with offices, posts, employees +const fullInclude = { + contacts: { + include: { + posts: { + include: { + employees: true, + }, + orderBy: { createdAt: "asc" as const }, + }, + }, + }, + documents: true, + admin: { + select: { id: true, name: true, email: true, role: true }, + }, +}; // GET /api/contact-services - Get all contact services router.get("/", authenticateAdmin, async (req: Request, res: Response) => { try { - console.log("Fetching contact services for admin:", req.admin?.id); - + const adminWhereClause = getAdminWhereClause(req.admin!); const contactServices = await prisma.contactService.findMany({ - include: { - contacts: true, - documents: true, - admin: { - select: { id: true, name: true, email: true }, - }, - }, + where: adminWhereClause, + include: fullInclude, orderBy: { createdAt: "desc" }, }); - console.log(`Found ${contactServices.length} contact services`); - res.json({ success: true, contactServices, @@ -34,7 +55,7 @@ router.get("/", authenticateAdmin, async (req: Request, res: Response) => { res.status(500).json({ success: false, message: "Failed to fetch contact services", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }); @@ -56,29 +77,23 @@ router.get( } const id = parseInt(req.params.id); - console.log(`Fetching contact service with ID: ${id}`); - const contactService = await prisma.contactService.findUnique({ - where: { id }, - include: { - contacts: true, - documents: true, - admin: { - select: { id: true, name: true, email: true }, - }, + const adminWhereClause = getAdminWhereClause(req.admin!); + const contactService = await prisma.contactService.findFirst({ + where: { + id, + ...adminWhereClause, }, + include: fullInclude, }); if (!contactService) { - console.log(`Contact service with ID ${id} not found`); return res.status(404).json({ success: false, message: "Contact service not found", }); } - console.log(`Found contact service: ${contactService.name}`); - res.json({ success: true, contactService, @@ -88,7 +103,7 @@ router.get( res.status(500).json({ success: false, message: "Failed to fetch contact service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -120,8 +135,6 @@ router.post( } const adminId = req.admin!.id; - console.log("Creating contact service for admin:", adminId); - console.log("Request body:", req.body); const { name, @@ -133,6 +146,11 @@ router.post( offlineAddress, } = req.body; + const departmentId = + req.admin!.role === "super_admin" + ? req.body.departmentId ?? null + : req.admin!.departmentId ?? null; + const contactService = await prisma.contactService.create({ data: { name, @@ -144,21 +162,14 @@ router.post( offlineAddress, status: "draft", adminId, + departmentId, eligibilityDetails: [], contactDetails: [], processDetails: [], }, - include: { - contacts: true, - documents: true, - admin: { - select: { id: true, name: true, email: true }, - }, - }, + include: fullInclude, }); - console.log("Contact service created successfully:", contactService.id); - res.status(201).json({ success: true, contactService, @@ -169,13 +180,14 @@ router.post( res.status(500).json({ success: false, message: "Failed to create contact service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, ); // PATCH /api/contact-services/:id - Update contact service +// IMPORTANT: Does NOT replace contacts (offices). Offices are managed via separate endpoints. router.patch( "/:id", authenticateAdmin, @@ -192,12 +204,13 @@ router.patch( } const id = parseInt(req.params.id); - console.log(`Updating contact service with ID: ${id}`); - console.log("Update data:", req.body); - // Check if contact service exists - const existingService = await prisma.contactService.findUnique({ - where: { id }, + const adminWhereClause = getAdminWhereClause(req.admin!); + const existingService = await prisma.contactService.findFirst({ + where: { + id, + ...adminWhereClause, + }, }); if (!existingService) { @@ -207,63 +220,27 @@ router.patch( }); } - // Extract relationship fields and nested data that shouldn't be directly updated - const { - contacts, - documents, - admin, - createdAt, - updatedAt, - id: bodyId, - ...updateData - } = req.body; - - let prismaUpdateData: any = updateData; - - // If contacts are provided, handle them with Prisma's nested operations - if (contacts && Array.isArray(contacts)) { - prismaUpdateData.contacts = { - deleteMany: {}, // Clear existing contacts - create: contacts.map((contact: any) => ({ - serviceName: contact.serviceName, - name: contact.name, - designation: contact.designation, - contact: contact.contact, - email: contact.email || "", - district: contact.district, - subDistrict: contact.subDistrict || "", - block: contact.block || "", - })), - }; - } - - // Handle documents if provided - if (documents && Array.isArray(documents)) { - prismaUpdateData.documents = { - deleteMany: {}, // Clear existing documents - create: documents.map((doc: any) => ({ - fileName: doc.fileName, - originalName: doc.originalName, - mimeType: doc.mimeType, - size: doc.size, - })), - }; + // Only update whitelisted scalar fields to prevent mass assignment + const allowedFields = [ + "name", + "summary", + "type", + "applicationMode", + "isActive", + ] as const; + const updateData: Record = {}; + for (const field of allowedFields) { + if (req.body[field] !== undefined) { + updateData[field] = req.body[field]; + } } const updatedService = await prisma.contactService.update({ where: { id }, - data: prismaUpdateData, - include: { - contacts: true, - documents: true, - admin: { - select: { id: true, name: true, email: true }, - }, - }, + data: updateData, + include: fullInclude, }); - console.log("Contact service updated successfully"); - res.json({ success: true, contactService: updatedService, @@ -274,7 +251,84 @@ router.patch( res.status(500).json({ success: false, message: "Failed to update contact service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", + }); + } + }, +); + +// POST /api/contact-services/:id/offices - Add office to contact service +router.post( + "/:id/offices", + authenticateAdmin, + [ + param("id").isInt().withMessage("ID must be a valid integer"), + body("officeName").notEmpty().withMessage("Office name is required"), + body("level").notEmpty().withMessage("Level is required"), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ + success: false, + message: "Validation failed", + errors: errors.array(), + }); + } + + const serviceId = parseInt(req.params.id); + + const adminWhereClause = getAdminWhereClause(req.admin!); + const existingService = await prisma.contactService.findFirst({ + where: { + id: serviceId, + ...adminWhereClause, + }, + }); + + if (!existingService) { + return res.status(404).json({ + success: false, + message: "Contact service not found", + }); + } + + const { officeName, level, pincode, district, block, subdivision } = + req.body; + + const newContact = await prisma.contactServiceContact.create({ + data: { + serviceName: existingService.name, + name: officeName, + designation: level, + contact: pincode || "", + email: "", + district: level === "State" ? "All Districts" : district || "", + subDistrict: subdivision || "", + block: block || "", + contactServiceId: serviceId, + }, + include: { + posts: { + include: { + employees: true, + }, + }, + }, + }); + + res.status(201).json({ + success: true, + office: newContact, + message: "Office added successfully", + }); + } catch (error) { + console.error("Error adding office:", error); + res.status(500).json({ + success: false, + message: "Failed to add office", + error: "An internal error occurred", }); } }, @@ -297,10 +351,14 @@ router.patch( } const id = parseInt(req.params.id); - console.log(`Publishing contact service with ID: ${id}`); + const admin = req.admin!; - const existingService = await prisma.contactService.findUnique({ - where: { id }, + const adminWhereClause = getAdminWhereClause(req.admin!); + const existingService = await prisma.contactService.findFirst({ + where: { + id, + ...adminWhereClause, + }, }); if (!existingService) { @@ -310,31 +368,95 @@ router.patch( }); } + // Determine publisher name for accountability + const publisherName = admin.role === "super_admin" ? "Admin" : admin.name; + const publishedService = await prisma.contactService.update({ where: { id }, - data: { status: "published" }, - include: { - contacts: true, - documents: true, - admin: { - select: { id: true, name: true, email: true }, - }, + data: { + status: "published", + publishedBy: admin.id, + publishedByName: publisherName, }, + include: fullInclude, }); - console.log("Contact service published successfully"); - res.json({ success: true, contactService: publishedService, message: "Contact service published successfully", }); + + // Invalidate public cache + await queryCache.invalidate("contacts:public"); } catch (error) { console.error("Error publishing contact service:", error); res.status(500).json({ success: false, message: "Failed to publish contact service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", + }); + } + }, +); + +// POST /api/contact-services/:id/upload-pdf - Upload PDF for contact service +router.post( + "/:id/upload-pdf", + authenticateAdmin, + param("id").isInt().withMessage("ID must be a valid integer"), + pdfUpload.single("pdf"), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + if (!req.file) { + return res.status(400).json({ + success: false, + message: "No PDF file uploaded", + }); + } + + const adminWhereClause = getAdminWhereClause(req.admin!); + const existingService = await prisma.contactService.findFirst({ + where: { + id, + ...adminWhereClause, + }, + }); + + if (!existingService) { + return res.status(404).json({ + success: false, + message: "Contact service not found", + }); + } + + // Delete old PDF from OCI if it exists + if (existingService.pdfUrl?.startsWith("https://")) { + await deleteFromOCI(existingService.pdfUrl); + } + + const pdfUrl = await uploadPDFToOCI(req.file); + + const updatedService = await prisma.contactService.update({ + where: { id }, + data: { pdfUrl }, + include: fullInclude, + }); + + res.json({ + success: true, + contactService: updatedService, + pdfUrl, + message: "PDF uploaded successfully", + }); + } catch (error) { + console.error("Error uploading PDF:", error); + res.status(500).json({ + success: false, + message: "Failed to upload PDF", + error: "An internal error occurred", }); } }, @@ -362,7 +484,6 @@ router.patch( const serviceId = parseInt(req.params.id); const { isActive } = req.body; - // Ensure admin is authenticated if (!req.admin) { return res.status(401).json({ success: false, @@ -370,11 +491,11 @@ router.patch( }); } - // Verify ownership + const adminWhereClause = getAdminWhereClause(req.admin!); const existingService = await prisma.contactService.findFirst({ where: { id: serviceId, - adminId: req.admin.id, + ...adminWhereClause, }, }); @@ -385,20 +506,13 @@ router.patch( }); } - // Update isActive status const updatedService = await prisma.contactService.update({ where: { id: serviceId }, data: { isActive: isActive, updatedAt: new Date(), }, - include: { - admin: { - select: { id: true, name: true, email: true }, - }, - contacts: true, - documents: true, - }, + include: fullInclude, }); res.json({ @@ -408,12 +522,15 @@ router.patch( } successfully`, contactService: updatedService, }); + + // Invalidate public cache + await queryCache.invalidate("contacts:public"); } catch (error) { console.error("Toggle contact service active status error:", error); res.status(500).json({ success: false, message: "Failed to toggle contact service status", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -436,10 +553,13 @@ router.delete( } const id = parseInt(req.params.id); - console.log(`Deleting contact service with ID: ${id}`); - const existingService = await prisma.contactService.findUnique({ - where: { id }, + const adminWhereClause = getAdminWhereClause(req.admin!); + const existingService = await prisma.contactService.findFirst({ + where: { + id, + ...adminWhereClause, + }, }); if (!existingService) { @@ -453,7 +573,8 @@ router.delete( where: { id }, }); - console.log("Contact service deleted successfully"); + // Invalidate public cache + await queryCache.invalidate("contacts:public"); res.json({ success: true, @@ -464,7 +585,7 @@ router.delete( res.status(500).json({ success: false, message: "Failed to delete contact service", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -473,13 +594,25 @@ router.delete( // PUBLIC ROUTES (no authentication required) // GET /api/contact-services/public/list - Get all published contact services (public) -router.get("/public/list", async (req: Request, res: Response) => { +router.get("/public/list", readLimiter, async (req: Request, res: Response) => { try { const { page = 1, limit = 10, search } = req.query; const pageNum = parseInt(page as string); - const limitNum = parseInt(limit as string); + const limitNum = Math.min(parseInt(limit as string) || 10, 100); const offset = (pageNum - 1) * limitNum; + // Use cache for non-search queries (deep include is expensive) + const cacheKey = search + ? null + : `contacts:public:list:${pageNum}:${limitNum}`; + if (cacheKey) { + const cached = await queryCache.get(cacheKey); + if (cached) { + res.set("Cache-Control", "public, max-age=60, s-maxage=120"); + return res.json(cached); + } + } + let whereClause: any = { status: "published", isActive: true, @@ -496,7 +629,15 @@ router.get("/public/list", async (req: Request, res: Response) => { prisma.contactService.findMany({ where: whereClause, include: { - contacts: true, + contacts: { + include: { + posts: { + include: { + employees: true, + }, + }, + }, + }, documents: true, }, orderBy: { createdAt: "desc" }, @@ -510,7 +651,7 @@ router.get("/public/list", async (req: Request, res: Response) => { const totalPages = Math.ceil(total / limitNum); - res.json({ + const result = { success: true, contactServices, pagination: { @@ -519,18 +660,26 @@ router.get("/public/list", async (req: Request, res: Response) => { total, pages: totalPages, }, - }); + }; + + // Cache non-search results for 2 minutes + if (cacheKey) { + await queryCache.set(cacheKey, result, 120_000); // Cache 2 min + } + res.set("X-Cache", "MISS"); + res.set("Cache-Control", "public, max-age=60, s-maxage=120"); + res.json(result); } catch (error) { console.error("Error fetching public contact services:", error); res.status(500).json({ success: false, message: "Failed to fetch contact services", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }); -// DELETE /api/contact-services/:serviceId/contacts/:contactId - Delete individual contact +// DELETE /api/contact-services/:serviceId/contacts/:contactId - Delete individual office router.delete( "/:serviceId/contacts/:contactId", authenticateAdmin, @@ -550,11 +699,12 @@ router.delete( const serviceId = parseInt(req.params.serviceId); const contactId = parseInt(req.params.contactId); - console.log(`Deleting contact ${contactId} from service ${serviceId}`); - - // Check if the service exists - const existingService = await prisma.contactService.findUnique({ - where: { id: serviceId }, + const adminWhereClause = getAdminWhereClause(req.admin!); + const existingService = await prisma.contactService.findFirst({ + where: { + id: serviceId, + ...adminWhereClause, + }, }); if (!existingService) { @@ -564,7 +714,6 @@ router.delete( }); } - // Check if the contact exists and belongs to the service const existingContact = await prisma.contactServiceContact.findFirst({ where: { id: contactId, @@ -579,23 +728,20 @@ router.delete( }); } - // Delete the contact await prisma.contactServiceContact.delete({ where: { id: contactId }, }); - console.log("Contact deleted successfully"); - res.json({ success: true, - message: "Contact deleted successfully", + message: "Office deleted successfully", }); } catch (error) { console.error("Error deleting contact:", error); res.status(500).json({ success: false, message: "Failed to delete contact", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, diff --git a/backend/routes/contactService.ts.bak b/backend/routes/contactService.ts.bak new file mode 100644 index 0000000..0ce8e6e --- /dev/null +++ b/backend/routes/contactService.ts.bak @@ -0,0 +1,586 @@ +import express, { Request, Response } from "express"; +import { body, param, validationResult } from "express-validator"; +import { prisma } from "../lib/prisma"; +import { authenticateAdmin } from "../middleware/auth"; +import "../types/express"; + +const router = express.Router(); + +// GET /api/contact-services - Get all contact services +router.get("/", authenticateAdmin, async (req: Request, res: Response) => { + try { + + const contactServices = await prisma.contactService.findMany({ + include: { + contacts: true, + documents: true, + admin: { + select: { id: true, name: true, email: true }, + }, + }, + orderBy: { createdAt: "desc" }, + }); + + + res.json({ + success: true, + contactServices, + }); + } catch (error) { + console.error("Error fetching contact services:", error); + res.status(500).json({ + success: false, + message: "Failed to fetch contact services", + error: "An internal error occurred", + }); + } +}); + +// GET /api/contact-services/:id - Get specific contact service +router.get( + "/:id", + authenticateAdmin, + param("id").isInt().withMessage("ID must be a valid integer"), + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ + success: false, + message: "Validation failed", + errors: errors.array(), + }); + } + + const id = parseInt(req.params.id); + + const contactService = await prisma.contactService.findUnique({ + where: { id }, + include: { + contacts: true, + documents: true, + admin: { + select: { id: true, name: true, email: true }, + }, + }, + }); + + if (!contactService) { + return res.status(404).json({ + success: false, + message: "Contact service not found", + }); + } + + + res.json({ + success: true, + contactService, + }); + } catch (error) { + console.error("Error fetching contact service:", error); + res.status(500).json({ + success: false, + message: "Failed to fetch contact service", + error: "An internal error occurred", + }); + } + }, +); + +// POST /api/contact-services - Create new contact service +router.post( + "/", + authenticateAdmin, + [ + body("name").notEmpty().withMessage("Name is required"), + body("summary").notEmpty().withMessage("Summary is required"), + body("applicationMode") + .notEmpty() + .withMessage("Application mode is required"), + body("targetAudience") + .isArray() + .withMessage("Target audience must be an array"), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ + success: false, + message: "Validation failed", + errors: errors.array(), + }); + } + + const adminId = req.admin!.id; + + const { + name, + summary, + type, + targetAudience, + applicationMode, + onlineUrl, + offlineAddress, + } = req.body; + + const contactService = await prisma.contactService.create({ + data: { + name, + summary, + type, + targetAudience, + applicationMode, + onlineUrl, + offlineAddress, + status: "draft", + adminId, + eligibilityDetails: [], + contactDetails: [], + processDetails: [], + }, + include: { + contacts: true, + documents: true, + admin: { + select: { id: true, name: true, email: true }, + }, + }, + }); + + + res.status(201).json({ + success: true, + contactService, + message: "Contact service created successfully", + }); + } catch (error) { + console.error("Error creating contact service:", error); + res.status(500).json({ + success: false, + message: "Failed to create contact service", + error: "An internal error occurred", + }); + } + }, +); + +// PATCH /api/contact-services/:id - Update contact service +router.patch( + "/:id", + authenticateAdmin, + param("id").isInt().withMessage("ID must be a valid integer"), + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ + success: false, + message: "Validation failed", + errors: errors.array(), + }); + } + + const id = parseInt(req.params.id); + + // Check if contact service exists + const existingService = await prisma.contactService.findUnique({ + where: { id }, + }); + + if (!existingService) { + return res.status(404).json({ + success: false, + message: "Contact service not found", + }); + } + + // Extract relationship fields and nested data that shouldn't be directly updated + const { + contacts, + documents, + admin, + createdAt, + updatedAt, + id: bodyId, + ...updateData + } = req.body; + + let prismaUpdateData: any = updateData; + + // If contacts are provided, handle them with Prisma's nested operations + if (contacts && Array.isArray(contacts)) { + prismaUpdateData.contacts = { + deleteMany: {}, // Clear existing contacts + create: contacts.map((contact: any) => ({ + serviceName: contact.serviceName, + name: contact.name, + designation: contact.designation, + contact: contact.contact, + email: contact.email || "", + district: contact.district, + subDistrict: contact.subDistrict || "", + block: contact.block || "", + })), + }; + } + + // Handle documents if provided + if (documents && Array.isArray(documents)) { + prismaUpdateData.documents = { + deleteMany: {}, // Clear existing documents + create: documents.map((doc: any) => ({ + fileName: doc.fileName, + originalName: doc.originalName, + mimeType: doc.mimeType, + size: doc.size, + })), + }; + } + + const updatedService = await prisma.contactService.update({ + where: { id }, + data: prismaUpdateData, + include: { + contacts: true, + documents: true, + admin: { + select: { id: true, name: true, email: true }, + }, + }, + }); + + + res.json({ + success: true, + contactService: updatedService, + message: "Contact service updated successfully", + }); + } catch (error) { + console.error("Error updating contact service:", error); + res.status(500).json({ + success: false, + message: "Failed to update contact service", + error: "An internal error occurred", + }); + } + }, +); + +// PATCH /api/contact-services/:id/publish - Publish contact service +router.patch( + "/:id/publish", + authenticateAdmin, + param("id").isInt().withMessage("ID must be a valid integer"), + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ + success: false, + message: "Validation failed", + errors: errors.array(), + }); + } + + const id = parseInt(req.params.id); + + const existingService = await prisma.contactService.findUnique({ + where: { id }, + }); + + if (!existingService) { + return res.status(404).json({ + success: false, + message: "Contact service not found", + }); + } + + const publishedService = await prisma.contactService.update({ + where: { id }, + data: { status: "published" }, + include: { + contacts: true, + documents: true, + admin: { + select: { id: true, name: true, email: true }, + }, + }, + }); + + + res.json({ + success: true, + contactService: publishedService, + message: "Contact service published successfully", + }); + } catch (error) { + console.error("Error publishing contact service:", error); + res.status(500).json({ + success: false, + message: "Failed to publish contact service", + error: "An internal error occurred", + }); + } + }, +); + +// PATCH /api/contact-services/:id/toggle - Toggle contact service active status +router.patch( + "/:id/toggle", + authenticateAdmin, + [ + param("id").isInt().withMessage("Invalid service ID"), + body("isActive").isBoolean().withMessage("isActive must be a boolean"), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ + success: false, + message: "Validation failed", + errors: errors.array(), + }); + } + + const serviceId = parseInt(req.params.id); + const { isActive } = req.body; + + // Ensure admin is authenticated + if (!req.admin) { + return res.status(401).json({ + success: false, + message: "Authentication required", + }); + } + + // Verify ownership + const existingService = await prisma.contactService.findFirst({ + where: { + id: serviceId, + adminId: req.admin.id, + }, + }); + + if (!existingService) { + return res.status(404).json({ + success: false, + message: "Contact service not found", + }); + } + + // Update isActive status + const updatedService = await prisma.contactService.update({ + where: { id: serviceId }, + data: { + isActive: isActive, + updatedAt: new Date(), + }, + include: { + admin: { + select: { id: true, name: true, email: true }, + }, + contacts: true, + documents: true, + }, + }); + + res.json({ + success: true, + message: `Contact service ${ + isActive ? "activated" : "deactivated" + } successfully`, + contactService: updatedService, + }); + } catch (error) { + console.error("Toggle contact service active status error:", error); + res.status(500).json({ + success: false, + message: "Failed to toggle contact service status", + error: "An internal error occurred", + }); + } + }, +); + +// DELETE /api/contact-services/:id - Delete contact service +router.delete( + "/:id", + authenticateAdmin, + param("id").isInt().withMessage("ID must be a valid integer"), + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ + success: false, + message: "Validation failed", + errors: errors.array(), + }); + } + + const id = parseInt(req.params.id); + + const existingService = await prisma.contactService.findUnique({ + where: { id }, + }); + + if (!existingService) { + return res.status(404).json({ + success: false, + message: "Contact service not found", + }); + } + + await prisma.contactService.delete({ + where: { id }, + }); + + + res.json({ + success: true, + message: "Contact service deleted successfully", + }); + } catch (error) { + console.error("Error deleting contact service:", error); + res.status(500).json({ + success: false, + message: "Failed to delete contact service", + error: "An internal error occurred", + }); + } + }, +); + +// PUBLIC ROUTES (no authentication required) + +// GET /api/contact-services/public/list - Get all published contact services (public) +router.get("/public/list", async (req: Request, res: Response) => { + try { + const { page = 1, limit = 10, search } = req.query; + const pageNum = parseInt(page as string); + const limitNum = parseInt(limit as string); + const offset = (pageNum - 1) * limitNum; + + let whereClause: any = { + status: "published", + isActive: true, + }; + + if (search) { + whereClause.OR = [ + { name: { contains: search as string, mode: "insensitive" } }, + { summary: { contains: search as string, mode: "insensitive" } }, + ]; + } + + const [contactServices, total] = await Promise.all([ + prisma.contactService.findMany({ + where: whereClause, + include: { + contacts: true, + documents: true, + }, + orderBy: { createdAt: "desc" }, + skip: offset, + take: limitNum, + }), + prisma.contactService.count({ + where: whereClause, + }), + ]); + + const totalPages = Math.ceil(total / limitNum); + + res.json({ + success: true, + contactServices, + pagination: { + page: pageNum, + limit: limitNum, + total, + pages: totalPages, + }, + }); + } catch (error) { + console.error("Error fetching public contact services:", error); + res.status(500).json({ + success: false, + message: "Failed to fetch contact services", + error: "An internal error occurred", + }); + } +}); + +// DELETE /api/contact-services/:serviceId/contacts/:contactId - Delete individual contact +router.delete( + "/:serviceId/contacts/:contactId", + authenticateAdmin, + param("serviceId").isInt().withMessage("Service ID must be a valid integer"), + param("contactId").isInt().withMessage("Contact ID must be a valid integer"), + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ + success: false, + message: "Validation failed", + errors: errors.array(), + }); + } + + const serviceId = parseInt(req.params.serviceId); + const contactId = parseInt(req.params.contactId); + + + // Check if the service exists + const existingService = await prisma.contactService.findUnique({ + where: { id: serviceId }, + }); + + if (!existingService) { + return res.status(404).json({ + success: false, + message: "Contact service not found", + }); + } + + // Check if the contact exists and belongs to the service + const existingContact = await prisma.contactServiceContact.findFirst({ + where: { + id: contactId, + contactServiceId: serviceId, + }, + }); + + if (!existingContact) { + return res.status(404).json({ + success: false, + message: "Contact not found in this service", + }); + } + + // Delete the contact + await prisma.contactServiceContact.delete({ + where: { id: contactId }, + }); + + + res.json({ + success: true, + message: "Contact deleted successfully", + }); + } catch (error) { + console.error("Error deleting contact:", error); + res.status(500).json({ + success: false, + message: "Failed to delete contact", + error: "An internal error occurred", + }); + } + }, +); + +export default router; diff --git a/backend/routes/demo.ts b/backend/routes/demo.ts deleted file mode 100644 index e69de29..0000000 diff --git a/backend/routes/departments.ts b/backend/routes/departments.ts new file mode 100644 index 0000000..ce4b669 --- /dev/null +++ b/backend/routes/departments.ts @@ -0,0 +1,460 @@ +import express, { Request, Response } from "express"; +import { body, param, validationResult } from "express-validator"; +import { prisma, queryCache } from "../lib/prisma"; +import { authenticateAdmin, requireSuperAdmin } from "../middleware/auth"; +import { createAuditLog, AuditActions } from "../lib/auditLog"; +import "../types/express"; + +const router = express.Router(); + +// ─── Create Department (SuperAdmin only) ─── +router.post( + "/", + authenticateAdmin, + requireSuperAdmin, + [ + body("name").trim().isLength({ min: 2 }).withMessage("Name must be at least 2 characters"), + body("code") + .trim() + .isLength({ min: 2, max: 5 }) + .isAlpha() + .toUpperCase() + .withMessage("Code must be 2-5 alphabetic characters"), + body("description").optional().trim(), + body("contactEmail").optional().isEmail(), + body("contactPhone").optional().trim(), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ errors: errors.array() }); + } + + const { name, code, description, contactEmail, contactPhone } = req.body; + + // Check for duplicates + const existing = await prisma.department.findFirst({ + where: { OR: [{ name }, { code: code.toUpperCase() }] }, + }); + if (existing) { + return res.status(400).json({ error: "Department with this name or code already exists" }); + } + + const department = await prisma.department.create({ + data: { + name, + code: code.toUpperCase(), + description, + contactEmail, + contactPhone, + }, + }); + + // Invalidate department caches + await queryCache.invalidate("departments"); + + await createAuditLog({ + action: AuditActions.CREATE, + entity: "Department", + entityId: department.id, + details: { name, code: code.toUpperCase() }, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + res.status(201).json({ + message: "Department created successfully", + department, + }); + } catch (error) { + console.error("Error creating department:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── List All Departments (cached) ─── +router.get("/", authenticateAdmin, async (req: Request, res: Response) => { + try { + const cacheKey = "departments:list:all"; + const cached = await queryCache.get(cacheKey); + if (cached) { + res.set("X-Cache", "HIT"); + return res.json(cached); + } + + const departments = await prisma.department.findMany({ + include: { + _count: { + select: { + admins: true, + schemeServices: true, + certificateServices: true, + contactServices: true, + grievances: true, + feedbacks: true, + }, + }, + }, + orderBy: { name: "asc" }, + }); + + const result = { departments }; + await queryCache.set(cacheKey, result, 60_000); // Cache 1 min + res.set("X-Cache", "MISS"); + res.json(result); + } catch (error) { + console.error("Error fetching departments:", error); + res.status(500).json({ error: "Internal server error" }); + } +}); + +// ─── Get Department by ID (cached) ─── +router.get( + "/:id", + authenticateAdmin, + param("id").isInt(), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + const cacheKey = `departments:${id}`; + const cached = await queryCache.get(cacheKey); + if (cached) { + res.set("X-Cache", "HIT"); + return res.json(cached); + } + + const department = await prisma.department.findUnique({ + where: { id }, + include: { + admins: { + select: { id: true, name: true, email: true, role: true, isActive: true }, + }, + _count: { + select: { + schemeServices: true, + certificateServices: true, + contactServices: true, + grievances: true, + feedbacks: true, + }, + }, + }, + }); + + if (!department) { + return res.status(404).json({ error: "Department not found" }); + } + + const result = { department }; + await queryCache.set(cacheKey, result, 60_000); // Cache 1 min + res.set("X-Cache", "MISS"); + res.json(result); + } catch (error) { + console.error("Error fetching department:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Get Department Stats (cached briefly) ─── +router.get( + "/:id/stats", + authenticateAdmin, + param("id").isInt(), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + const cacheKey = `departments:${id}:stats`; + const cached = await queryCache.get(cacheKey); + if (cached) { + res.set("X-Cache", "HIT"); + return res.json(cached); + } + + const [ + totalGrievances, + newGrievances, + pendingGrievances, + solvedGrievances, + totalFeedbacks, + newFeedbacks, + totalServices, + publishedServices, + ] = await Promise.all([ + prisma.grievance.count({ where: { departmentId: id } }), + prisma.grievance.count({ where: { departmentId: id, status: "new" } }), + prisma.grievance.count({ where: { departmentId: id, status: "pending" } }), + prisma.grievance.count({ where: { departmentId: id, status: "solved" } }), + prisma.feedback.count({ where: { departmentId: id } }), + prisma.feedback.count({ where: { departmentId: id, status: "new" } }), + prisma.schemeService.count({ where: { departmentId: id } }), + prisma.schemeService.count({ where: { departmentId: id, status: "published" } }), + ]); + + const result = { + stats: { + grievances: { total: totalGrievances, new: newGrievances, pending: pendingGrievances, solved: solvedGrievances }, + feedbacks: { total: totalFeedbacks, new: newFeedbacks }, + services: { total: totalServices, published: publishedServices }, + }, + }; + + await queryCache.set(cacheKey, result, 30_000); // Cache 30 sec + res.set("X-Cache", "MISS"); + res.json(result); + } catch (error) { + console.error("Error fetching department stats:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Update Department (SuperAdmin only) ─── +router.put( + "/:id", + authenticateAdmin, + requireSuperAdmin, + param("id").isInt(), + [ + body("name").optional().trim().isLength({ min: 2 }), + body("description").optional().trim(), + body("contactEmail").optional().isEmail(), + body("contactPhone").optional().trim(), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ errors: errors.array() }); + } + + const id = parseInt(req.params.id); + const { name, description, contactEmail, contactPhone } = req.body; + + const department = await prisma.department.update({ + where: { id }, + data: { + ...(name && { name }), + ...(description !== undefined && { description }), + ...(contactEmail !== undefined && { contactEmail }), + ...(contactPhone !== undefined && { contactPhone }), + }, + }); + + // Invalidate department caches + await queryCache.invalidate("departments"); + + await createAuditLog({ + action: AuditActions.UPDATE, + entity: "Department", + entityId: department.id, + details: req.body, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + res.json({ message: "Department updated successfully", department }); + } catch (error: any) { + if (error.code === "P2025") { + return res.status(404).json({ error: "Department not found" }); + } + console.error("Error updating department:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Toggle Department Active/Inactive (SuperAdmin only) ─── +router.patch( + "/:id/toggle", + authenticateAdmin, + requireSuperAdmin, + param("id").isInt(), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + const department = await prisma.department.findUnique({ where: { id } }); + if (!department) { + return res.status(404).json({ error: "Department not found" }); + } + + const updated = await prisma.department.update({ + where: { id }, + data: { isActive: !department.isActive }, + }); + + // Invalidate department caches + await queryCache.invalidate("departments"); + + await createAuditLog({ + action: AuditActions.TOGGLE_ACTIVE, + entity: "Department", + entityId: id, + details: { isActive: updated.isActive }, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + res.json({ message: `Department ${updated.isActive ? "activated" : "deactivated"}`, department: updated }); + } catch (error) { + console.error("Error toggling department:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Delete Department (SuperAdmin only) ─── +router.delete( + "/:id", + authenticateAdmin, + requireSuperAdmin, + param("id").isInt(), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + const department = await prisma.department.findUnique({ + where: { id }, + include: { + _count: { + select: { + admins: true, + schemeServices: true, + certificateServices: true, + contactServices: true, + grievances: true, + feedbacks: true, + }, + }, + }, + }); + + if (!department) { + return res.status(404).json({ error: "Department not found" }); + } + + // Cascade delete everything in a transaction (extended timeout for many queries) + await prisma.$transaction(async (tx) => { + // First, collect all admin IDs in this department + const deptAdmins = await tx.admin.findMany({ + where: { departmentId: id }, + select: { id: true }, + }); + const adminIds = deptAdmins.map((a) => a.id); + + // Build OR condition: by departmentId OR by adminId (covers all cases) + const byDeptOrAdmin = adminIds.length > 0 + ? { OR: [{ departmentId: id }, { adminId: { in: adminIds } }] } + : { departmentId: id }; + + // Delete grievance activities for department grievances + await tx.grievanceActivity.deleteMany({ + where: { grievance: { departmentId: id } }, + }); + // Delete grievances & feedbacks + await tx.grievance.deleteMany({ where: { departmentId: id } }); + await tx.feedback.deleteMany({ where: { departmentId: id } }); + + // Delete scheme service sub-relations then scheme services + await tx.contactPerson.deleteMany({ where: { schemeService: byDeptOrAdmin } }); + await tx.supportiveDocument.deleteMany({ where: { schemeService: byDeptOrAdmin } }); + await tx.schemeService.deleteMany({ where: byDeptOrAdmin }); + + // Delete certificate service sub-relations then certificate services + await tx.certificateContact.deleteMany({ where: { certificateService: byDeptOrAdmin } }); + await tx.certificateDocument.deleteMany({ where: { certificateService: byDeptOrAdmin } }); + await tx.certificateProcessStep.deleteMany({ where: { certificateService: byDeptOrAdmin } }); + await tx.certificateEligibility.deleteMany({ where: { certificateService: byDeptOrAdmin } }); + await tx.certificateService.deleteMany({ where: byDeptOrAdmin }); + + // Delete contact service sub-relations (offices -> posts -> employees) + await tx.employee.deleteMany({ + where: { post: { office: { contactService: byDeptOrAdmin } } }, + }); + await tx.post.deleteMany({ + where: { office: { contactService: byDeptOrAdmin } }, + }); + await tx.contactServiceContact.deleteMany({ where: { contactService: byDeptOrAdmin } }); + await tx.contactServiceDocument.deleteMany({ where: { contactService: byDeptOrAdmin } }); + await tx.contactService.deleteMany({ where: byDeptOrAdmin }); + + // Clean up admin-related records + if (adminIds.length > 0) { + await tx.auditLog.updateMany({ + where: { adminId: { in: adminIds } }, + data: { adminId: null }, + }); + await tx.grievanceActivity.updateMany({ + where: { adminId: { in: adminIds } }, + data: { adminId: null }, + }); + await tx.session.deleteMany({ where: { adminId: { in: adminIds } } }); + await tx.notification.deleteMany({ where: { adminId: { in: adminIds } } }); + } + + // Delete all admins in this department + await tx.admin.deleteMany({ where: { departmentId: id } }); + + // Finally delete the department + await tx.department.delete({ where: { id } }); + }, { timeout: 30000 }); + + // Invalidate department caches + await queryCache.invalidate("departments"); + + await createAuditLog({ + action: AuditActions.DELETE, + entity: "Department", + entityId: id, + details: { name: department.name, code: department.code }, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), + }); + + res.json({ message: "Department deleted successfully" }); + } catch (error: any) { + if (error.code === "P2025") { + return res.status(404).json({ error: "Department not found" }); + } + console.error("Error deleting department:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +// ─── Public: List Active Departments (cached longer) ─── +router.get("/public/list", async (_req: Request, res: Response) => { + try { + const cacheKey = "departments:public:list"; + const cached = await queryCache.get(cacheKey); + if (cached) { + res.set("X-Cache", "HIT"); + res.set("Cache-Control", "public, max-age=300"); // Browser cache 5 min + return res.json(cached); + } + + const departments = await prisma.department.findMany({ + where: { isActive: true }, + select: { id: true, name: true, code: true, description: true, contactEmail: true, contactPhone: true }, + orderBy: { name: "asc" }, + }); + + const result = { departments }; + await queryCache.set(cacheKey, result, 5 * 60_000); // Cache 5 min + res.set("X-Cache", "MISS"); + res.set("Cache-Control", "public, max-age=300"); + res.json(result); + } catch (error) { + console.error("Error fetching public departments:", error); + res.status(500).json({ error: "Internal server error" }); + } +}); + +export default router; diff --git a/backend/routes/feedback.ts b/backend/routes/feedback.ts index 7fa7961..7758b02 100644 --- a/backend/routes/feedback.ts +++ b/backend/routes/feedback.ts @@ -1,110 +1,253 @@ import express, { Request, Response } from "express"; import { body, validationResult, query } from "express-validator"; -import { PrismaClient } from "@prisma/client"; +import { prisma, queryCache } from "../lib/prisma"; +import { authenticateAdmin, getDepartmentScope } from "../middleware/auth"; +import { + submissionLimiter, + readLimiter, +} from "../middleware/rateLimiter"; +import { createAuditLog, AuditActions } from "../lib/auditLog"; +import { sendOTP } from "../lib/mailer"; +import "../types/express"; const router = express.Router(); -const prisma = new PrismaClient(); -// Create feedback (public endpoint - no auth required) +async function verifyTurnstile(token: string, ip: string): Promise { + const secret = process.env.TURNSTILE_SECRET_KEY || "1x0000000000000000000000000000000AA"; + try { + const response = await fetch("https://challenges.cloudflare.com/turnstile/v0/siteverify", { + method: "POST", + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + body: `secret=${secret}&response=${token}&remoteip=${ip}`, + }); + const data = await response.json(); + return data.success; + } catch (error) { + console.error("Turnstile verification failed:", error); + return false; + } +} + +// Send OTP and verify Turnstile + daily limit +router.post( + "/public/send-otp", + submissionLimiter, + [ + body("email").isEmail().normalizeEmail().withMessage("Valid email is required"), + body("turnstileToken").notEmpty().withMessage("Turnstile verification required"), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ message: "Validation failed", errors: errors.array() }); + } + + const { email, turnstileToken } = req.body; + + // 1. Verify Turnstile (skip in development) + if (process.env.NODE_ENV !== "development") { + const isHuman = await verifyTurnstile(turnstileToken, req.ip || ""); + if (!isHuman) { + return res.status(403).json({ message: "Turnstile verification failed" }); + } + } + + // 2. Check daily limit (3 feedbacks per day) + const todayStart = new Date(); + todayStart.setHours(0, 0, 0, 0); + + const countToday = await prisma.feedback.count({ + where: { email, createdAt: { gte: todayStart } }, + }); + + if (countToday >= 3) { + return res.status(429).json({ message: "Daily limit of 3 feedbacks reached for this email." }); + } + + // 3. Generate and send OTP + const otp = Math.floor(100000 + Math.random() * 900000).toString(); // 6 digit + const expiresAt = new Date(Date.now() + 10 * 60 * 1000); // 10 mins + + await prisma.verificationOTP.upsert({ + where: { email }, + update: { otp, expiresAt }, + create: { email, otp, expiresAt }, + }); + + await sendOTP(email, otp); + + res.json({ message: "OTP sent successfully" }); + } catch (error) { + console.error("Error sending OTP:", error); + res.status(500).json({ message: "Failed to send OTP" }); + } + } +); + +// Create feedback (public endpoint - rate limited) router.post( "/", + submissionLimiter, [ - body("name").notEmpty().withMessage("Name is required"), - body("email").isEmail().withMessage("Valid email is required"), - body("subject").notEmpty().withMessage("Subject is required"), - body("message").notEmpty().withMessage("Message is required"), - body("phone") - .optional() - .isMobilePhone("any") - .withMessage("Valid phone number required"), - body("rating") - .optional() - .isInt({ min: 1, max: 5 }) - .withMessage("Rating must be between 1 and 5"), + body("name").trim().notEmpty().withMessage("Name is required"), + body("email").isEmail().normalizeEmail().withMessage("Valid email is required"), + body("subject").trim().notEmpty().withMessage("Subject is required"), + body("message").trim().notEmpty().withMessage("Message is required"), + body("phone").optional().isMobilePhone("any").withMessage("Valid phone number required"), + body("rating").optional().isInt({ min: 1, max: 5 }).withMessage("Rating must be between 1 and 5"), body("category").optional().isString(), + body("departmentId").isInt().withMessage("Department is required"), + body("website").optional().isString(), ], async (req: Request, res: Response) => { try { const errors = validationResult(req); if (!errors.isEmpty()) { - return res.status(400).json({ - message: "Validation failed", - errors: errors.array(), - }); + return res.status(400).json({ message: "Validation failed", errors: errors.array() }); + } + + const { name, email, phone, subject, message, rating, category, departmentId, website } = req.body; + + if (website && website.trim() !== "") { + console.warn(`Spam bot detected via honeypot (IP: ${req.ip}). Discarding feedback silently.`); + return res.status(201).json({ message: "Feedback submitted successfully", feedback: { id: 0 } }); } - const { name, email, phone, subject, message, rating, category } = - req.body; + // 1. Check daily limit again + const todayStart = new Date(); + todayStart.setHours(0, 0, 0, 0); + const emailToCheck = email || "anonymous"; + if (emailToCheck !== "anonymous") { + const countToday = await prisma.feedback.count({ + where: { email: emailToCheck, createdAt: { gte: todayStart } }, + }); + if (countToday >= 3) { + return res.status(429).json({ message: "Daily limit of 3 feedbacks reached for this email." }); + } + } const feedback = await prisma.feedback.create({ data: { - name, - email, - phone, - subject, - message, - rating, - category, + name, email, phone, subject, message, rating, category, + departmentId: departmentId || null, }, }); - res.status(201).json({ - message: "Feedback submitted successfully", - feedback, - }); + // Notify department admins + if (departmentId) { + const deptAdmins = await prisma.admin.findMany({ + where: { departmentId, isActive: true }, + select: { id: true }, + }); + + if (deptAdmins.length > 0) { + await prisma.notification.createMany({ + data: deptAdmins.map((admin) => ({ + adminId: admin.id, + title: "New Feedback", + message: `New feedback received: ${subject}`, + type: "feedback_new", + link: `/admin/feedbacks`, + })), + }); + } + } + + res.status(201).json({ message: "Feedback submitted successfully", feedback }); + + // Invalidate public recent cache in background + queryCache.invalidate("feedbacks:public").catch(() => {}); } catch (error) { console.error("Error creating feedback:", error); - res.status(500).json({ - message: "Failed to submit feedback", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to submit feedback" }); } - }, + } ); -// Get all feedbacks (admin only) +// Get recent community feedbacks (public endpoint, cached) +router.get("/public/recent", readLimiter, async (req: Request, res: Response) => { + try { + const cacheKey = "feedbacks:public:recent"; + const cached = await queryCache.get(cacheKey); + if (cached) { + res.set("X-Cache", "HIT"); + res.set("Cache-Control", "public, max-age=30"); + return res.json(cached); + } + + const feedbacks = await prisma.feedback.findMany({ + take: 10, + orderBy: { createdAt: "desc" }, + select: { + id: true, + name: true, + subject: true, + message: true, + rating: true, + category: true, + status: true, + createdAt: true, + }, + }); + + const result = { message: "Recent feedbacks retrieved successfully", feedbacks }; + await queryCache.set(cacheKey, result, 30_000); // Cache 30 sec + res.set("X-Cache", "MISS"); + res.set("Cache-Control", "public, max-age=30"); + res.json(result); + } catch (error) { + console.error("Error fetching recent feedbacks:", error); + res.status(500).json({ message: "Failed to fetch recent feedbacks" }); + } +}); + +// Get all feedbacks (admin only, department-scoped) router.get( "/", + authenticateAdmin, [ - query("status") - .optional() - .isIn(["new", "resolved"]) - .withMessage("Status must be new or resolved"), - query("page") - .optional() - .isInt({ min: 1 }) - .withMessage("Page must be a positive integer"), - query("limit") - .optional() - .isInt({ min: 1, max: 100 }) - .withMessage("Limit must be between 1 and 100"), + query("status").optional().isIn(["new", "resolved"]), + query("page").optional().isInt({ min: 1 }), + query("limit").optional().isInt({ min: 1, max: 100 }), + query("departmentId").optional().isInt(), + query("search").optional().isString(), ], async (req: Request, res: Response) => { try { const errors = validationResult(req); if (!errors.isEmpty()) { - return res.status(400).json({ - message: "Validation failed", - errors: errors.array(), - }); + return res.status(400).json({ message: "Validation failed", errors: errors.array() }); } - const { status, page = 1, limit = 10 } = req.query; + const { status, page = 1, limit = 10, departmentId, search } = req.query; const skip = (Number(page) - 1) * Number(limit); + const take = Math.min(Number(limit), 100); + + const deptScope = getDepartmentScope(req.admin); + const where: any = { ...deptScope }; - const where: any = {}; - if (status) { - where.status = status; + if (status) where.status = status; + if (departmentId && req.admin!.role === "super_admin") { + where.departmentId = parseInt(departmentId as string); + } + if (search) { + where.OR = [ + { name: { contains: search as string, mode: "insensitive" } }, + { subject: { contains: search as string, mode: "insensitive" } }, + { email: { contains: search as string, mode: "insensitive" } }, + ]; } const [feedbacks, total] = await Promise.all([ prisma.feedback.findMany({ where, skip, - take: Number(limit), - orderBy: { - createdAt: "desc", + take, + include: { + department: { select: { id: true, name: true, code: true } }, }, + orderBy: { createdAt: "desc" }, }), prisma.feedback.count({ where }), ]); @@ -115,57 +258,48 @@ router.get( total, pagination: { page: Number(page), - limit: Number(limit), + limit: take, total, - pages: Math.ceil(total / Number(limit)), + pages: Math.ceil(total / take), }, }); } catch (error) { console.error("Error fetching feedbacks:", error); - res.status(500).json({ - message: "Failed to fetch feedbacks", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to fetch feedbacks" }); } }, ); // Get feedback by ID (admin only) -router.get("/:id", async (req, res) => { +router.get("/:id", authenticateAdmin, async (req: Request, res: Response) => { try { const { id } = req.params; + const deptScope = getDepartmentScope(req.admin); - const feedback = await prisma.feedback.findUnique({ - where: { id: parseInt(id) }, + const feedback = await prisma.feedback.findFirst({ + where: { id: parseInt(id), ...deptScope }, + include: { + department: { select: { id: true, name: true, code: true } }, + }, }); if (!feedback) { - return res.status(404).json({ - message: "Feedback not found", - }); + return res.status(404).json({ message: "Feedback not found" }); } - res.json({ - message: "Feedback retrieved successfully", - feedback, - }); + res.json({ message: "Feedback retrieved successfully", feedback }); } catch (error) { console.error("Error fetching feedback:", error); - res.status(500).json({ - message: "Failed to fetch feedback", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to fetch feedback" }); } }); // Update feedback (admin only) router.put( "/:id", + authenticateAdmin, [ - body("status") - .optional() - .isIn(["new", "resolved"]) - .withMessage("Status must be new or resolved"), + body("status").optional().isIn(["new", "resolved"]), body("adminNotes").optional().isString(), body("resolvedBy").optional().isString(), ], @@ -173,15 +307,21 @@ router.put( try { const errors = validationResult(req); if (!errors.isEmpty()) { - return res.status(400).json({ - message: "Validation failed", - errors: errors.array(), - }); + return res.status(400).json({ message: "Validation failed", errors: errors.array() }); } const { id } = req.params; const { status, adminNotes, resolvedBy } = req.body; + const deptScope = getDepartmentScope(req.admin); + const existing = await prisma.feedback.findFirst({ + where: { id: parseInt(id), ...deptScope }, + }); + + if (!existing) { + return res.status(404).json({ message: "Feedback not found" }); + } + const updateData: any = {}; if (status !== undefined) updateData.status = status; if (adminNotes !== undefined) updateData.adminNotes = adminNotes; @@ -193,21 +333,20 @@ router.put( data: updateData, }); - res.json({ - message: "Feedback updated successfully", - feedback, + await createAuditLog({ + action: AuditActions.UPDATE, + entity: "Feedback", + entityId: feedback.id, + details: updateData, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), }); - } catch (error: any) { + + res.json({ message: "Feedback updated successfully", feedback }); + } catch (error) { console.error("Error updating feedback:", error); - if (error.code === "P2025") { - return res.status(404).json({ - message: "Feedback not found", - }); - } - res.status(500).json({ - message: "Failed to update feedback", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to update feedback" }); } }, ); @@ -215,75 +354,75 @@ router.put( // Resolve feedback (admin only) router.patch( "/:id/resolve", + authenticateAdmin, [body("adminNotes").optional().isString()], async (req: Request, res: Response) => { try { - const errors = validationResult(req); - if (!errors.isEmpty()) { - return res.status(400).json({ - message: "Validation failed", - errors: errors.array(), - }); - } - const { id } = req.params; const { adminNotes } = req.body; - // Get admin info from token (assuming you have auth middleware) - const resolvedBy = "Admin"; + const deptScope = getDepartmentScope(req.admin); + const existing = await prisma.feedback.findFirst({ + where: { id: parseInt(id), ...deptScope }, + }); + + if (!existing) { + return res.status(404).json({ message: "Feedback not found" }); + } const feedback = await prisma.feedback.update({ where: { id: parseInt(id) }, data: { status: "resolved", resolvedAt: new Date(), - resolvedBy, + resolvedBy: req.admin!.name, adminNotes: adminNotes || undefined, }, }); - res.json({ - message: "Feedback resolved successfully", - feedback, - }); - } catch (error: any) { + res.json({ message: "Feedback resolved successfully", feedback }); + + // Invalidate public recent cache in background + queryCache.invalidate("feedbacks:public").catch(() => {}); + } catch (error) { console.error("Error resolving feedback:", error); - if (error.code === "P2025") { - return res.status(404).json({ - message: "Feedback not found", - }); - } - res.status(500).json({ - message: "Failed to resolve feedback", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to resolve feedback" }); } }, ); // Delete feedback (admin only) -router.delete("/:id", async (req, res) => { +router.delete("/:id", authenticateAdmin, async (req: Request, res: Response) => { try { const { id } = req.params; - await prisma.feedback.delete({ - where: { id: parseInt(id) }, + const deptScope = getDepartmentScope(req.admin); + const existing = await prisma.feedback.findFirst({ + where: { id: parseInt(id), ...deptScope }, }); - res.json({ - message: "Feedback deleted successfully", - }); - } catch (error: any) { - console.error("Error deleting feedback:", error); - if (error.code === "P2025") { - return res.status(404).json({ - message: "Feedback not found", - }); + if (!existing) { + return res.status(404).json({ message: "Feedback not found" }); } - res.status(500).json({ - message: "Failed to delete feedback", - error: error instanceof Error ? error.message : "Unknown error", + + await prisma.feedback.delete({ where: { id: parseInt(id) } }); + + await createAuditLog({ + action: AuditActions.DELETE, + entity: "Feedback", + entityId: parseInt(id), + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), }); + + res.json({ message: "Feedback deleted successfully" }); + + // Invalidate public recent cache in background + queryCache.invalidate("feedbacks:public").catch(() => {}); + } catch (error) { + console.error("Error deleting feedback:", error); + res.status(500).json({ message: "Failed to delete feedback" }); } }); diff --git a/backend/routes/grievance.ts b/backend/routes/grievance.ts index 2392f71..cb82bef 100644 --- a/backend/routes/grievance.ts +++ b/backend/routes/grievance.ts @@ -1,33 +1,127 @@ import express, { Request, Response } from "express"; import { body, validationResult, query } from "express-validator"; -import { PrismaClient } from "@prisma/client"; +import crypto from "crypto"; +import { prisma, queryCache } from "../lib/prisma"; +import { authenticateAdmin, getDepartmentScope } from "../middleware/auth"; +import { submissionLimiter, readLimiter } from "../middleware/rateLimiter"; +import { createAuditLog, AuditActions } from "../lib/auditLog"; +import { sendOTP } from "../lib/mailer"; +import { imageUpload, uploadImageToOCI, deleteFromOCI } from "../lib/fileUpload"; +import "../types/express"; const router = express.Router(); -const prisma = new PrismaClient(); -// Generate unique tracking ID +async function verifyTurnstile(token: string, ip: string): Promise { + const secret = process.env.TURNSTILE_SECRET_KEY || "1x0000000000000000000000000000000AA"; + try { + const response = await fetch("https://challenges.cloudflare.com/turnstile/v0/siteverify", { + method: "POST", + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + body: `secret=${secret}&response=${token}&remoteip=${ip}`, + }); + const data = await response.json(); + return data.success; + } catch (error) { + console.error("Turnstile verification failed:", error); + return false; + } +} + +// Send OTP and verify Turnstile + daily limit +router.post( + "/public/send-otp", + submissionLimiter, + [ + body("email").isEmail().normalizeEmail().withMessage("Valid email is required"), + body("turnstileToken").notEmpty().withMessage("Turnstile verification required"), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ message: "Validation failed", errors: errors.array() }); + } + + const { email, turnstileToken } = req.body; + + // 1. Verify Turnstile (skip in development) + if (process.env.NODE_ENV !== "development") { + const isHuman = await verifyTurnstile(turnstileToken, req.ip || ""); + if (!isHuman) { + return res.status(403).json({ message: "Turnstile verification failed" }); + } + } + + // 2. Check daily limit (3 grievances per day) + const todayStart = new Date(); + todayStart.setHours(0, 0, 0, 0); + + const countToday = await prisma.grievance.count({ + where: { email, createdAt: { gte: todayStart } }, + }); + + if (countToday >= 3) { + return res.status(429).json({ message: "Daily limit of 3 grievances reached for this email." }); + } + + // 3. Generate and send OTP + const otp = Math.floor(100000 + Math.random() * 900000).toString(); // 6 digit + const expiresAt = new Date(Date.now() + 10 * 60 * 1000); // 10 mins + + await prisma.verificationOTP.upsert({ + where: { email }, + update: { otp, expiresAt }, + create: { email, otp, expiresAt }, + }); + + await sendOTP(email, otp); + + res.json({ message: "OTP sent successfully" }); + } catch (error) { + console.error("Error sending OTP:", error); + res.status(500).json({ message: "Failed to send OTP" }); + } + } +); + +// Generate cryptographically secure tracking ID function generateTrackingId(): string { const timestamp = Date.now().toString(36); - const randomStr = Math.random().toString(36).substring(2, 8); + const randomStr = crypto.randomBytes(4).toString("hex"); return `GRV-${timestamp}-${randomStr}`.toUpperCase(); } -// Create grievance (public endpoint - no auth required) +// Calculate SLA deadline based on priority +function calculateSlaDeadline(priority: string): Date { + const now = new Date(); + const hours: Record = { + urgent: 24, + high: 72, + medium: 168, // 7 days + low: 336, // 14 days + }; + return new Date(now.getTime() + (hours[priority] || 168) * 60 * 60 * 1000); +} + +// Create grievance (public endpoint - rate limited) router.post( "/", + submissionLimiter, [ - body("name").notEmpty().withMessage("Name is required"), - body("email").isEmail().withMessage("Valid email is required"), - body("phone").notEmpty().withMessage("Phone number is required"), - body("address").notEmpty().withMessage("Address is required"), - body("subject").notEmpty().withMessage("Subject is required"), - body("description").notEmpty().withMessage("Description is required"), + body("name").trim().notEmpty().withMessage("Name is required"), + body("email").isEmail().normalizeEmail().withMessage("Valid email is required"), + body("phone").trim().notEmpty().withMessage("Phone number is required"), + body("address").trim().notEmpty().withMessage("Address is required"), + body("subject").trim().notEmpty().withMessage("Subject is required"), + body("description").trim().notEmpty().withMessage("Description is required"), body("category").optional().isString(), + body("departmentId").isInt().withMessage("Department is required"), body("priority") .optional() .isIn(["low", "medium", "high", "urgent"]) .withMessage("Invalid priority"), body("attachments").optional().isArray(), + body("website").optional().isString(), ], async (req: Request, res: Response) => { try { @@ -40,99 +134,182 @@ router.post( } const { - name, - email, - phone, - address, - subject, - description, - category, - priority = "medium", - attachments = [], + name, email, phone, address, subject, description, + category, departmentId, priority = "medium", attachments = [], website } = req.body; + if (website && website.trim() !== "") { + console.warn(`Spam bot detected via honeypot (IP: ${req.ip}). Discarding grievance silently.`); + // Simulate immediate success + const trackingId = generateTrackingId(); + const slaDeadline = calculateSlaDeadline(priority); + return res.status(201).json({ + message: "Grievance submitted successfully", + grievance: { id: 0, trackingId, status: "new", slaDeadline }, + trackingId, + }); + } + + // 1. Check daily limit again + const todayStart = new Date(); + todayStart.setHours(0, 0, 0, 0); + const countToday = await prisma.grievance.count({ + where: { email, createdAt: { gte: todayStart } }, + }); + if (countToday >= 3) { + return res.status(429).json({ message: "Daily limit of 3 grievances reached for this email." }); + } + const trackingId = generateTrackingId(); + const slaDeadline = calculateSlaDeadline(priority); const grievance = await prisma.grievance.create({ data: { - name, - email, - phone, - address, - subject, - description, - category, - priority, - attachments, - trackingId, + name, email, phone, address, subject, description, + category, priority, attachments, trackingId, + departmentId: departmentId || null, + slaDeadline, }, }); + // Create activity log + await prisma.grievanceActivity.create({ + data: { + grievanceId: grievance.id, + action: "created", + toValue: "new", + note: "Grievance submitted", + }, + }); + + // Notify department admins if department is specified + if (departmentId) { + const deptAdmins = await prisma.admin.findMany({ + where: { departmentId, isActive: true }, + select: { id: true }, + }); + + if (deptAdmins.length > 0) { + await prisma.notification.createMany({ + data: deptAdmins.map((admin) => ({ + adminId: admin.id, + title: "New Grievance", + message: `New grievance submitted: ${subject}`, + type: "grievance_new", + link: `/admin/grievances`, + })), + }); + } + } + res.status(201).json({ message: "Grievance submitted successfully", - grievance, + grievance: { + id: grievance.id, + trackingId, + status: grievance.status, + slaDeadline, + }, trackingId, }); + + // Invalidate public recent cache in background + queryCache.invalidate("grievances:public").catch(() => {}); } catch (error) { console.error("Error creating grievance:", error); - res.status(500).json({ - message: "Failed to submit grievance", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to submit grievance" }); } }, ); -// Get all grievances (admin only) +// Get recent community grievances (public endpoint, cached) +router.get("/public/recent", readLimiter, async (req: Request, res: Response) => { + try { + const cacheKey = "grievances:public:recent"; + const cached = await queryCache.get(cacheKey); + if (cached) { + res.set("X-Cache", "HIT"); + res.set("Cache-Control", "public, max-age=30"); + return res.json(cached); + } + + const grievances = await prisma.grievance.findMany({ + take: 10, + orderBy: { createdAt: "desc" }, + select: { + id: true, + subject: true, + description: true, + status: true, + priority: true, + category: true, + trackingId: true, + name: true, + createdAt: true, + }, + }); + + const result = { message: "Recent grievances retrieved successfully", grievances }; + await queryCache.set(cacheKey, result, 30_000); // Cache 30 sec + res.set("X-Cache", "MISS"); + res.set("Cache-Control", "public, max-age=30"); + res.json(result); + } catch (error) { + console.error("Error fetching recent grievances:", error); + res.status(500).json({ message: "Failed to fetch recent grievances" }); + } +}); + +// Get all grievances (admin only, department-scoped) router.get( "/", + authenticateAdmin, [ - query("status") - .optional() - .isIn(["new", "pending", "solved"]) - .withMessage("Invalid status"), - query("priority") - .optional() - .isIn(["low", "medium", "high", "urgent"]) - .withMessage("Invalid priority"), - query("page") - .optional() - .isInt({ min: 1 }) - .withMessage("Page must be a positive integer"), - query("limit") - .optional() - .isInt({ min: 1, max: 100 }) - .withMessage("Limit must be between 1 and 100"), + query("status").optional().isIn(["new", "pending", "solved"]), + query("priority").optional().isIn(["low", "medium", "high", "urgent"]), + query("page").optional().isInt({ min: 1 }), + query("limit").optional().isInt({ min: 1, max: 100 }), + query("departmentId").optional().isInt(), + query("search").optional().isString(), ], async (req: Request, res: Response) => { try { const errors = validationResult(req); if (!errors.isEmpty()) { - return res.status(400).json({ - message: "Validation failed", - errors: errors.array(), - }); + return res.status(400).json({ message: "Validation failed", errors: errors.array() }); } - const { status, priority, page = 1, limit = 10 } = req.query; + const { status, priority, page = 1, limit = 10, departmentId, search } = req.query; const skip = (Number(page) - 1) * Number(limit); + const take = Math.min(Number(limit), 100); - const where: any = {}; - if (status) { - where.status = status; + // Apply department scope + const deptScope = getDepartmentScope(req.admin); + const where: any = { ...deptScope }; + + if (status) where.status = status; + if (priority) where.priority = priority; + if (departmentId && req.admin!.role === "super_admin") { + where.departmentId = parseInt(departmentId as string); } - if (priority) { - where.priority = priority; + if (search) { + where.OR = [ + { name: { contains: search as string, mode: "insensitive" } }, + { subject: { contains: search as string, mode: "insensitive" } }, + { trackingId: { contains: search as string, mode: "insensitive" } }, + { email: { contains: search as string, mode: "insensitive" } }, + ]; } const [grievances, total] = await Promise.all([ prisma.grievance.findMany({ where, skip, - take: Number(limit), - orderBy: { - createdAt: "desc", + take, + include: { + department: { select: { id: true, name: true, code: true } }, }, + orderBy: { createdAt: "desc" }, }), prisma.grievance.count({ where }), ]); @@ -143,53 +320,53 @@ router.get( total, pagination: { page: Number(page), - limit: Number(limit), + limit: take, total, - pages: Math.ceil(total / Number(limit)), + pages: Math.ceil(total / take), }, }); } catch (error) { console.error("Error fetching grievances:", error); - res.status(500).json({ - message: "Failed to fetch grievances", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to fetch grievances" }); } }, ); // Get grievance by ID (admin only) -router.get("/:id", async (req: Request, res: Response) => { +router.get("/:id", authenticateAdmin, async (req: Request, res: Response) => { try { const { id } = req.params; - const grievance = await prisma.grievance.findUnique({ - where: { id: parseInt(id) }, + const deptScope = getDepartmentScope(req.admin); + const grievance = await prisma.grievance.findFirst({ + where: { id: parseInt(id), ...deptScope }, + include: { + department: { select: { id: true, name: true, code: true } }, + activities: { orderBy: { createdAt: "desc" } }, + }, }); if (!grievance) { - return res.status(404).json({ - message: "Grievance not found", - }); + return res.status(404).json({ message: "Grievance not found" }); } - res.json({ - message: "Grievance retrieved successfully", - grievance, - }); + res.json({ message: "Grievance retrieved successfully", grievance }); } catch (error) { console.error("Error fetching grievance:", error); - res.status(500).json({ - message: "Failed to fetch grievance", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to fetch grievance" }); } }); -// Get grievance by tracking ID (public endpoint) -router.get("/track/:trackingId", async (req: Request, res: Response) => { +// Get grievance by tracking ID (public endpoint, rate-limited & cached) +router.get("/track/:trackingId", readLimiter, async (req: Request, res: Response) => { try { const { trackingId } = req.params; + const cacheKey = `grievances:track:${trackingId}`; + const cached = await queryCache.get(cacheKey); + if (cached) { + res.set("X-Cache", "HIT"); + return res.json(cached); + } const grievance = await prisma.grievance.findUnique({ where: { trackingId }, @@ -202,62 +379,67 @@ router.get("/track/:trackingId", async (req: Request, res: Response) => { createdAt: true, updatedAt: true, resolvedAt: true, - // Don't expose sensitive admin data + slaDeadline: true, + department: { select: { name: true } }, + activities: { + select: { action: true, toValue: true, createdAt: true, note: true }, + orderBy: { createdAt: "desc" }, + }, }, }); if (!grievance) { - return res.status(404).json({ - message: "Grievance not found with this tracking ID", - }); + return res.status(404).json({ message: "Grievance not found with this tracking ID" }); } - res.json({ - message: "Grievance status retrieved successfully", - grievance, - }); + const result = { message: "Grievance status retrieved successfully", grievance }; + await queryCache.set(cacheKey, result, 15_000); // Cache 15 sec + res.set("X-Cache", "MISS"); + res.json(result); } catch (error) { console.error("Error fetching grievance by tracking ID:", error); - res.status(500).json({ - message: "Failed to fetch grievance status", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to fetch grievance status" }); } }); // Update grievance (admin only) router.put( "/:id", + authenticateAdmin, [ - body("status") - .optional() - .isIn(["new", "pending", "solved"]) - .withMessage("Invalid status"), - body("priority") - .optional() - .isIn(["low", "medium", "high", "urgent"]) - .withMessage("Invalid priority"), + body("status").optional().isIn(["new", "pending", "solved"]), + body("priority").optional().isIn(["low", "medium", "high", "urgent"]), body("assignedTo").optional().isString(), body("adminNotes").optional().isString(), + body("departmentId").optional().isInt(), ], async (req: Request, res: Response) => { try { const errors = validationResult(req); if (!errors.isEmpty()) { - return res.status(400).json({ - message: "Validation failed", - errors: errors.array(), - }); + return res.status(400).json({ message: "Validation failed", errors: errors.array() }); } const { id } = req.params; - const { status, priority, assignedTo, adminNotes } = req.body; + const { status, priority, assignedTo, adminNotes, departmentId } = req.body; + + const deptScope = getDepartmentScope(req.admin); + const existing = await prisma.grievance.findFirst({ + where: { id: parseInt(id), ...deptScope }, + }); + + if (!existing) { + return res.status(404).json({ message: "Grievance not found" }); + } const updateData: any = {}; if (status !== undefined) updateData.status = status; if (priority !== undefined) updateData.priority = priority; if (assignedTo !== undefined) updateData.assignedTo = assignedTo; if (adminNotes !== undefined) updateData.adminNotes = adminNotes; + if (departmentId !== undefined && req.admin!.role === "super_admin") { + updateData.departmentId = departmentId; + } if (status === "solved") updateData.resolvedAt = new Date(); const grievance = await prisma.grievance.update({ @@ -265,21 +447,49 @@ router.put( data: updateData, }); - res.json({ - message: "Grievance updated successfully", - grievance, - }); - } catch (error: any) { - console.error("Error updating grievance:", error); - if (error.code === "P2025") { - return res.status(404).json({ - message: "Grievance not found", + // Log activity + if (status && status !== existing.status) { + await prisma.grievanceActivity.create({ + data: { + grievanceId: grievance.id, + action: "status_change", + fromValue: existing.status, + toValue: status, + performedBy: req.admin!.name, + adminId: req.admin!.id, + }, }); } - res.status(500).json({ - message: "Failed to update grievance", - error: error instanceof Error ? error.message : "Unknown error", + if (assignedTo && assignedTo !== existing.assignedTo) { + await prisma.grievanceActivity.create({ + data: { + grievanceId: grievance.id, + action: "assigned", + fromValue: existing.assignedTo || "Unassigned", + toValue: assignedTo, + performedBy: req.admin!.name, + adminId: req.admin!.id, + }, + }); + } + + await createAuditLog({ + action: AuditActions.UPDATE, + entity: "Grievance", + entityId: grievance.id, + details: updateData, + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), }); + + res.json({ message: "Grievance updated successfully", grievance }); + + // Invalidate related caches in background + queryCache.invalidate("grievances").catch(() => {}); + } catch (error) { + console.error("Error updating grievance:", error); + res.status(500).json({ message: "Failed to update grievance" }); } }, ); @@ -287,48 +497,51 @@ router.put( // Mark grievance as solved (admin only) router.patch( "/:id/solve", + authenticateAdmin, [body("adminNotes").optional().isString()], async (req: Request, res: Response) => { try { - const errors = validationResult(req); - if (!errors.isEmpty()) { - return res.status(400).json({ - message: "Validation failed", - errors: errors.array(), - }); - } - const { id } = req.params; const { adminNotes } = req.body; - // Get admin info from token (assuming you have auth middleware) - const assignedTo = "Admin"; + const deptScope = getDepartmentScope(req.admin); + const existing = await prisma.grievance.findFirst({ + where: { id: parseInt(id), ...deptScope }, + }); + + if (!existing) { + return res.status(404).json({ message: "Grievance not found" }); + } const grievance = await prisma.grievance.update({ where: { id: parseInt(id) }, data: { status: "solved", resolvedAt: new Date(), - assignedTo, + assignedTo: req.admin!.name, adminNotes: adminNotes || undefined, }, }); - res.json({ - message: "Grievance marked as solved successfully", - grievance, + await prisma.grievanceActivity.create({ + data: { + grievanceId: grievance.id, + action: "status_change", + fromValue: existing.status, + toValue: "solved", + performedBy: req.admin!.name, + adminId: req.admin!.id, + note: adminNotes, + }, }); - } catch (error: any) { + + res.json({ message: "Grievance marked as solved successfully", grievance }); + + // Invalidate related caches in background + queryCache.invalidate("grievances").catch(() => {}); + } catch (error) { console.error("Error solving grievance:", error); - if (error.code === "P2025") { - return res.status(404).json({ - message: "Grievance not found", - }); - } - res.status(500).json({ - message: "Failed to solve grievance", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to solve grievance" }); } }, ); @@ -336,118 +549,278 @@ router.patch( // Mark grievance as pending (admin only) router.patch( "/:id/pending", + authenticateAdmin, [body("adminNotes").optional().isString()], async (req: Request, res: Response) => { try { - const errors = validationResult(req); - if (!errors.isEmpty()) { - return res.status(400).json({ - message: "Validation failed", - errors: errors.array(), - }); - } - const { id } = req.params; const { adminNotes } = req.body; - // Get admin info from token (assuming you have auth middleware) - const assignedTo = "Admin"; + const deptScope = getDepartmentScope(req.admin); + const existing = await prisma.grievance.findFirst({ + where: { id: parseInt(id), ...deptScope }, + }); + + if (!existing) { + return res.status(404).json({ message: "Grievance not found" }); + } const grievance = await prisma.grievance.update({ where: { id: parseInt(id) }, data: { status: "pending", - assignedTo, + assignedTo: req.admin!.name, adminNotes: adminNotes || undefined, }, }); - res.json({ - message: "Grievance marked as pending successfully", - grievance, + await prisma.grievanceActivity.create({ + data: { + grievanceId: grievance.id, + action: "status_change", + fromValue: existing.status, + toValue: "pending", + performedBy: req.admin!.name, + adminId: req.admin!.id, + }, }); - } catch (error: any) { + + res.json({ message: "Grievance marked as pending successfully", grievance }); + + // Invalidate related caches in background + queryCache.invalidate("grievances").catch(() => {}); + } catch (error) { console.error("Error marking grievance as pending:", error); - if (error.code === "P2025") { - return res.status(404).json({ - message: "Grievance not found", - }); + res.status(500).json({ message: "Failed to mark grievance as pending" }); + } + }, +); + +// Forward grievance (admin only) +router.patch( + "/:id/forward", + authenticateAdmin, + [ + body("departmentId").notEmpty().isInt().withMessage("Target department ID is required"), + body("adminNotes").notEmpty().isString().withMessage("Forwarding note is required"), + ], + async (req: Request, res: Response) => { + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json({ message: "Validation failed", errors: errors.array() }); } - res.status(500).json({ - message: "Failed to mark grievance as pending", - error: error instanceof Error ? error.message : "Unknown error", + + const { id } = req.params; + const { departmentId, adminNotes } = req.body; + + const deptScope = getDepartmentScope(req.admin); + const existing = await prisma.grievance.findFirst({ + where: { id: parseInt(id), ...deptScope }, + include: { department: true }, // Include current department }); + + if (!existing) { + return res.status(404).json({ message: "Grievance not found" }); + } + + const targetDepartment = await prisma.department.findUnique({ + where: { id: parseInt(departmentId) }, + }); + + if (!targetDepartment) { + return res.status(404).json({ message: "Target department not found" }); + } + + if (existing.departmentId === departmentId) { + return res.status(400).json({ message: "Grievance is already in this department" }); + } + + const forwardNote = `Forwarded to ${targetDepartment.name} by ${req.admin!.name}.\nNote: ${adminNotes}`; + const newNotes = existing.adminNotes ? `${existing.adminNotes}\n\n${forwardNote}` : forwardNote; + + const grievance = await prisma.grievance.update({ + where: { id: parseInt(id) }, + data: { + departmentId: parseInt(departmentId), + adminNotes: newNotes, + }, + }); + + await prisma.grievanceActivity.create({ + data: { + grievanceId: grievance.id, + action: "forwarded", + fromValue: existing.department?.name || "No Department", + toValue: targetDepartment.name, + performedBy: req.admin!.name, + adminId: req.admin!.id, + note: adminNotes, + }, + }); + + // Notify the new department admins + const targetAdmins = await prisma.admin.findMany({ + where: { departmentId: targetDepartment.id, isActive: true }, + select: { id: true }, + }); + + if (targetAdmins.length > 0) { + await prisma.notification.createMany({ + data: targetAdmins.map((admin) => ({ + adminId: admin.id, + title: "Grievance Forwarded", + message: `A grievance was forwarded to your department: ${existing.subject}`, + type: "grievance_forwarded", + link: `/admin/grievances`, + })), + }); + } + + res.json({ message: "Grievance forwarded successfully", grievance }); + + // Invalidate related caches in background + queryCache.invalidate("grievances").catch(() => {}); + } catch (error) { + console.error("Error forwarding grievance:", error); + res.status(500).json({ message: "Failed to forward grievance" }); } }, ); -// Assign grievance to admin (admin only) +// Assign grievance (admin only) router.patch( "/:id/assign", + authenticateAdmin, [body("assignedTo").notEmpty().withMessage("Assigned to is required")], async (req: Request, res: Response) => { try { const errors = validationResult(req); if (!errors.isEmpty()) { - return res.status(400).json({ - message: "Validation failed", - errors: errors.array(), - }); + return res.status(400).json({ message: "Validation failed", errors: errors.array() }); } const { id } = req.params; const { assignedTo } = req.body; + const deptScope = getDepartmentScope(req.admin); + const existing = await prisma.grievance.findFirst({ + where: { id: parseInt(id), ...deptScope }, + }); + + if (!existing) { + return res.status(404).json({ message: "Grievance not found" }); + } + const grievance = await prisma.grievance.update({ where: { id: parseInt(id) }, + data: { assignedTo }, + }); + + await prisma.grievanceActivity.create({ data: { - assignedTo, + grievanceId: grievance.id, + action: "assigned", + fromValue: existing.assignedTo || "Unassigned", + toValue: assignedTo, + performedBy: req.admin!.name, + adminId: req.admin!.id, }, }); - res.json({ - message: "Grievance assigned successfully", - grievance, - }); - } catch (error: any) { + res.json({ message: "Grievance assigned successfully", grievance }); + + // Invalidate related caches in background + queryCache.invalidate("grievances").catch(() => {}); + } catch (error) { console.error("Error assigning grievance:", error); - if (error.code === "P2025") { - return res.status(404).json({ - message: "Grievance not found", - }); - } - res.status(500).json({ - message: "Failed to assign grievance", - error: error instanceof Error ? error.message : "Unknown error", - }); + res.status(500).json({ message: "Failed to assign grievance" }); } }, ); // Delete grievance (admin only) -router.delete("/:id", async (req: Request, res: Response) => { +router.delete("/:id", authenticateAdmin, async (req: Request, res: Response) => { try { const { id } = req.params; - await prisma.grievance.delete({ - where: { id: parseInt(id) }, + const deptScope = getDepartmentScope(req.admin); + const existing = await prisma.grievance.findFirst({ + where: { id: parseInt(id), ...deptScope }, }); - res.json({ - message: "Grievance deleted successfully", - }); - } catch (error: any) { - console.error("Error deleting grievance:", error); - if (error.code === "P2025") { - return res.status(404).json({ - message: "Grievance not found", - }); + if (!existing) { + return res.status(404).json({ message: "Grievance not found" }); } - res.status(500).json({ - message: "Failed to delete grievance", - error: error instanceof Error ? error.message : "Unknown error", + + await prisma.grievance.delete({ where: { id: parseInt(id) } }); + + await createAuditLog({ + action: AuditActions.DELETE, + entity: "Grievance", + entityId: parseInt(id), + adminId: req.admin!.id, + ipAddress: req.ip, + userAgent: req.get("user-agent"), }); + + res.json({ message: "Grievance deleted successfully" }); + } catch (error) { + console.error("Error deleting grievance:", error); + res.status(500).json({ message: "Failed to delete grievance" }); } }); +// POST /api/grievances/:id/upload-image - Upload image for grievance +router.post( + "/:id/upload-image", + submissionLimiter, + imageUpload.single("image"), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + if (!req.file) { + return res.status(400).json({ + message: "No image file uploaded", + }); + } + + const existingGrievance = await prisma.grievance.findUnique({ + where: { id }, + }); + + if (!existingGrievance) { + return res.status(404).json({ + message: "Grievance not found", + }); + } + + // Delete old image from OCI if it exists + if (existingGrievance.imageUrl?.startsWith("https://")) { + await deleteFromOCI(existingGrievance.imageUrl); + } + + // Process, compress, and upload image to OCI + const imageUrl = await uploadImageToOCI(req.file); + + const updatedGrievance = await prisma.grievance.update({ + where: { id }, + data: { imageUrl }, + }); + + res.json({ + message: "Image uploaded successfully", + imageUrl, + grievance: updatedGrievance, + }); + } catch (error) { + console.error("Error uploading image:", error); + res.status(500).json({ + message: "Failed to upload image", + }); + } + }, +); + export default router; diff --git a/backend/routes/mockAuth.ts b/backend/routes/mockAuth.ts deleted file mode 100644 index 78ff077..0000000 --- a/backend/routes/mockAuth.ts +++ /dev/null @@ -1,85 +0,0 @@ -import express from "express"; -import cors from "cors"; -import dotenv from "dotenv"; - -// Simple auth route without database -const router = express.Router(); - -// Mock data storage (in production this would be database) -const admins: any[] = []; - -// Simple register admin -router.post("/register", async (req, res) => { - try { - const { email, password, name } = req.body; - - // Check if admin already exists - const existingAdmin = admins.find((admin) => admin.email === email); - - if (existingAdmin) { - return res.status(400).json({ error: "Admin already exists" }); - } - - // Create admin (without real hashing for simplicity) - const admin = { - id: admins.length + 1, - email, - password, // In production, this would be hashed - name, - createdAt: new Date(), - }; - - admins.push(admin); - - res.status(201).json({ - message: "Admin registered successfully", - admin: { - id: admin.id, - email: admin.email, - name: admin.name, - }, - }); - } catch (error) { - console.error("Register error:", error); - res.status(500).json({ error: "Internal server error" }); - } -}); - -// Simple login -router.post("/login", async (req, res) => { - try { - const { email, password } = req.body; - - // Find admin - const admin = admins.find((a) => a.email === email); - - if (!admin || admin.password !== password) { - return res.status(401).json({ error: "Invalid credentials" }); - } - - res.json({ - message: "Login successful", - admin: { - id: admin.id, - email: admin.email, - name: admin.name, - }, - }); - } catch (error) { - console.error("Login error:", error); - res.status(500).json({ error: "Internal server error" }); - } -}); - -// Get all admins (for testing) -router.get("/list", (req, res) => { - res.json({ - admins: admins.map((admin) => ({ - id: admin.id, - email: admin.email, - name: admin.name, - })), - }); -}); - -export default router; diff --git a/backend/routes/notifications.ts b/backend/routes/notifications.ts new file mode 100644 index 0000000..1233247 --- /dev/null +++ b/backend/routes/notifications.ts @@ -0,0 +1,77 @@ +import express, { Request, Response } from "express"; +import { param, validationResult } from "express-validator"; +import { prisma } from "../lib/prisma"; +import { authenticateAdmin } from "../middleware/auth"; +import "../types/express"; + +const router = express.Router(); + +// ─── Get My Notifications ─── +router.get("/", authenticateAdmin, async (req: Request, res: Response) => { + try { + const page = parseInt(req.query.page as string) || 1; + const limit = Math.min(parseInt(req.query.limit as string) || 20, 50); + const skip = (page - 1) * limit; + + const [notifications, total, unreadCount] = await Promise.all([ + prisma.notification.findMany({ + where: { adminId: req.admin!.id }, + skip, + take: limit, + orderBy: { createdAt: "desc" }, + }), + prisma.notification.count({ where: { adminId: req.admin!.id } }), + prisma.notification.count({ + where: { adminId: req.admin!.id, isRead: false }, + }), + ]); + + res.json({ + notifications, + unreadCount, + pagination: { page, limit, total, pages: Math.ceil(total / limit) }, + }); + } catch (error) { + console.error("Error fetching notifications:", error); + res.status(500).json({ error: "Internal server error" }); + } +}); + +// ─── Mark All as Read (must be before /:id/read to avoid matching "read-all" as id) ─── +router.patch("/read-all", authenticateAdmin, async (req: Request, res: Response) => { + try { + await prisma.notification.updateMany({ + where: { adminId: req.admin!.id, isRead: false }, + data: { isRead: true }, + }); + + res.json({ message: "All notifications marked as read" }); + } catch (error) { + console.error("Error marking all notifications:", error); + res.status(500).json({ error: "Internal server error" }); + } +}); + +// ─── Mark Notification as Read ─── +router.patch( + "/:id/read", + authenticateAdmin, + param("id").isInt(), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + await prisma.notification.updateMany({ + where: { id, adminId: req.admin!.id }, + data: { isRead: true }, + }); + + res.json({ message: "Notification marked as read" }); + } catch (error) { + console.error("Error marking notification:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + +export default router; diff --git a/backend/routes/officeManagement.ts b/backend/routes/officeManagement.ts index 2498724..2ce57d3 100644 --- a/backend/routes/officeManagement.ts +++ b/backend/routes/officeManagement.ts @@ -1,11 +1,50 @@ import { Router, Response, Request } from "express"; import { body, param, validationResult } from "express-validator"; -import { prisma } from "../index"; -import { authenticateAdmin } from "./adminAuth"; +import { prisma } from "../lib/prisma"; +import { authenticateAdmin } from "../middleware/auth"; +import { readLimiter } from "../middleware/rateLimiter"; import "../types/express"; const router = Router(); +/** + * Helper to check if an admin has permission to manage a specific office. + * Returns the office object if authorized, otherwise returns null. + */ +async function getAuthorizedOffice(officeId: number, admin: any) { + if (!admin) return null; + + const office = await prisma.contactServiceContact.findUnique({ + where: { id: officeId }, + include: { + contactService: true, + }, + }); + + if (!office) return null; + + // Super Admin access + if (admin.role === "super_admin") return office; + + // Department Admin access + if ( + admin.role === "department_admin" && + office.contactService.departmentId === admin.departmentId + ) { + return office; + } + + // Individual Admin access + if ( + admin.role === "individual_admin" && + office.contactService.adminId === admin.id + ) { + return office; + } + + return null; +} + // GET /api/offices/by-id/:officeId - Get office by id router.get( "/by-id/:officeId", @@ -24,17 +63,13 @@ router.get( const officeId = parseInt(req.params.officeId); - // Find office by name - const office = await prisma.contactServiceContact.findFirst({ - where: { - id: officeId, - }, - }); + // Find office and verify permissions + const office = await getAuthorizedOffice(officeId, req.admin); if (!office) { return res.status(404).json({ success: false, - message: "Office not found", + message: "Office not found or access denied", }); } @@ -47,7 +82,7 @@ router.get( res.status(500).json({ success: false, message: "Failed to fetch office", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -71,15 +106,13 @@ router.get( const officeId = parseInt(req.params.officeId); - // First verify the office exists - const office = await prisma.contactServiceContact.findUnique({ - where: { id: officeId }, - }); + // Verify the office exists and admin has access + const office = await getAuthorizedOffice(officeId, req.admin); if (!office) { return res.status(404).json({ success: false, - message: "Office not found", + message: "Office not found or access denied", }); } @@ -100,7 +133,7 @@ router.get( res.status(500).json({ success: false, message: "Failed to fetch posts", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -131,15 +164,13 @@ router.post( const officeId = parseInt(req.params.officeId); const { postName, rank, description, department } = req.body; - // Verify the office exists - const office = await prisma.contactServiceContact.findUnique({ - where: { id: officeId }, - }); + // Verify the office exists and admin has access + const office = await getAuthorizedOffice(officeId, req.admin); if (!office) { return res.status(404).json({ success: false, - message: "Office not found", + message: "Office not found or access denied", }); } @@ -166,7 +197,7 @@ router.post( res.status(500).json({ success: false, message: "Failed to create post", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -206,6 +237,16 @@ router.post( const officeId = parseInt(req.params.officeId); const postId = parseInt(req.params.postId); + + // Verify the office exists and admin has access + const office = await getAuthorizedOffice(officeId, req.admin); + if (!office) { + return res.status(404).json({ + success: false, + message: "Office not found or access denied", + }); + } + const { name, email, @@ -254,7 +295,7 @@ router.post( res.status(500).json({ success: false, message: "Failed to add employee", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -289,6 +330,16 @@ router.put( const officeId = parseInt(req.params.officeId); const postId = parseInt(req.params.postId); const employeeId = parseInt(req.params.employeeId); + + // Verify the office exists and admin has access + const office = await getAuthorizedOffice(officeId, req.admin); + if (!office) { + return res.status(404).json({ + success: false, + message: "Office not found or access denied", + }); + } + const { name, email, phone, designation } = req.body; // Verify the employee exists and belongs to the correct post/office @@ -329,7 +380,7 @@ router.put( res.status(500).json({ success: false, message: "Failed to update employee", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -358,6 +409,16 @@ router.put( const officeId = parseInt(req.params.officeId); const postId = parseInt(req.params.postId); + + // Verify the office exists and admin has access + const office = await getAuthorizedOffice(officeId, req.admin); + if (!office) { + return res.status(404).json({ + success: false, + message: "Office not found or access denied", + }); + } + const { postName, rank } = req.body; // Check if the post exists and belongs to the office @@ -397,7 +458,7 @@ router.put( res.status(500).json({ success: false, message: "Failed to update post", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -429,6 +490,15 @@ router.delete( const postId = parseInt(req.params.postId); const employeeId = parseInt(req.params.employeeId); + // Verify the office exists and admin has access + const office = await getAuthorizedOffice(officeId, req.admin); + if (!office) { + return res.status(404).json({ + success: false, + message: "Office not found or access denied", + }); + } + // Verify the employee exists and belongs to the correct post/office const employee = await prisma.employee.findFirst({ where: { @@ -460,7 +530,7 @@ router.delete( res.status(500).json({ success: false, message: "Failed to delete employee", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -471,6 +541,7 @@ router.delete( // GET /api/offices/public/by-name/:officeName - Get office by name (Public) router.get( "/public/by-name/:officeName", + readLimiter, param("officeName").notEmpty().withMessage("Office name is required"), async (req: Request, res: Response) => { try { @@ -511,7 +582,7 @@ router.get( res.status(500).json({ success: false, message: "Failed to fetch office", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, @@ -520,6 +591,7 @@ router.get( // GET /api/offices/public/:officeId/posts - Get all posts for an office (Public) router.get( "/public/:officeId/posts", + readLimiter, param("officeId").isInt().withMessage("Office ID must be a valid integer"), async (req: Request, res: Response) => { try { @@ -563,7 +635,7 @@ router.get( res.status(500).json({ success: false, message: "Failed to fetch posts", - error: error instanceof Error ? error.message : "Unknown error", + error: "An internal error occurred", }); } }, diff --git a/backend/routes/schemeService.ts b/backend/routes/schemeService.ts index 22296db..c4ae1a2 100644 --- a/backend/routes/schemeService.ts +++ b/backend/routes/schemeService.ts @@ -1,11 +1,21 @@ import express, { Request, Response } from "express"; import { body, validationResult, param } from "express-validator"; -import { PrismaClient } from "@prisma/client"; -import { authenticateAdmin } from "./adminAuth"; +import { prisma } from "../lib/prisma"; +import { queryCache } from "../lib/prisma"; +import { authenticateAdmin } from "../middleware/auth"; +import { readLimiter } from "../middleware/rateLimiter"; +import { pdfUpload, uploadPDFToOCI, deleteFromOCI } from "../lib/fileUpload"; import "../types/express"; const router = express.Router(); -const prisma = new PrismaClient(); + +const getServiceAccessWhere = (admin: NonNullable) => { + if (admin.role === "super_admin") return {}; + if (admin.role === "department_admin" && admin.departmentId) { + return { departmentId: admin.departmentId }; + } + return { adminId: admin.id }; +}; // Create new scheme service (basic information) router.post( @@ -66,11 +76,17 @@ router.post( return res.status(401).json({ error: "Authentication required" }); } + const admin = req.admin; + const departmentId = + admin.role === "super_admin" + ? req.body.departmentId ?? null + : admin.departmentId ?? null; + // Check if scheme service with same name exists const existingService = await prisma.schemeService.findFirst({ where: { name: name, - adminId: req.admin.id, + adminId: admin.id, }, }); @@ -97,7 +113,8 @@ router.post( applicationMode === "offline" || applicationMode === "both" ? offlineAddress : null, - adminId: req.admin.id, + adminId: admin.id, + departmentId, status: "draft", eligibilityDetails: [], schemeDetails: [], @@ -129,7 +146,9 @@ router.get("/", authenticateAdmin, async (req: any, res) => { const { status, page = 1, limit = 10 } = req.query; const skip = (parseInt(page) - 1) * parseInt(limit); - const where: any = { adminId: req.admin.id }; + const where: any = { + ...getServiceAccessWhere(req.admin), + }; if (status && ["draft", "pending", "published"].includes(status)) { where.status = status; } @@ -160,7 +179,9 @@ router.get("/", authenticateAdmin, async (req: any, res) => { // Get statistics const stats = await prisma.schemeService.groupBy({ by: ["status"], - where: { adminId: req.admin.id }, + where: { + ...getServiceAccessWhere(req.admin), + }, _count: { status: true, }, @@ -209,12 +230,11 @@ router.get( } const serviceId = parseInt(req.params.id); - console.log("Getting scheme service with ID:", serviceId); const schemeService = await prisma.schemeService.findFirst({ where: { id: serviceId, - adminId: req.admin.id, + ...getServiceAccessWhere(req.admin), }, include: { admin: { @@ -225,14 +245,11 @@ router.get( }, }); - console.log("Found scheme service:", schemeService); if (!schemeService) { - console.log("Scheme service not found"); return res.status(404).json({ error: "Scheme service not found" }); } - console.log("Returning scheme service response"); res.json({ schemeService }); } catch (error) { console.error("Get scheme service error:", error); @@ -294,7 +311,7 @@ router.put( const existingService = await prisma.schemeService.findFirst({ where: { id: serviceId, - adminId: req.admin.id, + ...getServiceAccessWhere(req.admin), }, }); @@ -455,7 +472,7 @@ router.patch( const existingService = await prisma.schemeService.findFirst({ where: { id: serviceId, - adminId: req.admin.id, + ...getServiceAccessWhere(req.admin), }, include: { contacts: true, @@ -499,11 +516,17 @@ router.patch( }); } - // Update status to published + // Determine publisher name for accountability + const publisherName = + req.admin!.role === "super_admin" ? "Admin" : req.admin!.name; + + // Update status to published with publisher info const updatedService = await prisma.schemeService.update({ where: { id: serviceId }, data: { status: "published", + publishedBy: req.admin!.id, + publishedByName: publisherName, updatedAt: new Date(), }, include: { @@ -519,6 +542,9 @@ router.patch( message: "Scheme service published successfully", schemeService: updatedService, }); + + // Invalidate appropriate caches + await queryCache.invalidate("schemes:public"); } catch (error) { console.error("Publish scheme service error:", error); res.status(500).json({ error: "Internal server error" }); @@ -553,7 +579,7 @@ router.patch( const existingService = await prisma.schemeService.findFirst({ where: { id: serviceId, - adminId: req.admin.id, + ...getServiceAccessWhere(req.admin), }, }); @@ -581,6 +607,9 @@ router.patch( message: `Scheme service ${isActive ? "activated" : "deactivated"} successfully`, schemeService: updatedService, }); + + // Invalidate public cache + await queryCache.invalidate("schemes:public"); } catch (error) { console.error("Toggle scheme service active status error:", error); res.status(500).json({ error: "Internal server error" }); @@ -611,7 +640,7 @@ router.delete( const existingService = await prisma.schemeService.findFirst({ where: { id: serviceId, - adminId: req.admin.id, + ...getServiceAccessWhere(req.admin), }, }); @@ -624,6 +653,9 @@ router.delete( where: { id: serviceId }, }); + // Invalidate public cache + await queryCache.invalidate("schemes:public"); + res.json({ message: "Scheme service deleted successfully" }); } catch (error) { console.error("Delete scheme service error:", error); @@ -632,11 +664,76 @@ router.delete( }, ); +// Upload PDF for scheme service +router.post( + "/:id/upload-pdf", + authenticateAdmin, + param("id").isInt().withMessage("Invalid service ID"), + pdfUpload.single("pdf"), + async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id); + + if (!req.file) { + return res.status(400).json({ error: "No PDF file uploaded" }); + } + + const existingService = await prisma.schemeService.findFirst({ + where: { + id, + ...getServiceAccessWhere(req.admin!), + }, + }); + + if (!existingService) { + return res.status(404).json({ error: "Scheme service not found" }); + } + + // Delete old PDF from OCI if it exists + if (existingService.pdfUrl?.startsWith("https://")) { + await deleteFromOCI(existingService.pdfUrl); + } + + const pdfUrl = await uploadPDFToOCI(req.file); + + const updatedService = await prisma.schemeService.update({ + where: { id }, + data: { pdfUrl }, + include: { + admin: { select: { id: true, name: true, email: true } }, + contacts: true, + documents: true, + }, + }); + + res.json({ + message: "PDF uploaded successfully", + schemeService: updatedService, + pdfUrl, + }); + } catch (error) { + console.error("Error uploading PDF:", error); + res.status(500).json({ error: "Internal server error" }); + } + }, +); + // Get public scheme services (for user dashboard) -router.get("/public/list", async (req, res) => { +router.get("/public/list", readLimiter, async (req, res) => { try { const { page = 1, limit = 10, search } = req.query; - const skip = (parseInt(page as string) - 1) * parseInt(limit as string); + const limitNum = Math.min(parseInt(limit as string) || 10, 100); + const skip = (parseInt(page as string) - 1) * limitNum; + + // Use cache for non-search queries + const cacheKey = search ? null : `schemes:public:${page}:${limitNum}`; + if (cacheKey) { + const cached = await queryCache.get(cacheKey); + if (cached) { + res.set("Cache-Control", "public, max-age=60, s-maxage=120"); + return res.json(cached); + } + } const where: any = { status: "published" }; @@ -668,20 +765,28 @@ router.get("/public/list", async (req, res) => { }, orderBy: { updatedAt: "desc" }, skip, - take: parseInt(limit as string), + take: limitNum, }), prisma.schemeService.count({ where }), ]); - res.json({ + const result = { schemeServices, pagination: { page: parseInt(page as string), - limit: parseInt(limit as string), + limit: limitNum, total, - pages: Math.ceil(total / parseInt(limit as string)), + pages: Math.ceil(total / limitNum), }, - }); + }; + + // Cache non-search results for 2 minutes + if (cacheKey) { + await queryCache.set(cacheKey, result, 120_000); + } + + res.set("Cache-Control", "public, max-age=60, s-maxage=120"); + res.json(result); } catch (error) { console.error("Get public scheme services error:", error); res.status(500).json({ error: "Internal server error" }); diff --git a/backend/routes/simpleAuth.ts b/backend/routes/simpleAuth.ts deleted file mode 100644 index 0f737de..0000000 --- a/backend/routes/simpleAuth.ts +++ /dev/null @@ -1,99 +0,0 @@ -import express from "express"; -import bcrypt from "bcryptjs"; -import jwt from "jsonwebtoken"; -import { PrismaClient } from "@prisma/client"; - -const router = express.Router(); -const prisma = new PrismaClient(); - -// Simple register admin -router.post("/register", async (req, res) => { - try { - const { email, password, name } = req.body; - - // Check if admin already exists - const existingAdmin = await prisma.admin.findUnique({ - where: { email }, - }); - - if (existingAdmin) { - return res.status(400).json({ error: "Admin already exists" }); - } - - // Hash password - const hashedPassword = await bcrypt.hash(password, 12); - - // Create admin - const admin = await prisma.admin.create({ - data: { - email, - password: hashedPassword, - name, - }, - }); - - // Generate JWT token - const token = jwt.sign( - { adminId: admin.id, email: admin.email }, - process.env.JWT_SECRET || "fallback-secret", - { expiresIn: "7d" }, - ); - - res.status(201).json({ - message: "Admin registered successfully", - token, - admin: { - id: admin.id, - email: admin.email, - name: admin.name, - }, - }); - } catch (error) { - console.error("Register error:", error); - res.status(500).json({ error: "Internal server error" }); - } -}); - -// Simple login -router.post("/login", async (req, res) => { - try { - const { email, password } = req.body; - - // Find admin - const admin = await prisma.admin.findUnique({ - where: { email }, - }); - - if (!admin) { - return res.status(401).json({ error: "Invalid credentials" }); - } - - // Check password - const isValid = await bcrypt.compare(password, admin.password); - if (!isValid) { - return res.status(401).json({ error: "Invalid credentials" }); - } - - // Generate JWT token - const token = jwt.sign( - { adminId: admin.id, email: admin.email }, - process.env.JWT_SECRET || "fallback-secret", - { expiresIn: "7d" }, - ); - - res.json({ - message: "Login successful", - token, - admin: { - id: admin.id, - email: admin.email, - name: admin.name, - }, - }); - } catch (error) { - console.error("Login error:", error); - res.status(500).json({ error: "Internal server error" }); - } -}); - -export default router; diff --git a/backend/routes/testAuth.ts b/backend/routes/testAuth.ts deleted file mode 100644 index 9ace7de..0000000 --- a/backend/routes/testAuth.ts +++ /dev/null @@ -1,10 +0,0 @@ -import express from "express"; - -const router = express.Router(); - -// Simple test route -router.get("/test", (req, res) => { - res.json({ message: "Auth route test working" }); -}); - -export default router; diff --git a/backend/types/express.ts b/backend/types/express.ts index d05c539..0978b99 100644 --- a/backend/types/express.ts +++ b/backend/types/express.ts @@ -8,7 +8,16 @@ declare global { id: number; email: string; name: string; - role?: string; + role: string; + isActive: boolean; + departmentId?: number | null; + assignedServices?: string[]; + createdById?: number | null; + department?: { + id: number; + name: string; + code: string; + } | null; }; } } @@ -20,5 +29,19 @@ export type RequestHandler = ( res: Response, ) => Promise | void; export type AdminRequest = Request & { - admin: { id: number; email: string; name: string; role?: string }; + admin: { + id: number; + email: string; + name: string; + role: string; + isActive: boolean; + departmentId?: number | null; + assignedServices?: string[]; + createdById?: number | null; + department?: { + id: number; + name: string; + code: string; + } | null; + }; }; diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 834ff47..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,59 +0,0 @@ -version: "3.8" - -services: - # PostgreSQL Database - postgres: - image: postgres:15-alpine - container_name: gov-services-db - environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - POSTGRES_DB: government_services - ports: - - "5432:5432" - volumes: - - postgres_data:/var/lib/postgresql/data - networks: - - gov-services-network - - # Backend API - backend: - build: - context: . - target: production - container_name: gov-services-backend - environment: - DATABASE_URL: "postgresql://postgres:password@postgres:5432/government_services" - JWT_SECRET: "your-jwt-secret-change-in-production" - PORT: 3001 - NODE_ENV: production - ports: - - "3001:3001" - depends_on: - - postgres - networks: - - gov-services-network - volumes: - - ./backend/uploads:/app/backend/uploads - - # Nginx (serves frontend and proxies API) - nginx: - image: nginx:alpine - container_name: gov-services-nginx - ports: - - "80:80" - - "443:443" - volumes: - - ./nginx.conf:/etc/nginx/nginx.conf - - ./frontend/dist:/usr/share/nginx/html - depends_on: - - backend - networks: - - gov-services-network - -volumes: - postgres_data: - -networks: - gov-services-network: - driver: bridge diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 3a4893c..175ed0e 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "dependencies": { "@hookform/resolvers": "^3.9.0", + "@marsidev/react-turnstile": "^1.4.2", "@radix-ui/react-accordion": "^1.2.0", "@radix-ui/react-alert-dialog": "^1.1.1", "@radix-ui/react-aspect-ratio": "^1.1.0", @@ -38,7 +39,7 @@ "@radix-ui/react-tooltip": "^1.1.4", "@react-three/drei": "^10.1.2", "@react-three/fiber": "^8.18.0", - "@tanstack/react-query": "^5.56.2", + "@tanstack/react-query": "^5.90.21", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.0.0", @@ -62,6 +63,7 @@ "vaul": "^0.9.3" }, "devDependencies": { + "@types/node": "^25.3.5", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@types/three": "^0.176.0", @@ -647,6 +649,16 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@marsidev/react-turnstile": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@marsidev/react-turnstile/-/react-turnstile-1.4.2.tgz", + "integrity": "sha512-xs1qOuyeMOz6t9BXXCXWiukC0/0+48vR08B7uwNdG05wCMnbcNgxiFmdFKDOFbM76qFYFRYlGeRfhfq1U/iZmA==", + "license": "MIT", + "peerDependencies": { + "react": "^17.0.2 || ^18.0.0 || ^19.0", + "react-dom": "^17.0.2 || ^18.0.0 || ^19.0" + } + }, "node_modules/@mediapipe/tasks-vision": { "version": "0.10.17", "resolved": "https://registry.npmjs.org/@mediapipe/tasks-vision/-/tasks-vision-0.10.17.tgz", @@ -2175,9 +2187,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.0.tgz", - "integrity": "sha512-O3rHJzAQKamUz1fvE0Qaw0xSFqsA/yafi2iqeE0pvdFtCO1viYx8QL6f3Ln/aCCTLxs68SLf0KPM9eSeM8yBnA==", + "version": "1.23.2", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.2.tgz", + "integrity": "sha512-Ic6m2U/rMjTkhERIa/0ZtXJP17QUi2CbWE7cqx4J58M8aA3QTfW+2UlQ4psvTX9IO1RfNVhK3pcpdjej7L+t2w==", "license": "MIT", "engines": { "node": ">=14.0.0" @@ -2191,9 +2203,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.2.tgz", - "integrity": "sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", + "integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==", "cpu": [ "arm" ], @@ -2205,9 +2217,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.2.tgz", - "integrity": "sha512-nTeCWY83kN64oQ5MGz3CgtPx8NSOhC5lWtsjTs+8JAJNLcP3QbLCtDDgUKQc/Ro/frpMq4SHUaHN6AMltcEoLQ==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz", + "integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==", "cpu": [ "arm64" ], @@ -2219,9 +2231,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.2.tgz", - "integrity": "sha512-HV7bW2Fb/F5KPdM/9bApunQh68YVDU8sO8BvcW9OngQVN3HHHkw99wFupuUJfGR9pYLLAjcAOA6iO+evsbBaPQ==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz", + "integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==", "cpu": [ "arm64" ], @@ -2233,9 +2245,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.2.tgz", - "integrity": "sha512-SSj8TlYV5nJixSsm/y3QXfhspSiLYP11zpfwp6G/YDXctf3Xkdnk4woJIF5VQe0of2OjzTt8EsxnJDCdHd2xMA==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz", + "integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==", "cpu": [ "x64" ], @@ -2247,9 +2259,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.2.tgz", - "integrity": "sha512-ZyrsG4TIT9xnOlLsSSi9w/X29tCbK1yegE49RYm3tu3wF1L/B6LVMqnEWyDB26d9Ecx9zrmXCiPmIabVuLmNSg==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz", + "integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==", "cpu": [ "arm64" ], @@ -2261,9 +2273,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.2.tgz", - "integrity": "sha512-pCgHFoOECwVCJ5GFq8+gR8SBKnMO+xe5UEqbemxBpCKYQddRQMgomv1104RnLSg7nNvgKy05sLsY51+OVRyiVw==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz", + "integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==", "cpu": [ "x64" ], @@ -2275,9 +2287,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.2.tgz", - "integrity": "sha512-EtP8aquZ0xQg0ETFcxUbU71MZlHaw9MChwrQzatiE8U/bvi5uv/oChExXC4mWhjiqK7azGJBqU0tt5H123SzVA==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz", + "integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==", "cpu": [ "arm" ], @@ -2289,9 +2301,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.2.tgz", - "integrity": "sha512-qO7F7U3u1nfxYRPM8HqFtLd+raev2K137dsV08q/LRKRLEc7RsiDWihUnrINdsWQxPR9jqZ8DIIZ1zJJAm5PjQ==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz", + "integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==", "cpu": [ "arm" ], @@ -2303,9 +2315,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.2.tgz", - "integrity": "sha512-3dRaqLfcOXYsfvw5xMrxAk9Lb1f395gkoBYzSFcc/scgRFptRXL9DOaDpMiehf9CO8ZDRJW2z45b6fpU5nwjng==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz", + "integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==", "cpu": [ "arm64" ], @@ -2317,9 +2329,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.2.tgz", - "integrity": "sha512-fhHFTutA7SM+IrR6lIfiHskxmpmPTJUXpWIsBXpeEwNgZzZZSg/q4i6FU4J8qOGyJ0TR+wXBwx/L7Ho9z0+uDg==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz", + "integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==", "cpu": [ "arm64" ], @@ -2330,10 +2342,24 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.2.tgz", - "integrity": "sha512-i7wfGFXu8x4+FRqPymzjD+Hyav8l95UIZ773j7J7zRYc3Xsxy2wIn4x+llpunexXe6laaO72iEjeeGyUFmjKeA==", + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz", + "integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz", + "integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==", "cpu": [ "loong64" ], @@ -2345,9 +2371,23 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.2.tgz", - "integrity": "sha512-B/l0dFcHVUnqcGZWKcWBSV2PF01YUt0Rvlurci5P+neqY/yMKchGU8ullZvIv5e8Y1C6wOn+U03mrDylP5q9Yw==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz", + "integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz", + "integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==", "cpu": [ "ppc64" ], @@ -2359,9 +2399,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.2.tgz", - "integrity": "sha512-32k4ENb5ygtkMwPMucAb8MtV8olkPT03oiTxJbgkJa7lJ7dZMr0GCFJlyvy+K8iq7F/iuOr41ZdUHaOiqyR3iQ==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz", + "integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==", "cpu": [ "riscv64" ], @@ -2373,9 +2413,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.2.tgz", - "integrity": "sha512-t5B2loThlFEauloaQkZg9gxV05BYeITLvLkWOkRXogP4qHXLkWSbSHKM9S6H1schf/0YGP/qNKtiISlxvfmmZw==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz", + "integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==", "cpu": [ "riscv64" ], @@ -2387,9 +2427,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.2.tgz", - "integrity": "sha512-YKjekwTEKgbB7n17gmODSmJVUIvj8CX7q5442/CK80L8nqOUbMtf8b01QkG3jOqyr1rotrAnW6B/qiHwfcuWQA==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz", + "integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==", "cpu": [ "s390x" ], @@ -2401,9 +2441,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.2.tgz", - "integrity": "sha512-Jj5a9RUoe5ra+MEyERkDKLwTXVu6s3aACP51nkfnK9wJTraCC8IMe3snOfALkrjTYd2G1ViE1hICj0fZ7ALBPA==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz", + "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==", "cpu": [ "x64" ], @@ -2415,9 +2455,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.2.tgz", - "integrity": "sha512-7kX69DIrBeD7yNp4A5b81izs8BqoZkCIaxQaOpumcJ1S/kmqNFjPhDu1LHeVXv0SexfHQv5cqHsxLOjETuqDuA==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz", + "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==", "cpu": [ "x64" ], @@ -2428,10 +2468,38 @@ "linux" ] }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz", + "integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz", + "integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.2.tgz", - "integrity": "sha512-wiJWMIpeaak/jsbaq2HMh/rzZxHVW1rU6coyeNNpMwk5isiPjSTx0a4YLSlYDwBH/WBvLz+EtsNqQScZTLJy3g==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz", + "integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==", "cpu": [ "arm64" ], @@ -2443,9 +2511,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.2.tgz", - "integrity": "sha512-gBgaUDESVzMgWZhcyjfs9QFK16D8K6QZpwAaVNJxYDLHWayOta4ZMjGm/vsAEy3hvlS2GosVFlBlP9/Wb85DqQ==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz", + "integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==", "cpu": [ "ia32" ], @@ -2456,10 +2524,24 @@ "win32" ] }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz", + "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.2.tgz", - "integrity": "sha512-CvUo2ixeIQGtF6WvuB87XWqPQkoFAFqW+HUo/WzHwuHDvIwZCtjdWXoYCcr06iKGydiqTclC4jU/TNObC/xKZg==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz", + "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==", "cpu": [ "x64" ], @@ -2697,9 +2779,9 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.83.1", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.83.1.tgz", - "integrity": "sha512-OG69LQgT7jSp+5pPuCfzltq/+7l2xoweggjme9vlbCPa/d7D7zaqv5vN/S82SzSYZ4EDLTxNO1PWrv49RAS64Q==", + "version": "5.90.20", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.90.20.tgz", + "integrity": "sha512-OMD2HLpNouXEfZJWcKeVKUgQ5n+n3A2JFmBaScpNDUqSrQSjiveC7dKMe53uJUg1nDG16ttFPz2xfilz6i2uVg==", "license": "MIT", "funding": { "type": "github", @@ -2707,12 +2789,12 @@ } }, "node_modules/@tanstack/react-query": { - "version": "5.84.1", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.84.1.tgz", - "integrity": "sha512-zo7EUygcWJMQfFNWDSG7CBhy8irje/XY0RDVKKV4IQJAysb+ZJkkJPcnQi+KboyGUgT+SQebRFoTqLuTtfoDLw==", + "version": "5.90.21", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.90.21.tgz", + "integrity": "sha512-0Lu6y5t+tvlTJMTO7oh5NSpJfpg/5D41LlThfepTixPYkJ0sE2Jj0m0f6yYqujBwIXlId87e234+MxG3D3g7kg==", "license": "MIT", "dependencies": { - "@tanstack/query-core": "5.83.1" + "@tanstack/query-core": "5.90.20" }, "funding": { "type": "github", @@ -2804,6 +2886,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/node": { + "version": "25.3.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.5.tgz", + "integrity": "sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } + }, "node_modules/@types/offscreencanvas": { "version": "2019.7.3", "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz", @@ -2957,6 +3049,19 @@ "node": ">= 8" } }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", @@ -3808,9 +3913,10 @@ } }, "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -4078,9 +4184,9 @@ "license": "MIT" }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", "license": "MIT" }, "node_modules/loose-envify": { @@ -4160,14 +4266,27 @@ "node": ">=8.6" } }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -4336,13 +4455,13 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { - "node": ">=8.6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" @@ -4716,12 +4835,12 @@ } }, "node_modules/react-router": { - "version": "6.30.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.1.tgz", - "integrity": "sha512-X1m21aEmxGXqENEPG3T6u0Th7g0aS4ZmoNynhbs+Cn+q+QGTLt+d5IQ2bHAXKzKcxGJjxACpVbnYQSCRcfxHlQ==", + "version": "6.30.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.3.tgz", + "integrity": "sha512-XRnlbKMTmktBkjCLE8/XcZFlnHvr2Ltdr1eJX4idL55/9BbORzyZEaIkBFDhFGCEWBBItsVrDxwx3gnisMitdw==", "license": "MIT", "dependencies": { - "@remix-run/router": "1.23.0" + "@remix-run/router": "1.23.2" }, "engines": { "node": ">=14.0.0" @@ -4731,13 +4850,13 @@ } }, "node_modules/react-router-dom": { - "version": "6.30.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.1.tgz", - "integrity": "sha512-llKsgOkZdbPU1Eg3zK8lCn+sjD9wMRZZPuzmdWWX5SUs8OFkN5HnFVC0u5KMeMaC9aoancFI/KoLuKPqN+hxHw==", + "version": "6.30.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.3.tgz", + "integrity": "sha512-pxPcv1AczD4vso7G4Z3TKcvlxK7g7TNt3/FNGMhfqyntocvYKj+GCatfigGDjbLozC4baguJ0ReCigoDJXb0ag==", "license": "MIT", "dependencies": { - "@remix-run/router": "1.23.0", - "react-router": "6.30.1" + "@remix-run/router": "1.23.2", + "react-router": "6.30.3" }, "engines": { "node": ">=14.0.0" @@ -4838,6 +4957,19 @@ "node": ">=8.10.0" } }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/recharts": { "version": "2.15.4", "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.15.4.tgz", @@ -4912,9 +5044,9 @@ } }, "node_modules/rollup": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.46.2.tgz", - "integrity": "sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", + "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==", "dev": true, "license": "MIT", "dependencies": { @@ -4928,26 +5060,31 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.46.2", - "@rollup/rollup-android-arm64": "4.46.2", - "@rollup/rollup-darwin-arm64": "4.46.2", - "@rollup/rollup-darwin-x64": "4.46.2", - "@rollup/rollup-freebsd-arm64": "4.46.2", - "@rollup/rollup-freebsd-x64": "4.46.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.46.2", - "@rollup/rollup-linux-arm-musleabihf": "4.46.2", - "@rollup/rollup-linux-arm64-gnu": "4.46.2", - "@rollup/rollup-linux-arm64-musl": "4.46.2", - "@rollup/rollup-linux-loongarch64-gnu": "4.46.2", - "@rollup/rollup-linux-ppc64-gnu": "4.46.2", - "@rollup/rollup-linux-riscv64-gnu": "4.46.2", - "@rollup/rollup-linux-riscv64-musl": "4.46.2", - "@rollup/rollup-linux-s390x-gnu": "4.46.2", - "@rollup/rollup-linux-x64-gnu": "4.46.2", - "@rollup/rollup-linux-x64-musl": "4.46.2", - "@rollup/rollup-win32-arm64-msvc": "4.46.2", - "@rollup/rollup-win32-ia32-msvc": "4.46.2", - "@rollup/rollup-win32-x64-msvc": "4.46.2", + "@rollup/rollup-android-arm-eabi": "4.59.0", + "@rollup/rollup-android-arm64": "4.59.0", + "@rollup/rollup-darwin-arm64": "4.59.0", + "@rollup/rollup-darwin-x64": "4.59.0", + "@rollup/rollup-freebsd-arm64": "4.59.0", + "@rollup/rollup-freebsd-x64": "4.59.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.59.0", + "@rollup/rollup-linux-arm-musleabihf": "4.59.0", + "@rollup/rollup-linux-arm64-gnu": "4.59.0", + "@rollup/rollup-linux-arm64-musl": "4.59.0", + "@rollup/rollup-linux-loong64-gnu": "4.59.0", + "@rollup/rollup-linux-loong64-musl": "4.59.0", + "@rollup/rollup-linux-ppc64-gnu": "4.59.0", + "@rollup/rollup-linux-ppc64-musl": "4.59.0", + "@rollup/rollup-linux-riscv64-gnu": "4.59.0", + "@rollup/rollup-linux-riscv64-musl": "4.59.0", + "@rollup/rollup-linux-s390x-gnu": "4.59.0", + "@rollup/rollup-linux-x64-gnu": "4.59.0", + "@rollup/rollup-linux-x64-musl": "4.59.0", + "@rollup/rollup-openbsd-x64": "4.59.0", + "@rollup/rollup-openharmony-arm64": "4.59.0", + "@rollup/rollup-win32-arm64-msvc": "4.59.0", + "@rollup/rollup-win32-ia32-msvc": "4.59.0", + "@rollup/rollup-win32-x64-gnu": "4.59.0", + "@rollup/rollup-win32-x64-msvc": "4.59.0", "fsevents": "~2.3.2" } }, @@ -5354,19 +5491,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5474,6 +5598,13 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true, + "license": "MIT" + }, "node_modules/update-browserslist-db": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", @@ -5609,9 +5740,9 @@ } }, "node_modules/vite": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", - "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", + "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "dev": true, "license": "MIT", "dependencies": { @@ -5683,19 +5814,6 @@ } } }, - "node_modules/vite/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/webgl-constants": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/webgl-constants/-/webgl-constants-1.1.1.tgz", diff --git a/frontend/package.json b/frontend/package.json index 1173e57..41cadc8 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,6 +12,7 @@ }, "dependencies": { "@hookform/resolvers": "^3.9.0", + "@marsidev/react-turnstile": "^1.4.2", "@radix-ui/react-accordion": "^1.2.0", "@radix-ui/react-alert-dialog": "^1.1.1", "@radix-ui/react-aspect-ratio": "^1.1.0", @@ -41,7 +42,7 @@ "@radix-ui/react-tooltip": "^1.1.4", "@react-three/drei": "^10.1.2", "@react-three/fiber": "^8.18.0", - "@tanstack/react-query": "^5.56.2", + "@tanstack/react-query": "^5.90.21", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.0.0", @@ -65,6 +66,7 @@ "vaul": "^0.9.3" }, "devDependencies": { + "@types/node": "^25.3.5", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@types/three": "^0.176.0", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index f44cd69..8e1ec58 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -5,37 +5,106 @@ import { createRoot } from "react-dom/client"; import { Toaster as Sonner } from "@/components/ui/sonner"; import { TooltipProvider } from "@/components/ui/tooltip"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { BrowserRouter, Routes, Route } from "react-router-dom"; -import { AuthProvider } from "./contexts/AuthContext"; +import { BrowserRouter, Routes, Route, Navigate, Outlet } from "react-router-dom"; +import { AuthProvider, useAuth } from "./contexts/AuthContext"; +import { lazy, Suspense } from "react"; +import CookieConsent from "./components/CookieConsent"; + +// ─── Critical pages (eagerly loaded) ─── import Index from "./pages/Index"; -import UserDashboard from "./pages/UserDashboard"; -import NotFound from "./pages/NotFound"; -import ServiceDetails from "./pages/ServiceDetails"; -import AdminProfile from "./pages/AdminProfile"; import AdminLogin from "./pages/AdminLogin"; -import AdminRegister from "./pages/AdminRegister"; -import CreateSchemeService from "./pages/CreateSchemeService"; -import CreateCertificateService from "./pages/CreateCertificateService"; -import CreateContactService from "./pages/CreateContactService"; -import UserSchemeService from "./pages/UserSchemeService"; -import UserCertificateService from "./pages/UserCertificateService"; -import UserContactService from "./pages/UserContactService"; -import UserGrievancesService from "./pages/UserGrievancesService"; -import UserEmergencyService from "./pages/UserEmergencyService"; -import UserFeedbackService from "./pages/UserFeedbackService"; -import AdminLayout, { DashboardHome } from "./pages/AdminDashboard"; -import AdminSchemeService from "./pages/AdminSchemeService"; -import AdminCertificateService from "./pages/AdminCertificateService"; -import AdminContactService from "./pages/AdminContactService"; -import AdminGrievancesService from "./pages/AdminGrievancesService"; -import AdminEmergencyService from "./pages/AdminEmergencyService"; -import AdminFeedbackService from "./pages/AdminFeedbackService"; -import EditSchemeService from "./pages/EditSchemeService"; -import EditCertificateService from "./pages/EditCertificateService"; -import EditContactDepartment from "./pages/EditContactDepartment"; -import OfficeDetails from "./pages/OfficeDetails"; - -const queryClient = new QueryClient(); +import NotFound from "./pages/NotFound"; + +// ─── Loading fallback ─── +const PageLoader = () => ( +

+
+
+ Loading... +
+
+); + +// ─── Lazy-loaded pages (code splitting) ─── +const UserDashboard = lazy(() => import("./pages/UserDashboard")); +const ServiceDetails = lazy(() => import("./pages/ServiceDetails")); +const AdminProfile = lazy(() => import("./pages/AdminProfile")); +const CreateSchemeService = lazy(() => import("./pages/CreateSchemeService")); +const CreateCertificateService = lazy(() => import("./pages/CreateCertificateService")); +const CreateContactService = lazy(() => import("./pages/CreateContactService")); +const UserSchemeService = lazy(() => import("./pages/UserSchemeService")); +const UserCertificateService = lazy(() => import("./pages/UserCertificateService")); +const UserContactService = lazy(() => import("./pages/UserContactService")); +const UserGrievancesService = lazy(() => import("./pages/UserGrievancesService")); +const UserEmergencyService = lazy(() => import("./pages/UserEmergencyService")); +const UserFeedbackService = lazy(() => import("./pages/UserFeedbackService")); + +// Admin pages — lazy loaded since they're behind auth +const AdminSchemeService = lazy(() => import("./pages/AdminSchemeService")); +const AdminCertificateService = lazy(() => import("./pages/AdminCertificateService")); +const AdminContactService = lazy(() => import("./pages/AdminContactService")); +const AdminGrievancesService = lazy(() => import("./pages/AdminGrievancesService")); +const AdminEmergencyService = lazy(() => import("./pages/AdminEmergencyService")); +const AdminFeedbackService = lazy(() => import("./pages/AdminFeedbackService")); +const EditSchemeService = lazy(() => import("./pages/EditSchemeService")); +const EditCertificateService = lazy(() => import("./pages/EditCertificateService")); +const EditContactDepartment = lazy(() => import("./pages/EditContactDepartment")); +const OfficeDetails = lazy(() => import("./pages/OfficeDetails")); +const AdminDepartments = lazy(() => import("./pages/AdminDepartments")); +const AdminManagementPage = lazy(() => import("./pages/AdminManagementPage")); +const AdminAuditLogs = lazy(() => import("./pages/AdminAuditLogs")); + +// Lazy wrapper for AdminLayout + DashboardHome (named exports) +const AdminLayoutWithHome = lazy(async () => { + const mod = await import("./pages/AdminDashboard"); + return { + default: () => ( + + + + ), + }; +}); + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + retry: 1, + staleTime: 5 * 60 * 1000, // 5 minutes + gcTime: 10 * 60 * 1000, // 10 minutes garbage collection + refetchOnWindowFocus: false, // Prevent unnecessary refetches + refetchOnReconnect: "always", + }, + mutations: { + retry: 0, + }, + }, +}); + +// ─── Route Guards ─── +const RequireAuth = () => { + const { isAuthenticated, isLoading } = useAuth(); + if (isLoading) return ; + return isAuthenticated ? : ; +}; + +const RequireSuperAdmin = () => { + const { isSuperAdmin, isLoading } = useAuth(); + if (isLoading) return ; + return isSuperAdmin ? : ; +}; + +const RequireDeptAdminOrAbove = () => { + const { isSuperAdmin, isDepartmentAdmin, isLoading } = useAuth(); + if (isLoading) return ; + return (isSuperAdmin || isDepartmentAdmin) ? : ; +}; + +const RedirectIfAuth = () => { + const { isAuthenticated, isLoading } = useAuth(); + if (isLoading) return ; + return isAuthenticated ? : ; +}; const App = () => ( @@ -43,119 +112,62 @@ const App = () => ( + - - } /> - } - /> - } /> - } /> - } /> - - - - } - /> - - } /> - } /> - } /> - } /> - } - /> - } - /> - } /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - {/* User-specific service pages */} - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - {/* Admin-specific service pages */} - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */} - } /> - + }> + + {/* ─── Public Routes ─── */} + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + {/* ─── Auth Routes (redirect if already logged in) ─── */} + }> + } /> + + + {/* ─── Protected Admin Routes ─── */} + }> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + {/* Dept Admin or SuperAdmin routes */} + }> + } /> + + + {/* Super Admin Only Routes */} + }> + } /> + + + {/* Admin service pages */} + } /> + } /> + } /> + } /> + } /> + } /> + + + {/* ─── Catch-all ─── */} + } /> + + diff --git a/frontend/src/components/CookieConsent.tsx b/frontend/src/components/CookieConsent.tsx new file mode 100644 index 0000000..11b88d6 --- /dev/null +++ b/frontend/src/components/CookieConsent.tsx @@ -0,0 +1,64 @@ +import { useState, useEffect } from "react"; +import { Button } from "@/components/ui/button"; +import { Cookie } from "lucide-react"; + +const COOKIE_CONSENT_KEY = "cookie-consent-accepted"; + +export default function CookieConsent() { + const [visible, setVisible] = useState(false); + + useEffect(() => { + const consent = localStorage.getItem(COOKIE_CONSENT_KEY); + if (!consent) { + // Slight delay for smoother UX + const timer = setTimeout(() => setVisible(true), 1000); + return () => clearTimeout(timer); + } + }, []); + + const handleAccept = () => { + localStorage.setItem(COOKIE_CONSENT_KEY, "accepted"); + setVisible(false); + }; + + const handleDecline = () => { + localStorage.setItem(COOKIE_CONSENT_KEY, "declined"); + setVisible(false); + }; + + if (!visible) return null; + + return ( +
+
+
+ +
+

Cookie Notice

+

+ This website uses essential cookies to ensure proper functionality, including authentication and session management. + No tracking or advertising cookies are used. By continuing to use this site, you agree to our use of essential cookies. +

+
+
+
+ + +
+
+
+ ); +} diff --git a/frontend/src/components/ui/AdminSidebar.tsx b/frontend/src/components/ui/AdminSidebar.tsx index 7f372b8..334f19d 100644 --- a/frontend/src/components/ui/AdminSidebar.tsx +++ b/frontend/src/components/ui/AdminSidebar.tsx @@ -1,33 +1,155 @@ import { Link, useLocation, useNavigate } from "react-router-dom"; import { Button } from "@/components/ui/button"; +import { useAuth } from "@/contexts/AuthContext"; +import { + Building2, + UserCog, + ScrollText, + FileText, + Award, + Phone, + MessageSquare, + ThumbsUp, + LayoutDashboard, + Shield, + LogOut, + Users, +} from "lucide-react"; export function AdminSidebar() { const location = useLocation(); const navigate = useNavigate(); - const menuItems = [ - { label: "Scheme Service", path: "/admin-scheme-service" }, - { label: "Certificate Service", path: "/admin-certificate-service" }, - { label: "Contact Service", path: "/admin-contact-service" }, - { label: "Grievances Service", path: "/admin-grievances-service" }, - { label: "Feedback Service", path: "/admin-feedback-service" }, + const { isSuperAdmin, isDepartmentAdmin, isIndividualAdmin, admin, logout, hasServiceAccess } = useAuth(); + + const allServiceItems = [ + { label: "Schemes", path: "/admin-scheme-service", icon: FileText, service: "schemes" }, + { label: "Certificates", path: "/admin-certificate-service", icon: Award, service: "certificates" }, + { label: "Contacts", path: "/admin-contact-service", icon: Phone, service: "contacts" }, + { label: "Grievances", path: "/admin-grievances-service", icon: MessageSquare, service: "grievances" }, + { label: "Feedback", path: "/admin-feedback-service", icon: ThumbsUp, service: "feedback" }, + ]; + + // Filter service items based on role and assigned services + const serviceItems = isIndividualAdmin + ? allServiceItems.filter((item) => hasServiceAccess(item.service)) + : allServiceItems; + + const superAdminItems = [ + { label: "Departments", path: "/admin/departments", icon: Building2 }, + { label: "Manage Admins", path: "/admin/manage-admins", icon: UserCog }, + { label: "Audit Logs", path: "/admin/audit-logs", icon: ScrollText }, ]; + + const deptAdminItems = [ + { label: "Manage Admins", path: "/admin/manage-admins", icon: Users }, + ]; + + const getRoleBadge = () => { + if (admin?.role === "super_admin") return "Super Admin"; + if (admin?.role === "department_admin") return "Dept Admin"; + return "Admin"; + }; + + const linkClass = (path: string) => + `flex items-center gap-2.5 rounded-md px-3 py-2 text-sm transition-colors ${ + location.pathname === path + ? "bg-teal-50 text-teal-700 font-semibold" + : "text-slate-600 hover:bg-slate-50 hover:text-slate-900" + }`; + return ( - ); } diff --git a/frontend/src/components/ui/calendar.tsx b/frontend/src/components/ui/calendar.tsx index 9c94321..432f17b 100644 --- a/frontend/src/components/ui/calendar.tsx +++ b/frontend/src/components/ui/calendar.tsx @@ -52,8 +52,8 @@ function Calendar({ ...classNames, }} components={{ - IconLeft: ({ ..._props }) => , - IconRight: ({ ..._props }) => , + IconLeft: () => , + IconRight: () => , }} {...props} /> diff --git a/frontend/src/components/ui/sidebar.tsx b/frontend/src/components/ui/sidebar.tsx index 9b0618e..a57e3fd 100644 --- a/frontend/src/components/ui/sidebar.tsx +++ b/frontend/src/components/ui/sidebar.tsx @@ -8,7 +8,7 @@ import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Separator } from "@/components/ui/separator"; -import { Sheet, SheetContent } from "@/components/ui/sheet"; +import { Sheet, SheetContent, SheetTrigger, SheetClose } from "@/components/ui/sheet"; import { Skeleton } from "@/components/ui/skeleton"; import { Tooltip, @@ -26,37 +26,82 @@ export function ServicesMenu() { const isAdmin = location.pathname.startsWith("/admin"); const menuItems = isAdmin ? [ - { label: "Scheme Service", path: "/scheme-service" }, - { label: "Certificate Service", path: "/certificate-service" }, - { label: "Contact Service", path: "/contact-service" }, - { label: "Grievances Service", path: "/grievances-service" }, - { label: "Feedback Service", path: "/feedback-service" }, - ] + { label: "Scheme Service", path: "/scheme-service" }, + { label: "Certificate Service", path: "/certificate-service" }, + { label: "Contact Service", path: "/contact-service" }, + { label: "Grievances Service", path: "/grievances-service" }, + { label: "Feedback Service", path: "/feedback-service" }, + ] : [ - { label: "Scheme Service", path: "/user-scheme-service" }, - { label: "Certificate Service", path: "/user-certificate-service" }, - { label: "Contact Service", path: "/user-contact-service" }, - { label: "Grievances Service", path: "/user-grievances-service" }, - { label: "Feedback Service", path: "/user-feedback-service" }, - ]; + { label: "Scheme Service", path: "/scheme-service" }, + { label: "Certificate Service", path: "/certificate-service" }, + { label: "Contact Service", path: "/contact-service" }, + { label: "Grievances Service", path: "/grievances-service" }, + { label: "Feedback Service", path: "/feedback-service" }, + ]; + + const linkClass = (path: string) => + `flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors ${location.pathname === path + ? "bg-teal-50 text-teal-700 font-semibold" + : "text-slate-600 hover:bg-slate-50 hover:text-slate-900" + }`; + return ( - + + {/* Mobile Navigation Header */} +
+ Menu + + + + + + + + +
+ ); } @@ -650,7 +695,7 @@ const SidebarMenuAction = React.forwardRef< "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", showOnHover && - "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0", + "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0", className, )} {...props} diff --git a/frontend/src/components/ui/toaster.tsx b/frontend/src/components/ui/toaster.tsx index a980324..5887f08 100644 --- a/frontend/src/components/ui/toaster.tsx +++ b/frontend/src/components/ui/toaster.tsx @@ -8,9 +8,7 @@ import { ToastViewport, } from "@/components/ui/toast"; -interface ToasterProps {} - -export function Toaster(props: ToasterProps) { +export function Toaster() { const { toasts } = useToast(); return ( diff --git a/frontend/src/contexts/AuthContext.tsx b/frontend/src/contexts/AuthContext.tsx index f40f3fd..f4cf86d 100644 --- a/frontend/src/contexts/AuthContext.tsx +++ b/frontend/src/contexts/AuthContext.tsx @@ -3,18 +3,26 @@ import React, { useContext, useState, useEffect, + useCallback, ReactNode, } from "react"; -import { apiClient, Admin, AuthResponse } from "../types/api"; +import { apiClient, Admin, Department } from "../types/api"; interface AuthContextType { admin: Admin | null; token: string | null; isLoading: boolean; + isSuperAdmin: boolean; + isDepartmentAdmin: boolean; + isIndividualAdmin: boolean; + department: Department | null; + assignedServices: string[]; login: (email: string, password: string) => Promise; register: (email: string, password: string, name: string) => Promise; logout: () => void; isAuthenticated: boolean; + refreshAuth: () => Promise; + hasServiceAccess: (service: string) => boolean; } const AuthContext = createContext(undefined); @@ -38,6 +46,22 @@ export const AuthProvider: React.FC = ({ children }) => { ); const [isLoading, setIsLoading] = useState(true); + const refreshAuth = useCallback(async () => { + try { + const result = await apiClient.refreshToken(); + if (result.token && result.admin) { + setToken(result.token); + setAdmin(result.admin); + apiClient.setToken(result.token); + } + } catch { + // Refresh failed, clear auth state + setAdmin(null); + setToken(null); + apiClient.clearToken(); + } + }, []); + // Check if user is authenticated on app start useEffect(() => { const checkAuth = async () => { @@ -50,77 +74,105 @@ export const AuthProvider: React.FC = ({ children }) => { setAdmin(response.admin); setToken(savedToken); } else { - // Token is invalid + // Token is invalid, try refresh + await refreshAuth(); + } + } catch { + // Token invalid, try refresh + try { + await refreshAuth(); + } catch { localStorage.removeItem("admin_token"); apiClient.clearToken(); } - } catch (error) { - console.error("Token validation failed:", error); - localStorage.removeItem("admin_token"); - apiClient.clearToken(); } } setIsLoading(false); }; checkAuth(); - }, []); + }, [refreshAuth]); - const login = async (email: string, password: string) => { - try { - const response: AuthResponse = await apiClient.login({ email, password }); - - if (response.admin && response.token) { - setAdmin(response.admin); - setToken(response.token); - apiClient.setToken(response.token); - localStorage.setItem("admin_token", response.token); - } else { - throw new Error("Invalid response from server"); + // Set up token refresh interval (every 12 minutes for 15min tokens) + useEffect(() => { + if (!token) return; + + const interval = setInterval(async () => { + try { + await refreshAuth(); + } catch { + // Silent fail, will be caught on next API call } - } catch (error) { - console.error("Login failed:", error); - throw error; + }, 12 * 60 * 1000); // 12 minutes + + return () => clearInterval(interval); + }, [token, refreshAuth]); + + const login = async (email: string, password: string) => { + const response = await apiClient.login({ email, password }); + + if (response.admin && response.token) { + setAdmin(response.admin); + setToken(response.token); + apiClient.setToken(response.token); + localStorage.setItem("admin_token", response.token); + } else { + throw new Error("Invalid response from server"); } }; const register = async (email: string, password: string, name: string) => { - try { - const response: AuthResponse = await apiClient.register({ - email, - password, - name, - }); - - if (response.admin && response.token) { - setAdmin(response.admin); - setToken(response.token); - apiClient.setToken(response.token); - localStorage.setItem("admin_token", response.token); - } else { - throw new Error("Invalid response from server"); - } - } catch (error) { - console.error("Registration failed:", error); - throw error; + const response = await apiClient.register({ email, password, name }); + + if (response.admin && response.token) { + setAdmin(response.admin); + setToken(response.token); + apiClient.setToken(response.token); + localStorage.setItem("admin_token", response.token); + } else { + throw new Error("Invalid response from server"); } }; - const logout = () => { + const logout = async () => { + try { + await apiClient.logout(); + } catch { + // Continue with local cleanup even if server call fails + } setAdmin(null); setToken(null); localStorage.removeItem("admin_token"); apiClient.clearToken(); }; + const isSuperAdmin = admin?.role === "super_admin"; + const isDepartmentAdmin = admin?.role === "department_admin"; + const isIndividualAdmin = admin?.role === "individual_admin"; + const department = admin?.department || null; + const assignedServices = admin?.assignedServices || []; + + const hasServiceAccess = (service: string): boolean => { + if (isSuperAdmin || isDepartmentAdmin) return true; + if (isIndividualAdmin) return assignedServices.includes(service); + return false; + }; + const value: AuthContextType = { admin, token, isLoading, + isSuperAdmin, + isDepartmentAdmin, + isIndividualAdmin, + department, + assignedServices, login, register, logout, isAuthenticated: !!admin && !!token, + refreshAuth, + hasServiceAccess, }; return {children}; diff --git a/frontend/src/global.css b/frontend/src/global.css index 5dc1769..a8379b3 100644 --- a/frontend/src/global.css +++ b/frontend/src/global.css @@ -48,7 +48,7 @@ --popover: 0 0% 100%; --popover-foreground: 222.2 47.4% 11.2%; - --primary: 217.2 91.2% 59.8%; + --primary: 175.6 77.4% 26.1%; --primary-foreground: 0 0% 100%; --secondary: 210 40% 96.1%; @@ -57,7 +57,7 @@ --muted: 210 40% 96.1%; --muted-foreground: 215.4 16.3% 46.9%; - --accent: 268.4 71% 50.1%; + --accent: 175.6 77.4% 26.1%; --accent-foreground: 0 0% 100%; --destructive: 0 84.2% 60.2%; @@ -65,7 +65,7 @@ --border: 214.3 31.8% 91.4%; --input: 214.3 31.8% 91.4%; - --ring: 222.2 84% 4.9%; + --ring: 175.6 77.4% 26.1%; --radius: 0.5rem; @@ -96,7 +96,7 @@ --popover: 222.2 84% 4.9%; --popover-foreground: 210 40% 98%; - --primary: 217.2 91.2% 59.8%; + --primary: 175.6 77.4% 26.1%; --primary-foreground: 222.2 84% 4.9%; --secondary: 217.2 32.6% 17.5%; @@ -105,7 +105,7 @@ --muted: 217.2 32.6% 17.5%; --muted-foreground: 215 20.2% 65.1%; - --accent: 268.4 71% 50.1%; + --accent: 175.6 77.4% 26.1%; --accent-foreground: 210 40% 98%; --destructive: 0 62.8% 30.6%; @@ -121,7 +121,7 @@ --sidebar-accent: 240 3.7% 15.9%; --sidebar-accent-foreground: 240 4.8% 95.9%; --sidebar-border: 240 3.7% 15.9%; - --sidebar-ring: 217.2 91.2% 59.8%; + --sidebar-ring: 175.6 77.4% 26.1%; } } diff --git a/frontend/src/pages/AdminAuditLogs.tsx b/frontend/src/pages/AdminAuditLogs.tsx new file mode 100644 index 0000000..a22625c --- /dev/null +++ b/frontend/src/pages/AdminAuditLogs.tsx @@ -0,0 +1,310 @@ +import { useState, useEffect } from "react"; +import { Button } from "@/components/ui/button"; +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { Input } from "@/components/ui/input"; +import { LoadingSpinner } from "@/components/ui/loading-spinner"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table"; +import { + ScrollText, + Search, + ChevronLeft, + ChevronRight, + ShieldAlert, +} from "lucide-react"; +import AdminSidebar from "@/components/ui/AdminSidebar"; +import { useAuth } from "@/contexts/AuthContext"; +import { useToast } from "@/hooks/use-toast"; +import { apiClient } from "../types/api"; +import type { AuditLogEntry } from "../types/api"; + +const ACTION_COLORS: Record = { + LOGIN: "bg-teal-100 text-slate-700", + LOGOUT: "bg-gray-100 text-gray-700", + LOGIN_FAILED: "bg-red-100 text-red-700", + REGISTER: "bg-green-100 text-green-700", + CREATE: "bg-emerald-100 text-emerald-700", + UPDATE: "bg-yellow-100 text-yellow-700", + DELETE: "bg-red-100 text-red-700", + PUBLISH: "bg-slate-100 text-slate-700", + TOGGLE_ACTIVE: "bg-orange-100 text-orange-700", + STATUS_CHANGE: "bg-teal-100 text-teal-700", + PASSWORD_CHANGE: "bg-pink-100 text-pink-700", +}; + +export default function AdminAuditLogs() { + const { isSuperAdmin } = useAuth(); + const { toast } = useToast(); + const [logs, setLogs] = useState([]); + const [loading, setLoading] = useState(true); + const [page, setPage] = useState(1); + const [totalPages, setTotalPages] = useState(1); + const [actionFilter, setActionFilter] = useState("all"); + const [entityFilter, setEntityFilter] = useState("all"); + const [searchTerm, setSearchTerm] = useState(""); + + useEffect(() => { + fetchLogs(); + }, [page, actionFilter, entityFilter]); + + const fetchLogs = async () => { + setLoading(true); + try { + const params: any = { page, limit: 25 }; + if (actionFilter !== "all") params.action = actionFilter; + if (entityFilter !== "all") params.entity = entityFilter; + const res = await apiClient.getAuditLogs(params); + setLogs(res.logs || []); + setTotalPages(res.pagination?.totalPages || 1); + } catch { + toast({ + title: "Error", + description: "Failed to load audit logs", + variant: "destructive", + }); + } finally { + setLoading(false); + } + }; + + if (!isSuperAdmin) { + return ( +
+ +
+ + + +

Access Denied

+

+ Only Super Admins can view audit logs. +

+
+
+
+
+ ); + } + + const filteredLogs = searchTerm + ? logs.filter( + (l) => + l.admin?.name?.toLowerCase().includes(searchTerm.toLowerCase()) || + l.entity?.toLowerCase().includes(searchTerm.toLowerCase()) || + l.action?.toLowerCase().includes(searchTerm.toLowerCase()), + ) + : logs; + + return ( +
+ +
+
+ {/* Header */} +
+

+ + Audit Logs +

+

+ Track all administrative actions across the system +

+
+ + {/* Filters */} + + +
+
+
+ + setSearchTerm(e.target.value)} + className="pl-9" + /> +
+
+
+ +
+
+ +
+
+
+
+ + {/* Logs Table */} + + + Activity History + + + {loading ? ( +
+ +
+ ) : ( + <> + + + + Time + Admin + Action + Entity + Details + IP Address + + + + {filteredLogs.map((log) => ( + + + {new Date(log.createdAt).toLocaleString()} + + + {log.admin?.name || `Admin #${log.adminId}`} + + + + {log.action} + + + + + {log.entity} + {log.entityId && ( + + {" "} + #{log.entityId} + + )} + + + + {log.details + ? typeof log.details === "string" + ? log.details + : JSON.stringify(log.details) + : "—"} + + + {log.ipAddress || "—"} + + + ))} + +
+ {filteredLogs.length === 0 && ( +
+ No audit logs found +
+ )} + + {/* Pagination */} +
+
+ Page {page} of {totalPages} +
+
+ + +
+
+ + )} +
+
+
+
+
+ ); +} diff --git a/frontend/src/pages/AdminCertificateService.tsx b/frontend/src/pages/AdminCertificateService.tsx index ce294b4..762b53d 100644 --- a/frontend/src/pages/AdminCertificateService.tsx +++ b/frontend/src/pages/AdminCertificateService.tsx @@ -8,13 +8,14 @@ import { } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { LoadingSpinner } from "@/components/ui/loading-spinner"; -import { Plus, CheckCircle, Activity, Clock, Users } from "lucide-react"; +import { Plus, CheckCircle, Activity, Clock, Users, Upload, FileText } from "lucide-react"; import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"; import { Link, useNavigate, useSearchParams } from "react-router-dom"; -import { useState, useEffect } from "react"; +import { useState, useEffect, useRef } from "react"; import { apiClient } from "../types/api"; import type { CertificateService } from "../types/api"; import { useAuth } from "../contexts/AuthContext"; +import { toast } from "../hooks/use-toast"; export default function AdminCertificateService() { const [searchParams] = useSearchParams(); @@ -26,6 +27,9 @@ export default function AdminCertificateService() { const [error, setError] = useState(""); const [deletingIds, setDeletingIds] = useState>(new Set()); const [togglingIds, setTogglingIds] = useState>(new Set()); + const [uploadingIds, setUploadingIds] = useState>(new Set()); + const pdfInputRef = useRef(null); + const [uploadTargetId, setUploadTargetId] = useState(null); const navigate = useNavigate(); const { isAuthenticated } = useAuth(); @@ -107,9 +111,9 @@ export default function AdminCertificateService() { } }; return ( -
+
-
+

Certificate Service

@@ -152,10 +156,10 @@ export default function AdminCertificateService() { Active Services - + -

+
{stats.active}

@@ -184,10 +188,10 @@ export default function AdminCertificateService() { Inactive Services - + -

+
{stats.inactive}

@@ -290,7 +294,7 @@ export default function AdminCertificateService() { {cert.status} - + {cert.applicationMode}

@@ -348,6 +352,28 @@ export default function AdminCertificateService() {
) : (
+ { + const file = e.target.files?.[0]; + if (!file || uploadTargetId === null) return; + setUploadingIds((prev) => new Set(prev).add(uploadTargetId)); + try { + const res = await apiClient.uploadServicePdf("certificate-services", uploadTargetId, file); + setCertificates((prev) => prev.map((s) => s.id === uploadTargetId ? { ...s, pdfUrl: res.pdfUrl } : s)); + toast({ title: "PDF uploaded successfully" }); + } catch (err: any) { + toast({ title: "Upload failed", description: err?.message, variant: "destructive" }); + } finally { + setUploadingIds((prev) => { const n = new Set(prev); n.delete(uploadTargetId); return n; }); + setUploadTargetId(null); + e.target.value = ""; + } + }} + /> {publishedCerts.map((cert) => (
@@ -356,11 +382,11 @@ export default function AdminCertificateService() {

{cert.summary}

-
+
{cert.status} - + {cert.applicationMode} + {cert.publishedByName && ( + + Published by: {cert.publishedByName} + + )} + {cert.pdfUrl && ( + + PDF attached + + )}
@@ -398,6 +434,21 @@ export default function AdminCertificateService() { "Activate" )} + + + + + + + {editDept ? "Edit Department" : "Create Department"} + + + {editDept + ? "Update department details" + : "Add a new government department"} + + +
+
+ + + setForm({ ...form, name: e.target.value }) + } + placeholder="e.g. Police Department" + /> +
+
+ + + setForm({ + ...form, + code: e.target.value.toUpperCase().slice(0, 5), + }) + } + placeholder="e.g. POL" + maxLength={5} + disabled={!!editDept} + /> +
+
+ +