From 51252249eb5f4d712c9aabeab4df6515a746ebf6 Mon Sep 17 00:00:00 2001 From: yiling ji Date: Sun, 8 Feb 2026 10:32:56 +0800 Subject: [PATCH] fix format --- AGENTS.md | 15 +- src/api/equipment.ts | 2 +- src/api/extract.ts | 63 +- src/env.d.ts | 6 +- src/generated/prisma/browser.ts | 3 +- src/generated/prisma/client.ts | 17 +- src/generated/prisma/commonInputTypes.ts | 8 +- src/generated/prisma/enums.ts | 11 +- src/generated/prisma/internal/class.ts | 203 +-- .../prisma/internal/prismaNamespace.ts | 341 +++-- .../prisma/internal/prismaNamespaceBrowser.ts | 57 +- src/generated/prisma/models.ts | 3 +- src/generated/prisma/models/Asset.ts | 745 +++++++---- src/generated/prisma/models/Category.ts | 902 ++++++++++---- src/generated/prisma/models/Character.ts | 800 ++++++++---- src/generated/prisma/models/Equipment.ts | 1098 ++++++++++++----- src/generated/prisma/models/Generation.ts | 909 ++++++++++---- .../prisma/models/GenerationEquipment.ts | 894 ++++++++++---- src/service/ai.ts | 109 +- src/service/category.ts | 18 +- src/service/equipment.ts | 2 +- src/service/extraction.test.ts | 40 +- src/service/extraction.ts | 126 +- src/service/file.test.ts | 13 +- src/service/file.ts | 37 +- src/ui/App.tsx | 116 +- src/ui/components/Extractor.tsx | 402 +++--- src/ui/components/LoadingOverlay.tsx | 79 +- src/ui/components/Stash.tsx | 167 ++- src/ui/index.css | 19 +- src/ui/index.html | 6 +- src/ui/index.ts | 2 +- src/ui/index.tsx | 10 +- src/ui/types.ts | 23 +- 34 files changed, 4890 insertions(+), 2356 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 96b95d9..63eca11 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,12 +37,8 @@ The frontend is built with: ### Development -- **Run Backend**: `bun --hot src/index.ts` (Runs on port 3000) -- **Run Frontend**: `bun --hot ui/index.html` (Runs on port 3001, make sure port 3000 is running for API) +- **Run Dev**: `bun --hot src/index.ts` (Runs on port 3000) -### Build - -- **Build Frontend**: `bun build ui/index.html --outdir=ui/dist` ## Testing @@ -66,7 +62,14 @@ We use `bun:test` for testing. ## Submission Rules -- **Strict Requirement**: You must ensure `lint`, `format`, `typecheck`, and `test` all pass before submitting any changes. +- **Strict Requirement**: A submission is considered complete **only** when there is a single final code state in which **all** of the following pass **simultaneously**: + - `lint` + - `format` + - `typecheck` + - `test` + +- Fixes must be iterated until **no check causes any other check to fail**. +- Do **not** submit intermediate states where some checks pass and others fail, even temporarily. ## Prisma Configuration diff --git a/src/api/equipment.ts b/src/api/equipment.ts index c9293ec..2515f8e 100644 --- a/src/api/equipment.ts +++ b/src/api/equipment.ts @@ -17,7 +17,7 @@ equipment.get('/', zValidator('query', listSchema), async (c) => { const result = await EquipmentService.listEquipments( { page, limit }, - { categoryId, subCategoryId } + { categoryId, subCategoryId }, ) return c.json(result) diff --git a/src/api/extract.ts b/src/api/extract.ts index 2c21018..69b41e4 100644 --- a/src/api/extract.ts +++ b/src/api/extract.ts @@ -23,20 +23,22 @@ extract.post('/', zValidator('form', extractSchema), async (c) => { // 1. Analyze await stream.writeSSE({ event: 'status', - data: JSON.stringify({ status: 'analyzing', message: 'Analyzing character assets...' }) + data: JSON.stringify({ status: 'analyzing', message: 'Analyzing character assets...' }), }) - let analysis; + let analysis try { analysis = await ExtractionService.analyzeImage(file) } catch (err: unknown) { - throw new Error(`Analysis failed: ${err instanceof Error ? err.message : String(err)}`, { cause: err }); + throw new Error(`Analysis failed: ${err instanceof Error ? err.message : String(err)}`, { + cause: err, + }) } if (!analysis.assets || analysis.assets.length === 0) { await stream.writeSSE({ event: 'complete', - data: JSON.stringify({ assets: [] }) + data: JSON.stringify({ assets: [] }), }) return } @@ -44,27 +46,31 @@ extract.post('/', zValidator('form', extractSchema), async (c) => { // 2. Generate Texture Sheet await stream.writeSSE({ event: 'status', - data: JSON.stringify({ status: 'generating', message: 'Generating texture sheet...' }) + data: JSON.stringify({ status: 'generating', message: 'Generating texture sheet...' }), }) - let sheetBase64: string; + let sheetBase64: string try { sheetBase64 = await ExtractionService.generateTextureSheet(file, analysis.assets) } catch (err: unknown) { - throw new Error(`Generation failed: ${err instanceof Error ? err.message : String(err)}`, { cause: err }); + throw new Error(`Generation failed: ${err instanceof Error ? err.message : String(err)}`, { + cause: err, + }) } // 3. Detect Bounding Boxes await stream.writeSSE({ event: 'status', - data: JSON.stringify({ status: 'splitting', message: 'Detecting asset boundaries...' }) + data: JSON.stringify({ status: 'splitting', message: 'Detecting asset boundaries...' }), }) - let boxes; + let boxes try { boxes = await ExtractionService.detectBoundingBoxes(sheetBase64) } catch (err: unknown) { - throw new Error(`Detection failed: ${err instanceof Error ? err.message : String(err)}`, { cause: err }); + throw new Error(`Detection failed: ${err instanceof Error ? err.message : String(err)}`, { + cause: err, + }) } // 4. Crop Assets @@ -73,18 +79,18 @@ extract.post('/', zValidator('form', extractSchema), async (c) => { // 5. Refine & Save await stream.writeSSE({ event: 'status', - data: JSON.stringify({ status: 'refining', message: 'Refining and saving assets...' }) + data: JSON.stringify({ status: 'refining', message: 'Refining and saving assets...' }), }) const refinedAssets = [] for (const crop of crops) { // Find matching asset from analysis to get category/description - const originalMeta = analysis.assets.find(a => a.item_name === crop.name) || { - item_name: crop.name, - description: "Extracted asset", - category: "Uncategorized", - background_color: "unknown" + const originalMeta = analysis.assets.find((a) => a.item_name === crop.name) || { + item_name: crop.name, + description: 'Extracted asset', + category: 'Uncategorized', + background_color: 'unknown', } // Refine image @@ -95,9 +101,9 @@ extract.post('/', zValidator('form', extractSchema), async (c) => { // Create Asset record (AssetService now has createAssetRecord) const asset = await AssetService.createAssetRecord({ - name: originalMeta.item_name, - type: 'image/webp', - path: savedFile.filename + name: originalMeta.item_name, + type: 'image/webp', + path: savedFile.filename, }) // Find or create category @@ -105,29 +111,28 @@ extract.post('/', zValidator('form', extractSchema), async (c) => { // Create Equipment record linked to Asset and Category const equipment = await EquipmentService.createEquipment({ - name: originalMeta.item_name, - description: originalMeta.description, - imageId: asset.id, - categoryId: categoryId + name: originalMeta.item_name, + description: originalMeta.description, + imageId: asset.id, + categoryId: categoryId, }) refinedAssets.push({ - ...equipment, - imageUrl: `/files/${savedFile.filename}`, // Frontend needs URL + ...equipment, + imageUrl: `/files/${savedFile.filename}`, // Frontend needs URL }) } await stream.writeSSE({ event: 'complete', - data: JSON.stringify({ assets: refinedAssets }) + data: JSON.stringify({ assets: refinedAssets }), }) - } catch (e: unknown) { console.error(e) - const error = e instanceof Error ? e : new Error(String(e)); + const error = e instanceof Error ? e : new Error(String(e)) await stream.writeSSE({ event: 'error', - data: JSON.stringify({ message: error.message || 'Extraction failed' }) + data: JSON.stringify({ message: error.message || 'Extraction failed' }), }) } }) diff --git a/src/env.d.ts b/src/env.d.ts index 3a031d8..44aa36b 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1,4 +1,4 @@ -declare module "*.html" { - const content: string; - export default content; +declare module '*.html' { + const content: string + export default content } diff --git a/src/generated/prisma/browser.ts b/src/generated/prisma/browser.ts index 721deaa..ac5c4b6 100644 --- a/src/generated/prisma/browser.ts +++ b/src/generated/prisma/browser.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -16,7 +15,7 @@ import * as Prisma from './internal/prismaNamespaceBrowser.ts' export { Prisma } export * as $Enums from './enums.ts' -export * from './enums.ts'; +export * from './enums.ts' /** * Model Asset * diff --git a/src/generated/prisma/client.ts b/src/generated/prisma/client.ts index 4fccf02..9468626 100644 --- a/src/generated/prisma/client.ts +++ b/src/generated/prisma/client.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -15,13 +14,13 @@ import * as path from 'node:path' import { fileURLToPath } from 'node:url' globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url)) -import * as runtime from "@prisma/client/runtime/client" -import * as $Enums from "./enums.ts" -import * as $Class from "./internal/class.ts" -import * as Prisma from "./internal/prismaNamespace.ts" +import * as runtime from '@prisma/client/runtime/client' +import * as $Enums from './enums.ts' +import * as $Class from './internal/class.ts' +import * as Prisma from './internal/prismaNamespace.ts' export * as $Enums from './enums.ts' -export * from "./enums.ts" +export * from './enums.ts' /** * ## Prisma Client * @@ -36,7 +35,11 @@ export * from "./enums.ts" * Read more in our [docs](https://pris.ly/d/client). */ export const PrismaClient = $Class.getPrismaClientClass() -export type PrismaClient = $Class.PrismaClient +export type PrismaClient< + LogOpts extends Prisma.LogLevel = never, + OmitOpts extends Prisma.PrismaClientOptions['omit'] = Prisma.PrismaClientOptions['omit'], + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = $Class.PrismaClient export { Prisma } /** diff --git a/src/generated/prisma/commonInputTypes.ts b/src/generated/prisma/commonInputTypes.ts index e9bb4b6..1e2a832 100644 --- a/src/generated/prisma/commonInputTypes.ts +++ b/src/generated/prisma/commonInputTypes.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -9,10 +8,9 @@ * 🟢 You can import this file directly. */ -import type * as runtime from "@prisma/client/runtime/client" -import * as $Enums from "./enums.ts" -import type * as Prisma from "./internal/prismaNamespace.ts" - +import type * as runtime from '@prisma/client/runtime/client' +import * as $Enums from './enums.ts' +import type * as Prisma from './internal/prismaNamespace.ts' export type StringFilter<$PrismaModel = never> = { equals?: string | Prisma.StringFieldRefInput<$PrismaModel> diff --git a/src/generated/prisma/enums.ts b/src/generated/prisma/enums.ts index a696c2e..84979fb 100644 --- a/src/generated/prisma/enums.ts +++ b/src/generated/prisma/enums.ts @@ -1,15 +1,12 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* -* This file exports all enum related types from the schema. -* -* 🟢 You can import this file directly. -*/ - - + * This file exports all enum related types from the schema. + * + * 🟢 You can import this file directly. + */ // This file is empty because there are no enums in the schema. export {} diff --git a/src/generated/prisma/internal/class.ts b/src/generated/prisma/internal/class.ts index 94f0788..c9dcbd6 100644 --- a/src/generated/prisma/internal/class.ts +++ b/src/generated/prisma/internal/class.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -11,26 +10,26 @@ * Please import the `PrismaClient` class from the `client.ts` file instead. */ -import * as runtime from "@prisma/client/runtime/client" -import type * as Prisma from "./prismaNamespace.ts" - +import * as runtime from '@prisma/client/runtime/client' +import type * as Prisma from './prismaNamespace.ts' const config: runtime.GetPrismaClientConfig = { - "previewFeatures": [ - "driverAdapters" - ], - "clientVersion": "7.3.0", - "engineVersion": "9d6ad21cbbceab97458517b147a6a09ff43aa735", - "activeProvider": "sqlite", - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../src/generated/prisma\"\n previewFeatures = [\"driverAdapters\"]\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nmodel Asset {\n id String @id\n name String\n type String\n path String\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n characters Character[]\n equipments Equipment[]\n generations Generation[]\n\n @@map(\"assets\")\n}\n\nmodel Character {\n id String @id\n name String\n description String?\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n generations Generation[]\n\n @@map(\"characters\")\n}\n\nmodel Category {\n id String @id\n name String\n parentId String? @map(\"parent_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n parent Category? @relation(\"CategoryToSubCategory\", fields: [parentId], references: [id])\n subCategories Category[] @relation(\"CategoryToSubCategory\")\n equipmentsAsMain Equipment[] @relation(\"CategoryMain\")\n equipmentsAsSub Equipment[] @relation(\"CategorySub\")\n\n @@map(\"categories\")\n}\n\nmodel Equipment {\n id String @id\n name String\n description String\n categoryId String @map(\"category_id\")\n subCategoryId String? @map(\"sub_category_id\")\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n category Category @relation(\"CategoryMain\", fields: [categoryId], references: [id])\n subCategory Category? @relation(\"CategorySub\", fields: [subCategoryId], references: [id])\n image Asset @relation(fields: [imageId], references: [id])\n generations GenerationEquipment[]\n\n @@map(\"equipments\")\n}\n\nmodel Generation {\n id String @id\n characterId String @map(\"character_id\")\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n character Character @relation(fields: [characterId], references: [id])\n image Asset @relation(fields: [imageId], references: [id])\n equipments GenerationEquipment[]\n\n @@map(\"generations\")\n}\n\nmodel GenerationEquipment {\n generationId String @map(\"generation_id\")\n equipmentId String @map(\"equipment_id\")\n\n generation Generation @relation(fields: [generationId], references: [id])\n equipment Equipment @relation(fields: [equipmentId], references: [id])\n\n @@id([generationId, equipmentId])\n @@map(\"generation_equipments\")\n}\n", - "runtimeDataModel": { - "models": {}, - "enums": {}, - "types": {} - } + previewFeatures: ['driverAdapters'], + clientVersion: '7.3.0', + engineVersion: '9d6ad21cbbceab97458517b147a6a09ff43aa735', + activeProvider: 'sqlite', + inlineSchema: + '// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = "prisma-client"\n output = "../src/generated/prisma"\n previewFeatures = ["driverAdapters"]\n}\n\ndatasource db {\n provider = "sqlite"\n}\n\nmodel Asset {\n id String @id\n name String\n type String\n path String\n createdAt DateTime @default(now()) @map("created_at")\n updatedAt DateTime @updatedAt @map("updated_at")\n\n // Relations\n characters Character[]\n equipments Equipment[]\n generations Generation[]\n\n @@map("assets")\n}\n\nmodel Character {\n id String @id\n name String\n description String?\n imageId String @map("image_id")\n createdAt DateTime @default(now()) @map("created_at")\n updatedAt DateTime @updatedAt @map("updated_at")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n generations Generation[]\n\n @@map("characters")\n}\n\nmodel Category {\n id String @id\n name String\n parentId String? @map("parent_id")\n createdAt DateTime @default(now()) @map("created_at")\n updatedAt DateTime @updatedAt @map("updated_at")\n\n // Relations\n parent Category? @relation("CategoryToSubCategory", fields: [parentId], references: [id])\n subCategories Category[] @relation("CategoryToSubCategory")\n equipmentsAsMain Equipment[] @relation("CategoryMain")\n equipmentsAsSub Equipment[] @relation("CategorySub")\n\n @@map("categories")\n}\n\nmodel Equipment {\n id String @id\n name String\n description String\n categoryId String @map("category_id")\n subCategoryId String? @map("sub_category_id")\n imageId String @map("image_id")\n createdAt DateTime @default(now()) @map("created_at")\n updatedAt DateTime @updatedAt @map("updated_at")\n\n // Relations\n category Category @relation("CategoryMain", fields: [categoryId], references: [id])\n subCategory Category? @relation("CategorySub", fields: [subCategoryId], references: [id])\n image Asset @relation(fields: [imageId], references: [id])\n generations GenerationEquipment[]\n\n @@map("equipments")\n}\n\nmodel Generation {\n id String @id\n characterId String @map("character_id")\n imageId String @map("image_id")\n createdAt DateTime @default(now()) @map("created_at")\n updatedAt DateTime @updatedAt @map("updated_at")\n\n // Relations\n character Character @relation(fields: [characterId], references: [id])\n image Asset @relation(fields: [imageId], references: [id])\n equipments GenerationEquipment[]\n\n @@map("generations")\n}\n\nmodel GenerationEquipment {\n generationId String @map("generation_id")\n equipmentId String @map("equipment_id")\n\n generation Generation @relation(fields: [generationId], references: [id])\n equipment Equipment @relation(fields: [equipmentId], references: [id])\n\n @@id([generationId, equipmentId])\n @@map("generation_equipments")\n}\n', + runtimeDataModel: { + models: {}, + enums: {}, + types: {}, + }, } -config.runtimeDataModel = JSON.parse("{\"models\":{\"Asset\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"path\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"characters\",\"kind\":\"object\",\"type\":\"Character\",\"relationName\":\"AssetToCharacter\"},{\"name\":\"equipments\",\"kind\":\"object\",\"type\":\"Equipment\",\"relationName\":\"AssetToEquipment\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"AssetToGeneration\"}],\"dbName\":\"assets\"},\"Character\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToCharacter\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"CharacterToGeneration\"}],\"dbName\":\"characters\"},\"Category\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parentId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"parent_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"parent\",\"kind\":\"object\",\"type\":\"Category\",\"relationName\":\"CategoryToSubCategory\"},{\"name\":\"subCategories\",\"kind\":\"object\",\"type\":\"Category\",\"relationName\":\"CategoryToSubCategory\"},{\"name\":\"equipmentsAsMain\",\"kind\":\"object\",\"type\":\"Equipment\",\"relationName\":\"CategoryMain\"},{\"name\":\"equipmentsAsSub\",\"kind\":\"object\",\"type\":\"Equipment\",\"relationName\":\"CategorySub\"}],\"dbName\":\"categories\"},\"Equipment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"category_id\"},{\"name\":\"subCategoryId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"sub_category_id\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"category\",\"kind\":\"object\",\"type\":\"Category\",\"relationName\":\"CategoryMain\"},{\"name\":\"subCategory\",\"kind\":\"object\",\"type\":\"Category\",\"relationName\":\"CategorySub\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToEquipment\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"GenerationEquipment\",\"relationName\":\"EquipmentToGenerationEquipment\"}],\"dbName\":\"equipments\"},\"Generation\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"characterId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"character_id\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"character\",\"kind\":\"object\",\"type\":\"Character\",\"relationName\":\"CharacterToGeneration\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToGeneration\"},{\"name\":\"equipments\",\"kind\":\"object\",\"type\":\"GenerationEquipment\",\"relationName\":\"GenerationToGenerationEquipment\"}],\"dbName\":\"generations\"},\"GenerationEquipment\":{\"fields\":[{\"name\":\"generationId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"generation_id\"},{\"name\":\"equipmentId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"equipment_id\"},{\"name\":\"generation\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"GenerationToGenerationEquipment\"},{\"name\":\"equipment\",\"kind\":\"object\",\"type\":\"Equipment\",\"relationName\":\"EquipmentToGenerationEquipment\"}],\"dbName\":\"generation_equipments\"}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse( + '{"models":{"Asset":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"type","kind":"scalar","type":"String"},{"name":"path","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime","dbName":"created_at"},{"name":"updatedAt","kind":"scalar","type":"DateTime","dbName":"updated_at"},{"name":"characters","kind":"object","type":"Character","relationName":"AssetToCharacter"},{"name":"equipments","kind":"object","type":"Equipment","relationName":"AssetToEquipment"},{"name":"generations","kind":"object","type":"Generation","relationName":"AssetToGeneration"}],"dbName":"assets"},"Character":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"imageId","kind":"scalar","type":"String","dbName":"image_id"},{"name":"createdAt","kind":"scalar","type":"DateTime","dbName":"created_at"},{"name":"updatedAt","kind":"scalar","type":"DateTime","dbName":"updated_at"},{"name":"image","kind":"object","type":"Asset","relationName":"AssetToCharacter"},{"name":"generations","kind":"object","type":"Generation","relationName":"CharacterToGeneration"}],"dbName":"characters"},"Category":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"parentId","kind":"scalar","type":"String","dbName":"parent_id"},{"name":"createdAt","kind":"scalar","type":"DateTime","dbName":"created_at"},{"name":"updatedAt","kind":"scalar","type":"DateTime","dbName":"updated_at"},{"name":"parent","kind":"object","type":"Category","relationName":"CategoryToSubCategory"},{"name":"subCategories","kind":"object","type":"Category","relationName":"CategoryToSubCategory"},{"name":"equipmentsAsMain","kind":"object","type":"Equipment","relationName":"CategoryMain"},{"name":"equipmentsAsSub","kind":"object","type":"Equipment","relationName":"CategorySub"}],"dbName":"categories"},"Equipment":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"categoryId","kind":"scalar","type":"String","dbName":"category_id"},{"name":"subCategoryId","kind":"scalar","type":"String","dbName":"sub_category_id"},{"name":"imageId","kind":"scalar","type":"String","dbName":"image_id"},{"name":"createdAt","kind":"scalar","type":"DateTime","dbName":"created_at"},{"name":"updatedAt","kind":"scalar","type":"DateTime","dbName":"updated_at"},{"name":"category","kind":"object","type":"Category","relationName":"CategoryMain"},{"name":"subCategory","kind":"object","type":"Category","relationName":"CategorySub"},{"name":"image","kind":"object","type":"Asset","relationName":"AssetToEquipment"},{"name":"generations","kind":"object","type":"GenerationEquipment","relationName":"EquipmentToGenerationEquipment"}],"dbName":"equipments"},"Generation":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"characterId","kind":"scalar","type":"String","dbName":"character_id"},{"name":"imageId","kind":"scalar","type":"String","dbName":"image_id"},{"name":"createdAt","kind":"scalar","type":"DateTime","dbName":"created_at"},{"name":"updatedAt","kind":"scalar","type":"DateTime","dbName":"updated_at"},{"name":"character","kind":"object","type":"Character","relationName":"CharacterToGeneration"},{"name":"image","kind":"object","type":"Asset","relationName":"AssetToGeneration"},{"name":"equipments","kind":"object","type":"GenerationEquipment","relationName":"GenerationToGenerationEquipment"}],"dbName":"generations"},"GenerationEquipment":{"fields":[{"name":"generationId","kind":"scalar","type":"String","dbName":"generation_id"},{"name":"equipmentId","kind":"scalar","type":"String","dbName":"equipment_id"},{"name":"generation","kind":"object","type":"Generation","relationName":"GenerationToGenerationEquipment"},{"name":"equipment","kind":"object","type":"Equipment","relationName":"EquipmentToGenerationEquipment"}],"dbName":"generation_equipments"}},"enums":{},"types":{}}', +) async function decodeBase64AsWasm(wasmBase64: string): Promise { const { Buffer } = await import('node:buffer') @@ -39,23 +38,26 @@ async function decodeBase64AsWasm(wasmBase64: string): Promise await import("@prisma/client/runtime/query_compiler_fast_bg.sqlite.mjs"), + getRuntime: async () => await import('@prisma/client/runtime/query_compiler_fast_bg.sqlite.mjs'), getQueryCompilerWasmModule: async () => { - const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.sqlite.wasm-base64.mjs") + const { wasm } = + await import('@prisma/client/runtime/query_compiler_fast_bg.sqlite.wasm-base64.mjs') return await decodeBase64AsWasm(wasm) }, - importName: "./query_compiler_fast_bg.js" + importName: './query_compiler_fast_bg.js', } - - export type LogOptions = - 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never + 'log' extends keyof ClientOptions + ? ClientOptions['log'] extends Array + ? Prisma.GetEvents + : never + : never export interface PrismaClientConstructor { - /** + /** * ## Prisma Client * * Type-safe database client for TypeScript @@ -72,9 +74,13 @@ export interface PrismaClientConstructor { new < Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, LogOpts extends LogOptions = LogOptions, - OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'], - ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs - >(options: Prisma.Subset ): PrismaClient + OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } + ? U + : Prisma.PrismaClientOptions['omit'], + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + >( + options: Prisma.Subset, + ): PrismaClient } /** @@ -94,23 +100,27 @@ export interface PrismaClientConstructor { export interface PrismaClient< in LogOpts extends Prisma.LogLevel = never, in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined, - in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs + in out ExtArgs extends runtime.Types.Extensions.InternalArgs = + runtime.Types.Extensions.DefaultArgs, > { [K: symbol]: { types: Prisma.TypeMap['other'] } - $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; + $on( + eventType: V, + callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void, + ): PrismaClient /** * Connect with the database */ - $connect(): runtime.Types.Utils.JsPromise; + $connect(): runtime.Types.Utils.JsPromise /** * Disconnect from the database */ - $disconnect(): runtime.Types.Utils.JsPromise; + $disconnect(): runtime.Types.Utils.JsPromise -/** + /** * Executes a prepared raw query and returns the number of affected rows. * @example * ``` @@ -119,7 +129,10 @@ export interface PrismaClient< * * Read more in our [docs](https://pris.ly/d/raw-queries). */ - $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + $executeRaw( + query: TemplateStringsArray | Prisma.Sql, + ...values: any[] + ): Prisma.PrismaPromise /** * Executes a raw query and returns the number of affected rows. @@ -131,7 +144,7 @@ export interface PrismaClient< * * Read more in our [docs](https://pris.ly/d/raw-queries). */ - $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise /** * Performs a prepared raw query and returns the `SELECT` data. @@ -142,7 +155,10 @@ export interface PrismaClient< * * Read more in our [docs](https://pris.ly/d/raw-queries). */ - $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + $queryRaw( + query: TemplateStringsArray | Prisma.Sql, + ...values: any[] + ): Prisma.PrismaPromise /** * Performs a raw query and returns the `SELECT` data. @@ -154,8 +170,7 @@ export interface PrismaClient< * * Read more in our [docs](https://pris.ly/d/raw-queries). */ - $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - + $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. @@ -170,73 +185,91 @@ export interface PrismaClient< * * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). */ - $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise> + $transaction

[]>( + arg: [...P], + options?: { isolationLevel?: Prisma.TransactionIsolationLevel }, + ): runtime.Types.Utils.JsPromise> - $transaction(fn: (prisma: Omit) => runtime.Types.Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise + $transaction( + fn: (prisma: Omit) => runtime.Types.Utils.JsPromise, + options?: { + maxWait?: number + timeout?: number + isolationLevel?: Prisma.TransactionIsolationLevel + }, + ): runtime.Types.Utils.JsPromise - $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, runtime.Types.Utils.Call, { - extArgs: ExtArgs - }>> + $extends: runtime.Types.Extensions.ExtendsHook< + 'extends', + Prisma.TypeMapCb, + ExtArgs, + runtime.Types.Utils.Call< + Prisma.TypeMapCb, + { + extArgs: ExtArgs + } + > + > - /** + /** * `prisma.asset`: Exposes CRUD operations for the **Asset** model. - * Example usage: - * ```ts - * // Fetch zero or more Assets - * const assets = await prisma.asset.findMany() - * ``` - */ - get asset(): Prisma.AssetDelegate; + * Example usage: + * ```ts + * // Fetch zero or more Assets + * const assets = await prisma.asset.findMany() + * ``` + */ + get asset(): Prisma.AssetDelegate /** * `prisma.character`: Exposes CRUD operations for the **Character** model. - * Example usage: - * ```ts - * // Fetch zero or more Characters - * const characters = await prisma.character.findMany() - * ``` - */ - get character(): Prisma.CharacterDelegate; + * Example usage: + * ```ts + * // Fetch zero or more Characters + * const characters = await prisma.character.findMany() + * ``` + */ + get character(): Prisma.CharacterDelegate /** * `prisma.category`: Exposes CRUD operations for the **Category** model. - * Example usage: - * ```ts - * // Fetch zero or more Categories - * const categories = await prisma.category.findMany() - * ``` - */ - get category(): Prisma.CategoryDelegate; + * Example usage: + * ```ts + * // Fetch zero or more Categories + * const categories = await prisma.category.findMany() + * ``` + */ + get category(): Prisma.CategoryDelegate /** * `prisma.equipment`: Exposes CRUD operations for the **Equipment** model. - * Example usage: - * ```ts - * // Fetch zero or more Equipment - * const equipment = await prisma.equipment.findMany() - * ``` - */ - get equipment(): Prisma.EquipmentDelegate; + * Example usage: + * ```ts + * // Fetch zero or more Equipment + * const equipment = await prisma.equipment.findMany() + * ``` + */ + get equipment(): Prisma.EquipmentDelegate /** * `prisma.generation`: Exposes CRUD operations for the **Generation** model. - * Example usage: - * ```ts - * // Fetch zero or more Generations - * const generations = await prisma.generation.findMany() - * ``` - */ - get generation(): Prisma.GenerationDelegate; + * Example usage: + * ```ts + * // Fetch zero or more Generations + * const generations = await prisma.generation.findMany() + * ``` + */ + get generation(): Prisma.GenerationDelegate /** * `prisma.generationEquipment`: Exposes CRUD operations for the **GenerationEquipment** model. - * Example usage: - * ```ts - * // Fetch zero or more GenerationEquipments - * const generationEquipments = await prisma.generationEquipment.findMany() - * ``` - */ - get generationEquipment(): Prisma.GenerationEquipmentDelegate; + * Example usage: + * ```ts + * // Fetch zero or more GenerationEquipments + * const generationEquipments = await prisma.generationEquipment.findMany() + * ``` + */ + get generationEquipment(): Prisma.GenerationEquipmentDelegate } export function getPrismaClientClass(): PrismaClientConstructor { diff --git a/src/generated/prisma/internal/prismaNamespace.ts b/src/generated/prisma/internal/prismaNamespace.ts index 39d09f1..d1693d4 100644 --- a/src/generated/prisma/internal/prismaNamespace.ts +++ b/src/generated/prisma/internal/prismaNamespace.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -15,9 +14,9 @@ * model files in the `model` directory! */ -import * as runtime from "@prisma/client/runtime/client" -import type * as Prisma from "../models.ts" -import { type PrismaClient } from "./class.ts" +import * as runtime from '@prisma/client/runtime/client' +import type * as Prisma from '../models.ts' +import { type PrismaClient } from './class.ts' export type * from '../models.ts' @@ -54,8 +53,6 @@ export const raw = runtime.raw export const Sql = runtime.Sql export type Sql = runtime.Sql - - /** * Decimal.js */ @@ -65,8 +62,8 @@ export type Decimal = runtime.Decimal export type DecimalJsLike = runtime.DecimalJsLike /** -* Extensions -*/ + * Extensions + */ export type Extension = runtime.Types.Extensions.UserArgs export const getExtensionContext = runtime.Extensions.getExtensionContext export type Args = runtime.Types.Public.Args @@ -84,8 +81,8 @@ export type PrismaVersion = { * Query Engine version: 9d6ad21cbbceab97458517b147a6a09ff43aa735 */ export const prismaVersion: PrismaVersion = { - client: "7.3.0", - engine: "9d6ad21cbbceab97458517b147a6a09ff43aa735" + client: '7.3.0', + engine: '9d6ad21cbbceab97458517b147a6a09ff43aa735', } /** @@ -100,11 +97,10 @@ export type InputJsonObject = runtime.InputJsonObject export type InputJsonArray = runtime.InputJsonArray export type InputJsonValue = runtime.InputJsonValue - export const NullTypes = { - DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), - JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), - AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), + DbNull: runtime.NullTypes.DbNull as new (secret: never) => typeof runtime.DbNull, + JsonNull: runtime.NullTypes.JsonNull as new (secret: never) => typeof runtime.JsonNull, + AnyNull: runtime.NullTypes.AnyNull as new (secret: never) => typeof runtime.AnyNull, } /** * Helper for filtering JSON entries that have `null` on the database (empty on the db) @@ -127,7 +123,6 @@ export const JsonNull = runtime.JsonNull */ export const AnyNull = runtime.AnyNull - type SelectAndInclude = { select: any include: any @@ -142,18 +137,18 @@ type SelectAndOmit = { * From T, pick a set of properties whose keys are in the union K */ type Prisma__Pick = { - [P in K]: T[P]; -}; + [P in K]: T[P] +} -export type Enumerable = T | Array; +export type Enumerable = T | Array /** * Subset * @desc From `T` pick properties that exist in `U`. Simple version of Intersection */ export type Subset = { - [key in keyof T]: key extends keyof U ? T[key] : never; -}; + [key in keyof T]: key extends keyof U ? T[key] : never +} /** * SelectSubset @@ -162,12 +157,11 @@ export type Subset = { */ 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`.' - : {}) +} & (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) /** * Subset + Intersection @@ -175,37 +169,35 @@ export type SelectSubset = { */ export type SubsetIntersection = { [key in keyof T]: key extends keyof U ? T[key] : never -} & - K +} & K -type Without = { [P in Exclude]?: never }; +type Without = { [P in Exclude]?: never } /** * XOR is needed to have a real mutually exclusive union type * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types */ -export type XOR = - T extends object ? - U extends object ? - (Without & U) | (Without & T) - : U : T - +export type XOR = T extends object + ? U extends object + ? (Without & U) | (Without & T) + : U + : T /** * Is T a Record? */ -type IsObject = T extends Array -? False -: T extends Date -? False -: T extends Uint8Array -? False -: T extends BigInt -? False -: T extends object -? True -: False - +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 @@ -226,20 +218,14 @@ type EitherStrict = Strict<__Either> type EitherLoose = ComputeRaw<__Either> -type _Either< - O extends object, - K extends Key, - strict extends Boolean -> = { +type _Either = { 1: EitherStrict 0: EitherLoose }[strict] -export type Either< - O extends object, - K extends Key, - strict extends Boolean = 1 -> = O extends unknown ? _Either : never +export type Either = O extends unknown + ? _Either + : never export type Union = any @@ -248,56 +234,67 @@ export type PatchUndefined = { } & {} /** Helper Types for "Merge" **/ -export type IntersectOf = ( - U extends unknown ? (k: U) => void : never -) extends (k: infer I) => void +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]; -} & {}; + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K] +} & {} -type _Merge = IntersectOf; -}>>; +type _Merge = IntersectOf< + Overwrite< + U, + { + [K in keyof U]-?: At + } + > +> -type Key = string | number | symbol; -type AtStrict = O[K & keyof O]; -type AtLoose = O extends unknown ? AtStrict : never; +type Key = string | number | symbol +type AtStrict = O[K & keyof O] +type AtLoose = O extends unknown ? AtStrict : never export type At = { - 1: AtStrict; - 0: AtLoose; -}[strict]; + 1: AtStrict + 0: AtLoose +}[strict] -export type ComputeRaw = A extends Function ? A : { - [K in keyof A]: A[K]; -} & {}; +export type ComputeRaw = A extends Function + ? A + : { + [K in keyof A]: A[K] + } & {} export type OptionalFlat = { - [K in keyof O]?: O[K]; -} & {}; + [K in keyof O]?: O[K] +} & {} type _Record = { - [P in K]: T; -}; + [P in K]: T +} // cause typescript not to expand types and preserve names -type NoExpand = T extends unknown ? T : never; +type NoExpand = T extends unknown ? T : never // this type assumes the passed object is entirely optional export type AtLeast = NoExpand< O extends unknown - ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) - | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O - : never>; + ? + | (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; +type _Strict = U extends unknown + ? U & OptionalFlat<_Record, keyof U>, never>> + : never -export type Strict = ComputeRaw<_Strict>; +export type Strict = ComputeRaw<_Strict> /** End Helper Types for "Merge" **/ -export type Merge = ComputeRaw<_Merge>>; +export type Merge = ComputeRaw<_Merge>> export type Boolean = True | False @@ -313,12 +310,10 @@ export type Not = { export type Extends = [A1] extends [never] ? 0 // anything `never` is false : A1 extends A2 - ? 1 - : 0 + ? 1 + : 0 -export type Has = Not< - Extends, U1> -> +export type Has = Not, U1>> export type Or = { 0: { @@ -333,22 +328,17 @@ export type Or = { export type Keys = U extends unknown ? keyof U : never -export type GetScalarType = O extends object ? { - [P in keyof T]: P extends keyof O - ? O[P] - : never -} : never +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 FieldPaths> = + IsObject extends True ? U : T export type GetHavingFields = { - [K in keyof T]: Or< - Or, Extends<'AND', K>>, - Extends<'NOT', K> - > extends True + [K in keyof T]: 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 @@ -356,8 +346,8 @@ export type GetHavingFields = { ? GetHavingFields extends object ? Merge> : never> : never : {} extends FieldPaths - ? never - : K + ? never + : K }[keyof T] /** @@ -370,42 +360,53 @@ export type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T /** * Like `Pick`, but additionally can also accept an array of keys */ -export type PickEnumerable | keyof T> = Prisma__Pick> +export type PickEnumerable | keyof T> = Prisma__Pick< + T, + MaybeTupleToUnion +> /** * Exclude all keys with underscores */ export type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T - export type FieldRef = runtime.FieldRef type FieldRefInputType = Model extends never ? never : FieldRef - export const ModelName = { Asset: 'Asset', Character: 'Character', Category: 'Category', Equipment: 'Equipment', Generation: 'Generation', - GenerationEquipment: 'GenerationEquipment' + GenerationEquipment: 'GenerationEquipment', } as const export type ModelName = (typeof ModelName)[keyof typeof ModelName] - - -export interface TypeMapCb extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record> { +export interface TypeMapCb extends runtime.Types.Utils.Fn< + { extArgs: runtime.Types.Extensions.InternalArgs }, + runtime.Types.Utils.Record +> { returns: TypeMap } -export type TypeMap = { +export type TypeMap< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> = { globalOmitOptions: { omit: GlobalOmitOptions } meta: { - modelProps: "asset" | "character" | "category" | "equipment" | "generation" | "generationEquipment" + modelProps: + | 'asset' + | 'character' + | 'category' + | 'equipment' + | 'generation' + | 'generationEquipment' txIsolationLevel: TransactionIsolationLevel } model: { @@ -849,7 +850,9 @@ export type TypeMap - result: runtime.Types.Utils.Optional | number + result: + | runtime.Types.Utils.Optional + | number } } } @@ -859,19 +862,19 @@ export type TypeMap = FieldRefInputType<$PrismaModel, 'String'> - - /** * Reference to a field of type 'DateTime' */ export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> - - /** * Reference to a field of type 'Int' */ export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> - /** * Batch Payload for updateMany & deleteMany & createMany */ @@ -1006,22 +999,30 @@ export type BatchPayload = { count: number } -export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs> +export const defineExtension = runtime.Extensions + .defineExtension as unknown as runtime.Types.Extensions.ExtendsHook< + 'define', + TypeMapCb, + runtime.Types.Extensions.DefaultArgs +> export type DefaultPrismaClient = PrismaClient export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' -export type PrismaClientOptions = ({ - /** - * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`. - */ - adapter: runtime.SqlDriverAdapterFactory - accelerateUrl?: never -} | { - /** - * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database. - */ - accelerateUrl: string - adapter?: never -}) & { +export type PrismaClientOptions = ( + | { + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`. + */ + adapter: runtime.SqlDriverAdapterFactory + accelerateUrl?: never + } + | { + /** + * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database. + */ + accelerateUrl: string + adapter?: never + } +) & { /** * @default "colorless" */ @@ -1109,15 +1110,12 @@ export type LogDefinition = { emit: 'stdout' | 'event' } -export type CheckIsLogLevel = T extends LogLevel ? T : never; +export type CheckIsLogLevel = T extends LogLevel ? T : never -export type GetLogType = CheckIsLogLevel< - T extends LogDefinition ? T['level'] : T ->; +export type GetLogType = CheckIsLogLevel -export type GetEvents = T extends Array - ? GetLogType - : never; +export type GetEvents = + T extends Array ? GetLogType : never export type QueryEvent = { timestamp: Date @@ -1134,7 +1132,6 @@ export type LogEvent = { } /* End Types for Logging */ - export type PrismaAction = | 'findUnique' | 'findUniqueOrThrow' diff --git a/src/generated/prisma/internal/prismaNamespaceBrowser.ts b/src/generated/prisma/internal/prismaNamespaceBrowser.ts index 0f5e89b..52bf7fd 100644 --- a/src/generated/prisma/internal/prismaNamespaceBrowser.ts +++ b/src/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -15,18 +14,17 @@ * model files in the `model` directory! */ -import * as runtime from "@prisma/client/runtime/index-browser" +import * as runtime from '@prisma/client/runtime/index-browser' export type * from '../models.ts' export type * from './prismaNamespace.ts' export const Decimal = runtime.Decimal - export const NullTypes = { - DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), - JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), - AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), + DbNull: runtime.NullTypes.DbNull as new (secret: never) => typeof runtime.DbNull, + JsonNull: runtime.NullTypes.JsonNull as new (secret: never) => typeof runtime.JsonNull, + AnyNull: runtime.NullTypes.AnyNull as new (secret: never) => typeof runtime.AnyNull, } /** * Helper for filtering JSON entries that have `null` on the database (empty on the db) @@ -49,14 +47,13 @@ export const JsonNull = runtime.JsonNull */ export const AnyNull = runtime.AnyNull - export const ModelName = { Asset: 'Asset', Character: 'Character', Category: 'Category', Equipment: 'Equipment', Generation: 'Generation', - GenerationEquipment: 'GenerationEquipment' + GenerationEquipment: 'GenerationEquipment', } as const export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -66,11 +63,11 @@ export type ModelName = (typeof ModelName)[keyof typeof ModelName] */ export const TransactionIsolationLevel = runtime.makeStrictEnum({ - Serializable: 'Serializable' + Serializable: 'Serializable', } as const) -export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - +export type TransactionIsolationLevel = + (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] export const AssetScalarFieldEnum = { id: 'id', @@ -78,34 +75,33 @@ export const AssetScalarFieldEnum = { type: 'type', path: 'path', createdAt: 'createdAt', - updatedAt: 'updatedAt' + updatedAt: 'updatedAt', } as const export type AssetScalarFieldEnum = (typeof AssetScalarFieldEnum)[keyof typeof AssetScalarFieldEnum] - export const CharacterScalarFieldEnum = { id: 'id', name: 'name', description: 'description', imageId: 'imageId', createdAt: 'createdAt', - updatedAt: 'updatedAt' + updatedAt: 'updatedAt', } as const -export type CharacterScalarFieldEnum = (typeof CharacterScalarFieldEnum)[keyof typeof CharacterScalarFieldEnum] - +export type CharacterScalarFieldEnum = + (typeof CharacterScalarFieldEnum)[keyof typeof CharacterScalarFieldEnum] export const CategoryScalarFieldEnum = { id: 'id', name: 'name', parentId: 'parentId', createdAt: 'createdAt', - updatedAt: 'updatedAt' + updatedAt: 'updatedAt', } as const -export type CategoryScalarFieldEnum = (typeof CategoryScalarFieldEnum)[keyof typeof CategoryScalarFieldEnum] - +export type CategoryScalarFieldEnum = + (typeof CategoryScalarFieldEnum)[keyof typeof CategoryScalarFieldEnum] export const EquipmentScalarFieldEnum = { id: 'id', @@ -115,42 +111,41 @@ export const EquipmentScalarFieldEnum = { subCategoryId: 'subCategoryId', imageId: 'imageId', createdAt: 'createdAt', - updatedAt: 'updatedAt' + updatedAt: 'updatedAt', } as const -export type EquipmentScalarFieldEnum = (typeof EquipmentScalarFieldEnum)[keyof typeof EquipmentScalarFieldEnum] - +export type EquipmentScalarFieldEnum = + (typeof EquipmentScalarFieldEnum)[keyof typeof EquipmentScalarFieldEnum] export const GenerationScalarFieldEnum = { id: 'id', characterId: 'characterId', imageId: 'imageId', createdAt: 'createdAt', - updatedAt: 'updatedAt' + updatedAt: 'updatedAt', } as const -export type GenerationScalarFieldEnum = (typeof GenerationScalarFieldEnum)[keyof typeof GenerationScalarFieldEnum] - +export type GenerationScalarFieldEnum = + (typeof GenerationScalarFieldEnum)[keyof typeof GenerationScalarFieldEnum] export const GenerationEquipmentScalarFieldEnum = { generationId: 'generationId', - equipmentId: 'equipmentId' + equipmentId: 'equipmentId', } as const -export type GenerationEquipmentScalarFieldEnum = (typeof GenerationEquipmentScalarFieldEnum)[keyof typeof GenerationEquipmentScalarFieldEnum] - +export type GenerationEquipmentScalarFieldEnum = + (typeof GenerationEquipmentScalarFieldEnum)[keyof typeof GenerationEquipmentScalarFieldEnum] export const SortOrder = { asc: 'asc', - desc: 'desc' + desc: 'desc', } as const export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - export const NullsOrder = { first: 'first', - last: 'last' + last: 'last', } as const export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] diff --git a/src/generated/prisma/models.ts b/src/generated/prisma/models.ts index faf91be..d6daaef 100644 --- a/src/generated/prisma/models.ts +++ b/src/generated/prisma/models.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -14,4 +13,4 @@ export type * from './models/Category.ts' export type * from './models/Equipment.ts' export type * from './models/Generation.ts' export type * from './models/GenerationEquipment.ts' -export type * from './commonInputTypes.ts' \ No newline at end of file +export type * from './commonInputTypes.ts' diff --git a/src/generated/prisma/models/Asset.ts b/src/generated/prisma/models/Asset.ts index 8f5f84f..3328cce 100644 --- a/src/generated/prisma/models/Asset.ts +++ b/src/generated/prisma/models/Asset.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -8,9 +7,9 @@ * * 🟢 You can import this file directly. */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.ts" -import type * as Prisma from "../internal/prismaNamespace.ts" +import type * as runtime from '@prisma/client/runtime/client' +import type * as $Enums from '../enums.ts' +import type * as Prisma from '../internal/prismaNamespace.ts' /** * Model Asset @@ -52,7 +51,6 @@ export type AssetCountAggregateOutputType = { _all: number } - export type AssetMinAggregateInputType = { id?: true name?: true @@ -81,7 +79,9 @@ export type AssetCountAggregateInputType = { _all?: true } -export type AssetAggregateArgs = { +export type AssetAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which Asset to aggregate. */ @@ -114,34 +114,33 @@ export type AssetAggregateArgs = { - [P in keyof T & keyof AggregateAsset]: P extends '_count' | 'count' + [P in keyof T & keyof AggregateAsset]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } - - - -export type AssetGroupByArgs = { +export type AssetGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.AssetWhereInput orderBy?: Prisma.AssetOrderByWithAggregationInput | Prisma.AssetOrderByWithAggregationInput[] by: Prisma.AssetScalarFieldEnum[] | Prisma.AssetScalarFieldEnum @@ -167,29 +166,26 @@ export type AssetGroupByOutputType = { type GetAssetGroupByPayload = Prisma.PrismaPromise< Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof AssetGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType + Prisma.PickEnumerable & { + [P in keyof T & keyof AssetGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number : Prisma.GetScalarType - } - > + : Prisma.GetScalarType + } > - - +> export type AssetWhereInput = { AND?: Prisma.AssetWhereInput | Prisma.AssetWhereInput[] OR?: Prisma.AssetWhereInput[] NOT?: Prisma.AssetWhereInput | Prisma.AssetWhereInput[] - id?: Prisma.StringFilter<"Asset"> | string - name?: Prisma.StringFilter<"Asset"> | string - type?: Prisma.StringFilter<"Asset"> | string - path?: Prisma.StringFilter<"Asset"> | string - createdAt?: Prisma.DateTimeFilter<"Asset"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Asset"> | Date | string + id?: Prisma.StringFilter<'Asset'> | string + name?: Prisma.StringFilter<'Asset'> | string + type?: Prisma.StringFilter<'Asset'> | string + path?: Prisma.StringFilter<'Asset'> | string + createdAt?: Prisma.DateTimeFilter<'Asset'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Asset'> | Date | string characters?: Prisma.CharacterListRelationFilter equipments?: Prisma.EquipmentListRelationFilter generations?: Prisma.GenerationListRelationFilter @@ -207,20 +203,23 @@ export type AssetOrderByWithRelationInput = { generations?: Prisma.GenerationOrderByRelationAggregateInput } -export type AssetWhereUniqueInput = Prisma.AtLeast<{ - id?: string - AND?: Prisma.AssetWhereInput | Prisma.AssetWhereInput[] - OR?: Prisma.AssetWhereInput[] - NOT?: Prisma.AssetWhereInput | Prisma.AssetWhereInput[] - name?: Prisma.StringFilter<"Asset"> | string - type?: Prisma.StringFilter<"Asset"> | string - path?: Prisma.StringFilter<"Asset"> | string - createdAt?: Prisma.DateTimeFilter<"Asset"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Asset"> | Date | string - characters?: Prisma.CharacterListRelationFilter - equipments?: Prisma.EquipmentListRelationFilter - generations?: Prisma.GenerationListRelationFilter -}, "id"> +export type AssetWhereUniqueInput = Prisma.AtLeast< + { + id?: string + AND?: Prisma.AssetWhereInput | Prisma.AssetWhereInput[] + OR?: Prisma.AssetWhereInput[] + NOT?: Prisma.AssetWhereInput | Prisma.AssetWhereInput[] + name?: Prisma.StringFilter<'Asset'> | string + type?: Prisma.StringFilter<'Asset'> | string + path?: Prisma.StringFilter<'Asset'> | string + createdAt?: Prisma.DateTimeFilter<'Asset'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Asset'> | Date | string + characters?: Prisma.CharacterListRelationFilter + equipments?: Prisma.EquipmentListRelationFilter + generations?: Prisma.GenerationListRelationFilter + }, + 'id' +> export type AssetOrderByWithAggregationInput = { id?: Prisma.SortOrder @@ -238,12 +237,12 @@ export type AssetScalarWhereWithAggregatesInput = { AND?: Prisma.AssetScalarWhereWithAggregatesInput | Prisma.AssetScalarWhereWithAggregatesInput[] OR?: Prisma.AssetScalarWhereWithAggregatesInput[] NOT?: Prisma.AssetScalarWhereWithAggregatesInput | Prisma.AssetScalarWhereWithAggregatesInput[] - id?: Prisma.StringWithAggregatesFilter<"Asset"> | string - name?: Prisma.StringWithAggregatesFilter<"Asset"> | string - type?: Prisma.StringWithAggregatesFilter<"Asset"> | string - path?: Prisma.StringWithAggregatesFilter<"Asset"> | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Asset"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Asset"> | Date | string + id?: Prisma.StringWithAggregatesFilter<'Asset'> | string + name?: Prisma.StringWithAggregatesFilter<'Asset'> | string + type?: Prisma.StringWithAggregatesFilter<'Asset'> | string + path?: Prisma.StringWithAggregatesFilter<'Asset'> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<'Asset'> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Asset'> | Date | string } export type AssetCreateInput = { @@ -362,45 +361,81 @@ export type DateTimeFieldUpdateOperationsInput = { } export type AssetCreateNestedOneWithoutCharactersInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.AssetCreateWithoutCharactersInput, + Prisma.AssetUncheckedCreateWithoutCharactersInput + > connectOrCreate?: Prisma.AssetCreateOrConnectWithoutCharactersInput connect?: Prisma.AssetWhereUniqueInput } export type AssetUpdateOneRequiredWithoutCharactersNestedInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.AssetCreateWithoutCharactersInput, + Prisma.AssetUncheckedCreateWithoutCharactersInput + > connectOrCreate?: Prisma.AssetCreateOrConnectWithoutCharactersInput upsert?: Prisma.AssetUpsertWithoutCharactersInput connect?: Prisma.AssetWhereUniqueInput - update?: Prisma.XOR, Prisma.AssetUncheckedUpdateWithoutCharactersInput> + update?: Prisma.XOR< + Prisma.XOR< + Prisma.AssetUpdateToOneWithWhereWithoutCharactersInput, + Prisma.AssetUpdateWithoutCharactersInput + >, + Prisma.AssetUncheckedUpdateWithoutCharactersInput + > } export type AssetCreateNestedOneWithoutEquipmentsInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.AssetCreateWithoutEquipmentsInput, + Prisma.AssetUncheckedCreateWithoutEquipmentsInput + > connectOrCreate?: Prisma.AssetCreateOrConnectWithoutEquipmentsInput connect?: Prisma.AssetWhereUniqueInput } export type AssetUpdateOneRequiredWithoutEquipmentsNestedInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.AssetCreateWithoutEquipmentsInput, + Prisma.AssetUncheckedCreateWithoutEquipmentsInput + > connectOrCreate?: Prisma.AssetCreateOrConnectWithoutEquipmentsInput upsert?: Prisma.AssetUpsertWithoutEquipmentsInput connect?: Prisma.AssetWhereUniqueInput - update?: Prisma.XOR, Prisma.AssetUncheckedUpdateWithoutEquipmentsInput> + update?: Prisma.XOR< + Prisma.XOR< + Prisma.AssetUpdateToOneWithWhereWithoutEquipmentsInput, + Prisma.AssetUpdateWithoutEquipmentsInput + >, + Prisma.AssetUncheckedUpdateWithoutEquipmentsInput + > } export type AssetCreateNestedOneWithoutGenerationsInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.AssetCreateWithoutGenerationsInput, + Prisma.AssetUncheckedCreateWithoutGenerationsInput + > connectOrCreate?: Prisma.AssetCreateOrConnectWithoutGenerationsInput connect?: Prisma.AssetWhereUniqueInput } export type AssetUpdateOneRequiredWithoutGenerationsNestedInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.AssetCreateWithoutGenerationsInput, + Prisma.AssetUncheckedCreateWithoutGenerationsInput + > connectOrCreate?: Prisma.AssetCreateOrConnectWithoutGenerationsInput upsert?: Prisma.AssetUpsertWithoutGenerationsInput connect?: Prisma.AssetWhereUniqueInput - update?: Prisma.XOR, Prisma.AssetUncheckedUpdateWithoutGenerationsInput> + update?: Prisma.XOR< + Prisma.XOR< + Prisma.AssetUpdateToOneWithWhereWithoutGenerationsInput, + Prisma.AssetUpdateWithoutGenerationsInput + >, + Prisma.AssetUncheckedUpdateWithoutGenerationsInput + > } export type AssetCreateWithoutCharactersInput = { @@ -427,18 +462,30 @@ export type AssetUncheckedCreateWithoutCharactersInput = { export type AssetCreateOrConnectWithoutCharactersInput = { where: Prisma.AssetWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.AssetCreateWithoutCharactersInput, + Prisma.AssetUncheckedCreateWithoutCharactersInput + > } export type AssetUpsertWithoutCharactersInput = { - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.AssetUpdateWithoutCharactersInput, + Prisma.AssetUncheckedUpdateWithoutCharactersInput + > + create: Prisma.XOR< + Prisma.AssetCreateWithoutCharactersInput, + Prisma.AssetUncheckedCreateWithoutCharactersInput + > where?: Prisma.AssetWhereInput } export type AssetUpdateToOneWithWhereWithoutCharactersInput = { where?: Prisma.AssetWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.AssetUpdateWithoutCharactersInput, + Prisma.AssetUncheckedUpdateWithoutCharactersInput + > } export type AssetUpdateWithoutCharactersInput = { @@ -487,18 +534,30 @@ export type AssetUncheckedCreateWithoutEquipmentsInput = { export type AssetCreateOrConnectWithoutEquipmentsInput = { where: Prisma.AssetWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.AssetCreateWithoutEquipmentsInput, + Prisma.AssetUncheckedCreateWithoutEquipmentsInput + > } export type AssetUpsertWithoutEquipmentsInput = { - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.AssetUpdateWithoutEquipmentsInput, + Prisma.AssetUncheckedUpdateWithoutEquipmentsInput + > + create: Prisma.XOR< + Prisma.AssetCreateWithoutEquipmentsInput, + Prisma.AssetUncheckedCreateWithoutEquipmentsInput + > where?: Prisma.AssetWhereInput } export type AssetUpdateToOneWithWhereWithoutEquipmentsInput = { where?: Prisma.AssetWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.AssetUpdateWithoutEquipmentsInput, + Prisma.AssetUncheckedUpdateWithoutEquipmentsInput + > } export type AssetUpdateWithoutEquipmentsInput = { @@ -547,18 +606,30 @@ export type AssetUncheckedCreateWithoutGenerationsInput = { export type AssetCreateOrConnectWithoutGenerationsInput = { where: Prisma.AssetWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.AssetCreateWithoutGenerationsInput, + Prisma.AssetUncheckedCreateWithoutGenerationsInput + > } export type AssetUpsertWithoutGenerationsInput = { - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.AssetUpdateWithoutGenerationsInput, + Prisma.AssetUncheckedUpdateWithoutGenerationsInput + > + create: Prisma.XOR< + Prisma.AssetCreateWithoutGenerationsInput, + Prisma.AssetUncheckedCreateWithoutGenerationsInput + > where?: Prisma.AssetWhereInput } export type AssetUpdateToOneWithWhereWithoutGenerationsInput = { where?: Prisma.AssetWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.AssetUpdateWithoutGenerationsInput, + Prisma.AssetUncheckedUpdateWithoutGenerationsInput + > } export type AssetUpdateWithoutGenerationsInput = { @@ -583,7 +654,6 @@ export type AssetUncheckedUpdateWithoutGenerationsInput = { equipments?: Prisma.EquipmentUncheckedUpdateManyWithoutImageNestedInput } - /** * Count Type AssetCountOutputType */ @@ -594,7 +664,9 @@ export type AssetCountOutputType = { generations: number } -export type AssetCountOutputTypeSelect = { +export type AssetCountOutputTypeSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { characters?: boolean | AssetCountOutputTypeCountCharactersArgs equipments?: boolean | AssetCountOutputTypeCountEquipmentsArgs generations?: boolean | AssetCountOutputTypeCountGenerationsArgs @@ -603,7 +675,9 @@ export type AssetCountOutputTypeSelect = { +export type AssetCountOutputTypeDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the AssetCountOutputType */ @@ -613,55 +687,75 @@ export type AssetCountOutputTypeDefaultArgs = { +export type AssetCountOutputTypeCountCharactersArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.CharacterWhereInput } /** * AssetCountOutputType without action */ -export type AssetCountOutputTypeCountEquipmentsArgs = { +export type AssetCountOutputTypeCountEquipmentsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.EquipmentWhereInput } /** * AssetCountOutputType without action */ -export type AssetCountOutputTypeCountGenerationsArgs = { +export type AssetCountOutputTypeCountGenerationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.GenerationWhereInput } +export type AssetSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + type?: boolean + path?: boolean + createdAt?: boolean + updatedAt?: boolean + characters?: boolean | Prisma.Asset$charactersArgs + equipments?: boolean | Prisma.Asset$equipmentsArgs + generations?: boolean | Prisma.Asset$generationsArgs + _count?: boolean | Prisma.AssetCountOutputTypeDefaultArgs + }, + ExtArgs['result']['asset'] +> -export type AssetSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - type?: boolean - path?: boolean - createdAt?: boolean - updatedAt?: boolean - characters?: boolean | Prisma.Asset$charactersArgs - equipments?: boolean | Prisma.Asset$equipmentsArgs - generations?: boolean | Prisma.Asset$generationsArgs - _count?: boolean | Prisma.AssetCountOutputTypeDefaultArgs -}, ExtArgs["result"]["asset"]> +export type AssetSelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + type?: boolean + path?: boolean + createdAt?: boolean + updatedAt?: boolean + }, + ExtArgs['result']['asset'] +> -export type AssetSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - type?: boolean - path?: boolean - createdAt?: boolean - updatedAt?: boolean -}, ExtArgs["result"]["asset"]> - -export type AssetSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - type?: boolean - path?: boolean - createdAt?: boolean - updatedAt?: boolean -}, ExtArgs["result"]["asset"]> +export type AssetSelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + type?: boolean + path?: boolean + createdAt?: boolean + updatedAt?: boolean + }, + ExtArgs['result']['asset'] +> export type AssetSelectScalar = { id?: boolean @@ -672,43 +766,64 @@ export type AssetSelectScalar = { updatedAt?: boolean } -export type AssetOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "type" | "path" | "createdAt" | "updatedAt", ExtArgs["result"]["asset"]> -export type AssetInclude = { +export type AssetOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + 'id' | 'name' | 'type' | 'path' | 'createdAt' | 'updatedAt', + ExtArgs['result']['asset'] +> +export type AssetInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { characters?: boolean | Prisma.Asset$charactersArgs equipments?: boolean | Prisma.Asset$equipmentsArgs generations?: boolean | Prisma.Asset$generationsArgs _count?: boolean | Prisma.AssetCountOutputTypeDefaultArgs } -export type AssetIncludeCreateManyAndReturn = {} -export type AssetIncludeUpdateManyAndReturn = {} +export type AssetIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = {} +export type AssetIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = {} -export type $AssetPayload = { - name: "Asset" +export type $AssetPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'Asset' objects: { characters: Prisma.$CharacterPayload[] equipments: Prisma.$EquipmentPayload[] generations: Prisma.$GenerationPayload[] } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: string - name: string - type: string - path: string - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["asset"]> + scalars: runtime.Types.Extensions.GetPayloadResult< + { + id: string + name: string + type: string + path: string + createdAt: Date + updatedAt: Date + }, + ExtArgs['result']['asset'] + > composites: {} } -export type AssetGetPayload = runtime.Types.Result.GetResult +export type AssetGetPayload = + runtime.Types.Result.GetResult -export type AssetCountArgs = - Omit & { - select?: AssetCountAggregateInputType | true - } +export type AssetCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: AssetCountAggregateInputType | true +} -export interface AssetDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Asset'], meta: { name: 'Asset' } } +export interface AssetDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { types: Prisma.TypeMap['model']['Asset']; meta: { name: 'Asset' } } /** * Find zero or one Asset that matches the filter. * @param {AssetFindUniqueArgs} args - Arguments to find a Asset @@ -720,7 +835,19 @@ export interface AssetDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__AssetClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find one Asset that matches the filter or throw an error with `error.code='P2025'` @@ -734,7 +861,19 @@ export interface AssetDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__AssetClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find the first Asset that matches the filter. @@ -749,7 +888,19 @@ export interface AssetDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__AssetClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find the first Asset that matches the filter or @@ -765,7 +916,19 @@ export interface AssetDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__AssetClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find zero or more Assets that matches the filter. @@ -783,7 +946,11 @@ export interface AssetDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult, T, 'findMany', GlobalOmitOptions> + > /** * Create a Asset. @@ -797,7 +964,14 @@ export interface AssetDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__AssetClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult, T, 'create', GlobalOmitOptions>, + never, + ExtArgs, + GlobalOmitOptions + > /** * Create many Assets. @@ -811,7 +985,9 @@ export interface AssetDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Create many Assets and returns the data saved in the database. @@ -835,7 +1011,16 @@ export interface AssetDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + createManyAndReturn( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > /** * Delete a Asset. @@ -849,7 +1034,14 @@ export interface AssetDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__AssetClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult, T, 'delete', GlobalOmitOptions>, + never, + ExtArgs, + GlobalOmitOptions + > /** * Update one Asset. @@ -866,7 +1058,14 @@ export interface AssetDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__AssetClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult, T, 'update', GlobalOmitOptions>, + never, + ExtArgs, + GlobalOmitOptions + > /** * Delete zero or more Assets. @@ -880,7 +1079,9 @@ export interface AssetDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more Assets. @@ -899,7 +1100,9 @@ export interface AssetDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more Assets and returns the data updated in the database. @@ -929,7 +1132,16 @@ export interface AssetDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + updateManyAndReturn( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > /** * Create or update one Asset. @@ -948,8 +1160,14 @@ export interface AssetDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__AssetClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult, T, 'upsert', GlobalOmitOptions>, + never, + ExtArgs, + GlobalOmitOptions + > /** * Count the number of Assets. @@ -963,7 +1181,7 @@ export interface AssetDelegate( args?: Prisma.Subset, ): Prisma.PrismaPromise< @@ -997,8 +1215,10 @@ export interface AssetDelegate(args: Prisma.Subset): Prisma.PrismaPromise> + **/ + aggregate( + args: Prisma.Subset, + ): Prisma.PrismaPromise> /** * Group by Asset. @@ -1017,7 +1237,7 @@ export interface AssetDelegate>>, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetAssetGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Asset model - */ -readonly fields: AssetFieldRefs; + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields], + >( + args: Prisma.SubsetIntersection & InputErrors, + ): {} extends InputErrors ? GetAssetGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Asset model + */ + readonly fields: AssetFieldRefs } /** @@ -1088,24 +1307,64 @@ readonly fields: AssetFieldRefs; * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ -export interface Prisma__AssetClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - characters = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - equipments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - generations = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> +export interface Prisma__AssetClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + characters = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findMany', + GlobalOmitOptions + > + | Null + > + equipments = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findMany', + GlobalOmitOptions + > + | Null + > + generations = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + 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): runtime.Types.Utils.JsPromise + then( + onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + catch( + onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. @@ -1115,27 +1374,25 @@ export interface Prisma__AssetClient void) | undefined | null): runtime.Types.Utils.JsPromise } - - - /** * Fields of the Asset model */ export interface AssetFieldRefs { - readonly id: Prisma.FieldRef<"Asset", 'String'> - readonly name: Prisma.FieldRef<"Asset", 'String'> - readonly type: Prisma.FieldRef<"Asset", 'String'> - readonly path: Prisma.FieldRef<"Asset", 'String'> - readonly createdAt: Prisma.FieldRef<"Asset", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Asset", 'DateTime'> + readonly id: Prisma.FieldRef<'Asset', 'String'> + readonly name: Prisma.FieldRef<'Asset', 'String'> + readonly type: Prisma.FieldRef<'Asset', 'String'> + readonly path: Prisma.FieldRef<'Asset', 'String'> + readonly createdAt: Prisma.FieldRef<'Asset', 'DateTime'> + readonly updatedAt: Prisma.FieldRef<'Asset', 'DateTime'> } - // Custom InputTypes /** * Asset findUnique */ -export type AssetFindUniqueArgs = { +export type AssetFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1157,7 +1414,9 @@ export type AssetFindUniqueArgs = { +export type AssetFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1179,7 +1438,9 @@ export type AssetFindUniqueOrThrowArgs = { +export type AssetFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1231,7 +1492,9 @@ export type AssetFindFirstArgs = { +export type AssetFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1283,7 +1546,9 @@ export type AssetFindFirstOrThrowArgs = { +export type AssetFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1330,7 +1595,9 @@ export type AssetFindManyArgs = { +export type AssetCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1352,7 +1619,9 @@ export type AssetCreateArgs = { +export type AssetCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to create many Assets. */ @@ -1362,7 +1631,9 @@ export type AssetCreateManyArgs = { +export type AssetCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1380,7 +1651,9 @@ export type AssetCreateManyAndReturnArgs = { +export type AssetUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1406,7 +1679,9 @@ export type AssetUpdateArgs = { +export type AssetUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to update Assets. */ @@ -1424,7 +1699,9 @@ export type AssetUpdateManyArgs = { +export type AssetUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1450,7 +1727,9 @@ export type AssetUpdateManyAndReturnArgs = { +export type AssetUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1480,7 +1759,9 @@ export type AssetUpsertArgs = { +export type AssetDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ @@ -1502,7 +1783,9 @@ export type AssetDeleteArgs = { +export type AssetDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which Assets to delete */ @@ -1516,7 +1799,9 @@ export type AssetDeleteManyArgs = { +export type Asset$charactersArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1540,7 +1825,9 @@ export type Asset$charactersArgs = { +export type Asset$equipmentsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1564,7 +1851,9 @@ export type Asset$equipmentsArgs = { +export type Asset$generationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1588,7 +1877,9 @@ export type Asset$generationsArgs = { +export type AssetDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Asset */ diff --git a/src/generated/prisma/models/Category.ts b/src/generated/prisma/models/Category.ts index a26a7c5..1a8e244 100644 --- a/src/generated/prisma/models/Category.ts +++ b/src/generated/prisma/models/Category.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -8,9 +7,9 @@ * * 🟢 You can import this file directly. */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.ts" -import type * as Prisma from "../internal/prismaNamespace.ts" +import type * as runtime from '@prisma/client/runtime/client' +import type * as $Enums from '../enums.ts' +import type * as Prisma from '../internal/prismaNamespace.ts' /** * Model Category @@ -49,7 +48,6 @@ export type CategoryCountAggregateOutputType = { _all: number } - export type CategoryMinAggregateInputType = { id?: true name?: true @@ -75,7 +73,9 @@ export type CategoryCountAggregateInputType = { _all?: true } -export type CategoryAggregateArgs = { +export type CategoryAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which Category to aggregate. */ @@ -108,36 +108,37 @@ export type CategoryAggregateArgs = { - [P in keyof T & keyof AggregateCategory]: P extends '_count' | 'count' + [P in keyof T & keyof AggregateCategory]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } - - - -export type CategoryGroupByArgs = { +export type CategoryGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.CategoryWhereInput - orderBy?: Prisma.CategoryOrderByWithAggregationInput | Prisma.CategoryOrderByWithAggregationInput[] + orderBy?: + | Prisma.CategoryOrderByWithAggregationInput + | Prisma.CategoryOrderByWithAggregationInput[] by: Prisma.CategoryScalarFieldEnum[] | Prisma.CategoryScalarFieldEnum having?: Prisma.CategoryScalarWhereWithAggregatesInput take?: number @@ -160,28 +161,25 @@ export type CategoryGroupByOutputType = { type GetCategoryGroupByPayload = Prisma.PrismaPromise< Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof CategoryGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType + Prisma.PickEnumerable & { + [P in keyof T & keyof CategoryGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number : Prisma.GetScalarType - } - > + : Prisma.GetScalarType + } > - - +> export type CategoryWhereInput = { AND?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[] OR?: Prisma.CategoryWhereInput[] NOT?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[] - id?: Prisma.StringFilter<"Category"> | string - name?: Prisma.StringFilter<"Category"> | string - parentId?: Prisma.StringNullableFilter<"Category"> | string | null - createdAt?: Prisma.DateTimeFilter<"Category"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Category"> | Date | string + id?: Prisma.StringFilter<'Category'> | string + name?: Prisma.StringFilter<'Category'> | string + parentId?: Prisma.StringNullableFilter<'Category'> | string | null + createdAt?: Prisma.DateTimeFilter<'Category'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Category'> | Date | string parent?: Prisma.XOR | null subCategories?: Prisma.CategoryListRelationFilter equipmentsAsMain?: Prisma.EquipmentListRelationFilter @@ -200,20 +198,26 @@ export type CategoryOrderByWithRelationInput = { equipmentsAsSub?: Prisma.EquipmentOrderByRelationAggregateInput } -export type CategoryWhereUniqueInput = Prisma.AtLeast<{ - id?: string - AND?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[] - OR?: Prisma.CategoryWhereInput[] - NOT?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[] - name?: Prisma.StringFilter<"Category"> | string - parentId?: Prisma.StringNullableFilter<"Category"> | string | null - createdAt?: Prisma.DateTimeFilter<"Category"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Category"> | Date | string - parent?: Prisma.XOR | null - subCategories?: Prisma.CategoryListRelationFilter - equipmentsAsMain?: Prisma.EquipmentListRelationFilter - equipmentsAsSub?: Prisma.EquipmentListRelationFilter -}, "id"> +export type CategoryWhereUniqueInput = Prisma.AtLeast< + { + id?: string + AND?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[] + OR?: Prisma.CategoryWhereInput[] + NOT?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[] + name?: Prisma.StringFilter<'Category'> | string + parentId?: Prisma.StringNullableFilter<'Category'> | string | null + createdAt?: Prisma.DateTimeFilter<'Category'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Category'> | Date | string + parent?: Prisma.XOR< + Prisma.CategoryNullableScalarRelationFilter, + Prisma.CategoryWhereInput + > | null + subCategories?: Prisma.CategoryListRelationFilter + equipmentsAsMain?: Prisma.EquipmentListRelationFilter + equipmentsAsSub?: Prisma.EquipmentListRelationFilter + }, + 'id' +> export type CategoryOrderByWithAggregationInput = { id?: Prisma.SortOrder @@ -227,14 +231,18 @@ export type CategoryOrderByWithAggregationInput = { } export type CategoryScalarWhereWithAggregatesInput = { - AND?: Prisma.CategoryScalarWhereWithAggregatesInput | Prisma.CategoryScalarWhereWithAggregatesInput[] + AND?: + | Prisma.CategoryScalarWhereWithAggregatesInput + | Prisma.CategoryScalarWhereWithAggregatesInput[] OR?: Prisma.CategoryScalarWhereWithAggregatesInput[] - NOT?: Prisma.CategoryScalarWhereWithAggregatesInput | Prisma.CategoryScalarWhereWithAggregatesInput[] - id?: Prisma.StringWithAggregatesFilter<"Category"> | string - name?: Prisma.StringWithAggregatesFilter<"Category"> | string - parentId?: Prisma.StringNullableWithAggregatesFilter<"Category"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Category"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Category"> | Date | string + NOT?: + | Prisma.CategoryScalarWhereWithAggregatesInput + | Prisma.CategoryScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<'Category'> | string + name?: Prisma.StringWithAggregatesFilter<'Category'> | string + parentId?: Prisma.StringNullableWithAggregatesFilter<'Category'> | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<'Category'> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Category'> | Date | string } export type CategoryCreateInput = { @@ -349,91 +357,171 @@ export type CategoryScalarRelationFilter = { } export type CategoryCreateNestedOneWithoutSubCategoriesInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedCreateWithoutSubCategoriesInput + > connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutSubCategoriesInput connect?: Prisma.CategoryWhereUniqueInput } export type CategoryCreateNestedManyWithoutParentInput = { - create?: Prisma.XOR | Prisma.CategoryCreateWithoutParentInput[] | Prisma.CategoryUncheckedCreateWithoutParentInput[] - connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutParentInput | Prisma.CategoryCreateOrConnectWithoutParentInput[] + create?: + | Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > + | Prisma.CategoryCreateWithoutParentInput[] + | Prisma.CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: + | Prisma.CategoryCreateOrConnectWithoutParentInput + | Prisma.CategoryCreateOrConnectWithoutParentInput[] createMany?: Prisma.CategoryCreateManyParentInputEnvelope connect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] } export type CategoryUncheckedCreateNestedManyWithoutParentInput = { - create?: Prisma.XOR | Prisma.CategoryCreateWithoutParentInput[] | Prisma.CategoryUncheckedCreateWithoutParentInput[] - connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutParentInput | Prisma.CategoryCreateOrConnectWithoutParentInput[] + create?: + | Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > + | Prisma.CategoryCreateWithoutParentInput[] + | Prisma.CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: + | Prisma.CategoryCreateOrConnectWithoutParentInput + | Prisma.CategoryCreateOrConnectWithoutParentInput[] createMany?: Prisma.CategoryCreateManyParentInputEnvelope connect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] } export type CategoryUpdateOneWithoutSubCategoriesNestedInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedCreateWithoutSubCategoriesInput + > connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutSubCategoriesInput upsert?: Prisma.CategoryUpsertWithoutSubCategoriesInput disconnect?: Prisma.CategoryWhereInput | boolean delete?: Prisma.CategoryWhereInput | boolean connect?: Prisma.CategoryWhereUniqueInput - update?: Prisma.XOR, Prisma.CategoryUncheckedUpdateWithoutSubCategoriesInput> + update?: Prisma.XOR< + Prisma.XOR< + Prisma.CategoryUpdateToOneWithWhereWithoutSubCategoriesInput, + Prisma.CategoryUpdateWithoutSubCategoriesInput + >, + Prisma.CategoryUncheckedUpdateWithoutSubCategoriesInput + > } export type CategoryUpdateManyWithoutParentNestedInput = { - create?: Prisma.XOR | Prisma.CategoryCreateWithoutParentInput[] | Prisma.CategoryUncheckedCreateWithoutParentInput[] - connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutParentInput | Prisma.CategoryCreateOrConnectWithoutParentInput[] - upsert?: Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput | Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput[] + create?: + | Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > + | Prisma.CategoryCreateWithoutParentInput[] + | Prisma.CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: + | Prisma.CategoryCreateOrConnectWithoutParentInput + | Prisma.CategoryCreateOrConnectWithoutParentInput[] + upsert?: + | Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput + | Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput[] createMany?: Prisma.CategoryCreateManyParentInputEnvelope set?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] disconnect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] delete?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] connect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] - update?: Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput | Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput[] - updateMany?: Prisma.CategoryUpdateManyWithWhereWithoutParentInput | Prisma.CategoryUpdateManyWithWhereWithoutParentInput[] + update?: + | Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput + | Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput[] + updateMany?: + | Prisma.CategoryUpdateManyWithWhereWithoutParentInput + | Prisma.CategoryUpdateManyWithWhereWithoutParentInput[] deleteMany?: Prisma.CategoryScalarWhereInput | Prisma.CategoryScalarWhereInput[] } export type CategoryUncheckedUpdateManyWithoutParentNestedInput = { - create?: Prisma.XOR | Prisma.CategoryCreateWithoutParentInput[] | Prisma.CategoryUncheckedCreateWithoutParentInput[] - connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutParentInput | Prisma.CategoryCreateOrConnectWithoutParentInput[] - upsert?: Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput | Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput[] + create?: + | Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > + | Prisma.CategoryCreateWithoutParentInput[] + | Prisma.CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: + | Prisma.CategoryCreateOrConnectWithoutParentInput + | Prisma.CategoryCreateOrConnectWithoutParentInput[] + upsert?: + | Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput + | Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput[] createMany?: Prisma.CategoryCreateManyParentInputEnvelope set?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] disconnect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] delete?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] connect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] - update?: Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput | Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput[] - updateMany?: Prisma.CategoryUpdateManyWithWhereWithoutParentInput | Prisma.CategoryUpdateManyWithWhereWithoutParentInput[] + update?: + | Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput + | Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput[] + updateMany?: + | Prisma.CategoryUpdateManyWithWhereWithoutParentInput + | Prisma.CategoryUpdateManyWithWhereWithoutParentInput[] deleteMany?: Prisma.CategoryScalarWhereInput | Prisma.CategoryScalarWhereInput[] } export type CategoryCreateNestedOneWithoutEquipmentsAsMainInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsMainInput + > connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutEquipmentsAsMainInput connect?: Prisma.CategoryWhereUniqueInput } export type CategoryCreateNestedOneWithoutEquipmentsAsSubInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsSubInput + > connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutEquipmentsAsSubInput connect?: Prisma.CategoryWhereUniqueInput } export type CategoryUpdateOneRequiredWithoutEquipmentsAsMainNestedInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsMainInput + > connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutEquipmentsAsMainInput upsert?: Prisma.CategoryUpsertWithoutEquipmentsAsMainInput connect?: Prisma.CategoryWhereUniqueInput - update?: Prisma.XOR, Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsMainInput> + update?: Prisma.XOR< + Prisma.XOR< + Prisma.CategoryUpdateToOneWithWhereWithoutEquipmentsAsMainInput, + Prisma.CategoryUpdateWithoutEquipmentsAsMainInput + >, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsMainInput + > } export type CategoryUpdateOneWithoutEquipmentsAsSubNestedInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsSubInput + > connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutEquipmentsAsSubInput upsert?: Prisma.CategoryUpsertWithoutEquipmentsAsSubInput disconnect?: Prisma.CategoryWhereInput | boolean delete?: Prisma.CategoryWhereInput | boolean connect?: Prisma.CategoryWhereUniqueInput - update?: Prisma.XOR, Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsSubInput> + update?: Prisma.XOR< + Prisma.XOR< + Prisma.CategoryUpdateToOneWithWhereWithoutEquipmentsAsSubInput, + Prisma.CategoryUpdateWithoutEquipmentsAsSubInput + >, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsSubInput + > } export type CategoryCreateWithoutSubCategoriesInput = { @@ -458,7 +546,10 @@ export type CategoryUncheckedCreateWithoutSubCategoriesInput = { export type CategoryCreateOrConnectWithoutSubCategoriesInput = { where: Prisma.CategoryWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.CategoryCreateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedCreateWithoutSubCategoriesInput + > } export type CategoryCreateWithoutParentInput = { @@ -483,7 +574,10 @@ export type CategoryUncheckedCreateWithoutParentInput = { export type CategoryCreateOrConnectWithoutParentInput = { where: Prisma.CategoryWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > } export type CategoryCreateManyParentInputEnvelope = { @@ -491,14 +585,23 @@ export type CategoryCreateManyParentInputEnvelope = { } export type CategoryUpsertWithoutSubCategoriesInput = { - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.CategoryUpdateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedUpdateWithoutSubCategoriesInput + > + create: Prisma.XOR< + Prisma.CategoryCreateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedCreateWithoutSubCategoriesInput + > where?: Prisma.CategoryWhereInput } export type CategoryUpdateToOneWithWhereWithoutSubCategoriesInput = { where?: Prisma.CategoryWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.CategoryUpdateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedUpdateWithoutSubCategoriesInput + > } export type CategoryUpdateWithoutSubCategoriesInput = { @@ -523,29 +626,41 @@ export type CategoryUncheckedUpdateWithoutSubCategoriesInput = { export type CategoryUpsertWithWhereUniqueWithoutParentInput = { where: Prisma.CategoryWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.CategoryUpdateWithoutParentInput, + Prisma.CategoryUncheckedUpdateWithoutParentInput + > + create: Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > } export type CategoryUpdateWithWhereUniqueWithoutParentInput = { where: Prisma.CategoryWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.CategoryUpdateWithoutParentInput, + Prisma.CategoryUncheckedUpdateWithoutParentInput + > } export type CategoryUpdateManyWithWhereWithoutParentInput = { where: Prisma.CategoryScalarWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.CategoryUpdateManyMutationInput, + Prisma.CategoryUncheckedUpdateManyWithoutParentInput + > } export type CategoryScalarWhereInput = { AND?: Prisma.CategoryScalarWhereInput | Prisma.CategoryScalarWhereInput[] OR?: Prisma.CategoryScalarWhereInput[] NOT?: Prisma.CategoryScalarWhereInput | Prisma.CategoryScalarWhereInput[] - id?: Prisma.StringFilter<"Category"> | string - name?: Prisma.StringFilter<"Category"> | string - parentId?: Prisma.StringNullableFilter<"Category"> | string | null - createdAt?: Prisma.DateTimeFilter<"Category"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Category"> | Date | string + id?: Prisma.StringFilter<'Category'> | string + name?: Prisma.StringFilter<'Category'> | string + parentId?: Prisma.StringNullableFilter<'Category'> | string | null + createdAt?: Prisma.DateTimeFilter<'Category'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Category'> | Date | string } export type CategoryCreateWithoutEquipmentsAsMainInput = { @@ -570,7 +685,10 @@ export type CategoryUncheckedCreateWithoutEquipmentsAsMainInput = { export type CategoryCreateOrConnectWithoutEquipmentsAsMainInput = { where: Prisma.CategoryWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsMainInput + > } export type CategoryCreateWithoutEquipmentsAsSubInput = { @@ -595,18 +713,30 @@ export type CategoryUncheckedCreateWithoutEquipmentsAsSubInput = { export type CategoryCreateOrConnectWithoutEquipmentsAsSubInput = { where: Prisma.CategoryWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsSubInput + > } export type CategoryUpsertWithoutEquipmentsAsMainInput = { - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.CategoryUpdateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsMainInput + > + create: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsMainInput + > where?: Prisma.CategoryWhereInput } export type CategoryUpdateToOneWithWhereWithoutEquipmentsAsMainInput = { where?: Prisma.CategoryWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.CategoryUpdateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsMainInput + > } export type CategoryUpdateWithoutEquipmentsAsMainInput = { @@ -630,14 +760,23 @@ export type CategoryUncheckedUpdateWithoutEquipmentsAsMainInput = { } export type CategoryUpsertWithoutEquipmentsAsSubInput = { - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.CategoryUpdateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsSubInput + > + create: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsSubInput + > where?: Prisma.CategoryWhereInput } export type CategoryUpdateToOneWithWhereWithoutEquipmentsAsSubInput = { where?: Prisma.CategoryWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.CategoryUpdateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsSubInput + > } export type CategoryUpdateWithoutEquipmentsAsSubInput = { @@ -694,7 +833,6 @@ export type CategoryUncheckedUpdateManyWithoutParentInput = { updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } - /** * Count Type CategoryCountOutputType */ @@ -705,7 +843,9 @@ export type CategoryCountOutputType = { equipmentsAsSub: number } -export type CategoryCountOutputTypeSelect = { +export type CategoryCountOutputTypeSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { subCategories?: boolean | CategoryCountOutputTypeCountSubCategoriesArgs equipmentsAsMain?: boolean | CategoryCountOutputTypeCountEquipmentsAsMainArgs equipmentsAsSub?: boolean | CategoryCountOutputTypeCountEquipmentsAsSubArgs @@ -714,7 +854,9 @@ export type CategoryCountOutputTypeSelect = { +export type CategoryCountOutputTypeDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the CategoryCountOutputType */ @@ -724,55 +866,75 @@ export type CategoryCountOutputTypeDefaultArgs = { +export type CategoryCountOutputTypeCountSubCategoriesArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.CategoryWhereInput } /** * CategoryCountOutputType without action */ -export type CategoryCountOutputTypeCountEquipmentsAsMainArgs = { +export type CategoryCountOutputTypeCountEquipmentsAsMainArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.EquipmentWhereInput } /** * CategoryCountOutputType without action */ -export type CategoryCountOutputTypeCountEquipmentsAsSubArgs = { +export type CategoryCountOutputTypeCountEquipmentsAsSubArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.EquipmentWhereInput } +export type CategorySelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + parentId?: boolean + createdAt?: boolean + updatedAt?: boolean + parent?: boolean | Prisma.Category$parentArgs + subCategories?: boolean | Prisma.Category$subCategoriesArgs + equipmentsAsMain?: boolean | Prisma.Category$equipmentsAsMainArgs + equipmentsAsSub?: boolean | Prisma.Category$equipmentsAsSubArgs + _count?: boolean | Prisma.CategoryCountOutputTypeDefaultArgs + }, + ExtArgs['result']['category'] +> -export type CategorySelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - parentId?: boolean - createdAt?: boolean - updatedAt?: boolean - parent?: boolean | Prisma.Category$parentArgs - subCategories?: boolean | Prisma.Category$subCategoriesArgs - equipmentsAsMain?: boolean | Prisma.Category$equipmentsAsMainArgs - equipmentsAsSub?: boolean | Prisma.Category$equipmentsAsSubArgs - _count?: boolean | Prisma.CategoryCountOutputTypeDefaultArgs -}, ExtArgs["result"]["category"]> +export type CategorySelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + parentId?: boolean + createdAt?: boolean + updatedAt?: boolean + parent?: boolean | Prisma.Category$parentArgs + }, + ExtArgs['result']['category'] +> -export type CategorySelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - parentId?: boolean - createdAt?: boolean - updatedAt?: boolean - parent?: boolean | Prisma.Category$parentArgs -}, ExtArgs["result"]["category"]> - -export type CategorySelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - parentId?: boolean - createdAt?: boolean - updatedAt?: boolean - parent?: boolean | Prisma.Category$parentArgs -}, ExtArgs["result"]["category"]> +export type CategorySelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + parentId?: boolean + createdAt?: boolean + updatedAt?: boolean + parent?: boolean | Prisma.Category$parentArgs + }, + ExtArgs['result']['category'] +> export type CategorySelectScalar = { id?: boolean @@ -782,48 +944,69 @@ export type CategorySelectScalar = { updatedAt?: boolean } -export type CategoryOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "parentId" | "createdAt" | "updatedAt", ExtArgs["result"]["category"]> -export type CategoryInclude = { +export type CategoryOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + 'id' | 'name' | 'parentId' | 'createdAt' | 'updatedAt', + ExtArgs['result']['category'] +> +export type CategoryInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { parent?: boolean | Prisma.Category$parentArgs subCategories?: boolean | Prisma.Category$subCategoriesArgs equipmentsAsMain?: boolean | Prisma.Category$equipmentsAsMainArgs equipmentsAsSub?: boolean | Prisma.Category$equipmentsAsSubArgs _count?: boolean | Prisma.CategoryCountOutputTypeDefaultArgs } -export type CategoryIncludeCreateManyAndReturn = { +export type CategoryIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { parent?: boolean | Prisma.Category$parentArgs } -export type CategoryIncludeUpdateManyAndReturn = { +export type CategoryIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { parent?: boolean | Prisma.Category$parentArgs } -export type $CategoryPayload = { - name: "Category" +export type $CategoryPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'Category' objects: { parent: Prisma.$CategoryPayload | null subCategories: Prisma.$CategoryPayload[] equipmentsAsMain: Prisma.$EquipmentPayload[] equipmentsAsSub: Prisma.$EquipmentPayload[] } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: string - name: string - parentId: string | null - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["category"]> + scalars: runtime.Types.Extensions.GetPayloadResult< + { + id: string + name: string + parentId: string | null + createdAt: Date + updatedAt: Date + }, + ExtArgs['result']['category'] + > composites: {} } -export type CategoryGetPayload = runtime.Types.Result.GetResult +export type CategoryGetPayload = + runtime.Types.Result.GetResult -export type CategoryCountArgs = - Omit & { - select?: CategoryCountAggregateInputType | true - } +export type CategoryCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: CategoryCountAggregateInputType | true +} -export interface CategoryDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Category'], meta: { name: 'Category' } } +export interface CategoryDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { types: Prisma.TypeMap['model']['Category']; meta: { name: 'Category' } } /** * Find zero or one Category that matches the filter. * @param {CategoryFindUniqueArgs} args - Arguments to find a Category @@ -835,7 +1018,19 @@ export interface CategoryDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CategoryClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find one Category that matches the filter or throw an error with `error.code='P2025'` @@ -849,7 +1044,19 @@ export interface CategoryDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CategoryClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find the first Category that matches the filter. @@ -864,7 +1071,19 @@ export interface CategoryDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__CategoryClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find the first Category that matches the filter or @@ -880,7 +1099,19 @@ export interface CategoryDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__CategoryClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find zero or more Categories that matches the filter. @@ -898,7 +1129,16 @@ export interface CategoryDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findMany', + GlobalOmitOptions + > + > /** * Create a Category. @@ -912,7 +1152,19 @@ export interface CategoryDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CategoryClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'create', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Create many Categories. @@ -926,7 +1178,9 @@ export interface CategoryDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Create many Categories and returns the data saved in the database. @@ -950,7 +1204,16 @@ export interface CategoryDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + createManyAndReturn( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > /** * Delete a Category. @@ -964,7 +1227,19 @@ export interface CategoryDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CategoryClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'delete', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Update one Category. @@ -981,7 +1256,19 @@ export interface CategoryDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CategoryClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'update', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Delete zero or more Categories. @@ -995,7 +1282,9 @@ export interface CategoryDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more Categories. @@ -1014,7 +1303,9 @@ export interface CategoryDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more Categories and returns the data updated in the database. @@ -1044,7 +1335,16 @@ export interface CategoryDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + updateManyAndReturn( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > /** * Create or update one Category. @@ -1063,8 +1363,19 @@ export interface CategoryDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CategoryClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'upsert', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Count the number of Categories. @@ -1078,7 +1389,7 @@ export interface CategoryDelegate( args?: Prisma.Subset, ): Prisma.PrismaPromise< @@ -1112,8 +1423,10 @@ export interface CategoryDelegate(args: Prisma.Subset): Prisma.PrismaPromise> + **/ + aggregate( + args: Prisma.Subset, + ): Prisma.PrismaPromise> /** * Group by Category. @@ -1132,7 +1445,7 @@ export interface CategoryDelegate>>, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetCategoryGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Category model - */ -readonly fields: CategoryFieldRefs; + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields], + >( + args: Prisma.SubsetIntersection & InputErrors, + ): {} extends InputErrors ? GetCategoryGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Category model + */ + readonly fields: CategoryFieldRefs } /** @@ -1203,25 +1515,77 @@ readonly fields: CategoryFieldRefs; * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ -export interface Prisma__CategoryClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - parent = {}>(args?: Prisma.Subset>): Prisma.Prisma__CategoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - subCategories = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - equipmentsAsMain = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - equipmentsAsSub = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> +export interface Prisma__CategoryClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + parent = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + subCategories = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findMany', + GlobalOmitOptions + > + | Null + > + equipmentsAsMain = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findMany', + GlobalOmitOptions + > + | Null + > + equipmentsAsSub = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + 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): runtime.Types.Utils.JsPromise + then( + onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + catch( + onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. @@ -1231,26 +1595,24 @@ export interface Prisma__CategoryClient void) | undefined | null): runtime.Types.Utils.JsPromise } - - - /** * Fields of the Category model */ export interface CategoryFieldRefs { - readonly id: Prisma.FieldRef<"Category", 'String'> - readonly name: Prisma.FieldRef<"Category", 'String'> - readonly parentId: Prisma.FieldRef<"Category", 'String'> - readonly createdAt: Prisma.FieldRef<"Category", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Category", 'DateTime'> + readonly id: Prisma.FieldRef<'Category', 'String'> + readonly name: Prisma.FieldRef<'Category', 'String'> + readonly parentId: Prisma.FieldRef<'Category', 'String'> + readonly createdAt: Prisma.FieldRef<'Category', 'DateTime'> + readonly updatedAt: Prisma.FieldRef<'Category', 'DateTime'> } - // Custom InputTypes /** * Category findUnique */ -export type CategoryFindUniqueArgs = { +export type CategoryFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1272,7 +1634,9 @@ export type CategoryFindUniqueArgs = { +export type CategoryFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1294,7 +1658,9 @@ export type CategoryFindUniqueOrThrowArgs = { +export type CategoryFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1346,7 +1712,9 @@ export type CategoryFindFirstArgs = { +export type CategoryFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1398,7 +1766,9 @@ export type CategoryFindFirstOrThrowArgs = { +export type CategoryFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1445,7 +1815,9 @@ export type CategoryFindManyArgs = { +export type CategoryCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1467,7 +1839,9 @@ export type CategoryCreateArgs = { +export type CategoryCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to create many Categories. */ @@ -1477,7 +1851,9 @@ export type CategoryCreateManyArgs = { +export type CategoryCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1499,7 +1875,9 @@ export type CategoryCreateManyAndReturnArgs = { +export type CategoryUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1525,7 +1903,9 @@ export type CategoryUpdateArgs = { +export type CategoryUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to update Categories. */ @@ -1543,7 +1923,9 @@ export type CategoryUpdateManyArgs = { +export type CategoryUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1573,7 +1955,9 @@ export type CategoryUpdateManyAndReturnArgs = { +export type CategoryUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1603,7 +1987,9 @@ export type CategoryUpsertArgs = { +export type CategoryDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1625,7 +2011,9 @@ export type CategoryDeleteArgs = { +export type CategoryDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which Categories to delete */ @@ -1639,7 +2027,9 @@ export type CategoryDeleteManyArgs = { +export type Category$parentArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1658,7 +2048,9 @@ export type Category$parentArgs = { +export type Category$subCategoriesArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1682,7 +2074,9 @@ export type Category$subCategoriesArgs = { +export type Category$equipmentsAsMainArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1706,7 +2100,9 @@ export type Category$equipmentsAsMainArgs = { +export type Category$equipmentsAsSubArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1730,7 +2126,9 @@ export type Category$equipmentsAsSubArgs = { +export type CategoryDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ diff --git a/src/generated/prisma/models/Character.ts b/src/generated/prisma/models/Character.ts index f328342..12d6106 100644 --- a/src/generated/prisma/models/Character.ts +++ b/src/generated/prisma/models/Character.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -8,9 +7,9 @@ * * 🟢 You can import this file directly. */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.ts" -import type * as Prisma from "../internal/prismaNamespace.ts" +import type * as runtime from '@prisma/client/runtime/client' +import type * as $Enums from '../enums.ts' +import type * as Prisma from '../internal/prismaNamespace.ts' /** * Model Character @@ -52,7 +51,6 @@ export type CharacterCountAggregateOutputType = { _all: number } - export type CharacterMinAggregateInputType = { id?: true name?: true @@ -81,7 +79,9 @@ export type CharacterCountAggregateInputType = { _all?: true } -export type CharacterAggregateArgs = { +export type CharacterAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which Character to aggregate. */ @@ -114,36 +114,37 @@ export type CharacterAggregateArgs = { - [P in keyof T & keyof AggregateCharacter]: P extends '_count' | 'count' + [P in keyof T & keyof AggregateCharacter]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } - - - -export type CharacterGroupByArgs = { +export type CharacterGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.CharacterWhereInput - orderBy?: Prisma.CharacterOrderByWithAggregationInput | Prisma.CharacterOrderByWithAggregationInput[] + orderBy?: + | Prisma.CharacterOrderByWithAggregationInput + | Prisma.CharacterOrderByWithAggregationInput[] by: Prisma.CharacterScalarFieldEnum[] | Prisma.CharacterScalarFieldEnum having?: Prisma.CharacterScalarWhereWithAggregatesInput take?: number @@ -167,29 +168,26 @@ export type CharacterGroupByOutputType = { type GetCharacterGroupByPayload = Prisma.PrismaPromise< Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof CharacterGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType + Prisma.PickEnumerable & { + [P in keyof T & keyof CharacterGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number : Prisma.GetScalarType - } - > + : Prisma.GetScalarType + } > - - +> export type CharacterWhereInput = { AND?: Prisma.CharacterWhereInput | Prisma.CharacterWhereInput[] OR?: Prisma.CharacterWhereInput[] NOT?: Prisma.CharacterWhereInput | Prisma.CharacterWhereInput[] - id?: Prisma.StringFilter<"Character"> | string - name?: Prisma.StringFilter<"Character"> | string - description?: Prisma.StringNullableFilter<"Character"> | string | null - imageId?: Prisma.StringFilter<"Character"> | string - createdAt?: Prisma.DateTimeFilter<"Character"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Character"> | Date | string + id?: Prisma.StringFilter<'Character'> | string + name?: Prisma.StringFilter<'Character'> | string + description?: Prisma.StringNullableFilter<'Character'> | string | null + imageId?: Prisma.StringFilter<'Character'> | string + createdAt?: Prisma.DateTimeFilter<'Character'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Character'> | Date | string image?: Prisma.XOR generations?: Prisma.GenerationListRelationFilter } @@ -205,19 +203,22 @@ export type CharacterOrderByWithRelationInput = { generations?: Prisma.GenerationOrderByRelationAggregateInput } -export type CharacterWhereUniqueInput = Prisma.AtLeast<{ - id?: string - AND?: Prisma.CharacterWhereInput | Prisma.CharacterWhereInput[] - OR?: Prisma.CharacterWhereInput[] - NOT?: Prisma.CharacterWhereInput | Prisma.CharacterWhereInput[] - name?: Prisma.StringFilter<"Character"> | string - description?: Prisma.StringNullableFilter<"Character"> | string | null - imageId?: Prisma.StringFilter<"Character"> | string - createdAt?: Prisma.DateTimeFilter<"Character"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Character"> | Date | string - image?: Prisma.XOR - generations?: Prisma.GenerationListRelationFilter -}, "id"> +export type CharacterWhereUniqueInput = Prisma.AtLeast< + { + id?: string + AND?: Prisma.CharacterWhereInput | Prisma.CharacterWhereInput[] + OR?: Prisma.CharacterWhereInput[] + NOT?: Prisma.CharacterWhereInput | Prisma.CharacterWhereInput[] + name?: Prisma.StringFilter<'Character'> | string + description?: Prisma.StringNullableFilter<'Character'> | string | null + imageId?: Prisma.StringFilter<'Character'> | string + createdAt?: Prisma.DateTimeFilter<'Character'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Character'> | Date | string + image?: Prisma.XOR + generations?: Prisma.GenerationListRelationFilter + }, + 'id' +> export type CharacterOrderByWithAggregationInput = { id?: Prisma.SortOrder @@ -232,15 +233,19 @@ export type CharacterOrderByWithAggregationInput = { } export type CharacterScalarWhereWithAggregatesInput = { - AND?: Prisma.CharacterScalarWhereWithAggregatesInput | Prisma.CharacterScalarWhereWithAggregatesInput[] + AND?: + | Prisma.CharacterScalarWhereWithAggregatesInput + | Prisma.CharacterScalarWhereWithAggregatesInput[] OR?: Prisma.CharacterScalarWhereWithAggregatesInput[] - NOT?: Prisma.CharacterScalarWhereWithAggregatesInput | Prisma.CharacterScalarWhereWithAggregatesInput[] - id?: Prisma.StringWithAggregatesFilter<"Character"> | string - name?: Prisma.StringWithAggregatesFilter<"Character"> | string - description?: Prisma.StringNullableWithAggregatesFilter<"Character"> | string | null - imageId?: Prisma.StringWithAggregatesFilter<"Character"> | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Character"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Character"> | Date | string + NOT?: + | Prisma.CharacterScalarWhereWithAggregatesInput + | Prisma.CharacterScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<'Character'> | string + name?: Prisma.StringWithAggregatesFilter<'Character'> | string + description?: Prisma.StringNullableWithAggregatesFilter<'Character'> | string | null + imageId?: Prisma.StringWithAggregatesFilter<'Character'> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<'Character'> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Character'> | Date | string } export type CharacterCreateInput = { @@ -352,44 +357,88 @@ export type CharacterScalarRelationFilter = { } export type CharacterCreateNestedManyWithoutImageInput = { - create?: Prisma.XOR | Prisma.CharacterCreateWithoutImageInput[] | Prisma.CharacterUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.CharacterCreateOrConnectWithoutImageInput | Prisma.CharacterCreateOrConnectWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > + | Prisma.CharacterCreateWithoutImageInput[] + | Prisma.CharacterUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.CharacterCreateOrConnectWithoutImageInput + | Prisma.CharacterCreateOrConnectWithoutImageInput[] createMany?: Prisma.CharacterCreateManyImageInputEnvelope connect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] } export type CharacterUncheckedCreateNestedManyWithoutImageInput = { - create?: Prisma.XOR | Prisma.CharacterCreateWithoutImageInput[] | Prisma.CharacterUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.CharacterCreateOrConnectWithoutImageInput | Prisma.CharacterCreateOrConnectWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > + | Prisma.CharacterCreateWithoutImageInput[] + | Prisma.CharacterUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.CharacterCreateOrConnectWithoutImageInput + | Prisma.CharacterCreateOrConnectWithoutImageInput[] createMany?: Prisma.CharacterCreateManyImageInputEnvelope connect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] } export type CharacterUpdateManyWithoutImageNestedInput = { - create?: Prisma.XOR | Prisma.CharacterCreateWithoutImageInput[] | Prisma.CharacterUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.CharacterCreateOrConnectWithoutImageInput | Prisma.CharacterCreateOrConnectWithoutImageInput[] - upsert?: Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput | Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > + | Prisma.CharacterCreateWithoutImageInput[] + | Prisma.CharacterUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.CharacterCreateOrConnectWithoutImageInput + | Prisma.CharacterCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput + | Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput[] createMany?: Prisma.CharacterCreateManyImageInputEnvelope set?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] disconnect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] delete?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] connect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] - update?: Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput | Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput[] - updateMany?: Prisma.CharacterUpdateManyWithWhereWithoutImageInput | Prisma.CharacterUpdateManyWithWhereWithoutImageInput[] + update?: + | Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput + | Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.CharacterUpdateManyWithWhereWithoutImageInput + | Prisma.CharacterUpdateManyWithWhereWithoutImageInput[] deleteMany?: Prisma.CharacterScalarWhereInput | Prisma.CharacterScalarWhereInput[] } export type CharacterUncheckedUpdateManyWithoutImageNestedInput = { - create?: Prisma.XOR | Prisma.CharacterCreateWithoutImageInput[] | Prisma.CharacterUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.CharacterCreateOrConnectWithoutImageInput | Prisma.CharacterCreateOrConnectWithoutImageInput[] - upsert?: Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput | Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > + | Prisma.CharacterCreateWithoutImageInput[] + | Prisma.CharacterUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.CharacterCreateOrConnectWithoutImageInput + | Prisma.CharacterCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput + | Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput[] createMany?: Prisma.CharacterCreateManyImageInputEnvelope set?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] disconnect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] delete?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] connect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] - update?: Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput | Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput[] - updateMany?: Prisma.CharacterUpdateManyWithWhereWithoutImageInput | Prisma.CharacterUpdateManyWithWhereWithoutImageInput[] + update?: + | Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput + | Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.CharacterUpdateManyWithWhereWithoutImageInput + | Prisma.CharacterUpdateManyWithWhereWithoutImageInput[] deleteMany?: Prisma.CharacterScalarWhereInput | Prisma.CharacterScalarWhereInput[] } @@ -398,17 +447,29 @@ export type NullableStringFieldUpdateOperationsInput = { } export type CharacterCreateNestedOneWithoutGenerationsInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.CharacterCreateWithoutGenerationsInput, + Prisma.CharacterUncheckedCreateWithoutGenerationsInput + > connectOrCreate?: Prisma.CharacterCreateOrConnectWithoutGenerationsInput connect?: Prisma.CharacterWhereUniqueInput } export type CharacterUpdateOneRequiredWithoutGenerationsNestedInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.CharacterCreateWithoutGenerationsInput, + Prisma.CharacterUncheckedCreateWithoutGenerationsInput + > connectOrCreate?: Prisma.CharacterCreateOrConnectWithoutGenerationsInput upsert?: Prisma.CharacterUpsertWithoutGenerationsInput connect?: Prisma.CharacterWhereUniqueInput - update?: Prisma.XOR, Prisma.CharacterUncheckedUpdateWithoutGenerationsInput> + update?: Prisma.XOR< + Prisma.XOR< + Prisma.CharacterUpdateToOneWithWhereWithoutGenerationsInput, + Prisma.CharacterUpdateWithoutGenerationsInput + >, + Prisma.CharacterUncheckedUpdateWithoutGenerationsInput + > } export type CharacterCreateWithoutImageInput = { @@ -431,7 +492,10 @@ export type CharacterUncheckedCreateWithoutImageInput = { export type CharacterCreateOrConnectWithoutImageInput = { where: Prisma.CharacterWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > } export type CharacterCreateManyImageInputEnvelope = { @@ -440,30 +504,42 @@ export type CharacterCreateManyImageInputEnvelope = { export type CharacterUpsertWithWhereUniqueWithoutImageInput = { where: Prisma.CharacterWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.CharacterUpdateWithoutImageInput, + Prisma.CharacterUncheckedUpdateWithoutImageInput + > + create: Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > } export type CharacterUpdateWithWhereUniqueWithoutImageInput = { where: Prisma.CharacterWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.CharacterUpdateWithoutImageInput, + Prisma.CharacterUncheckedUpdateWithoutImageInput + > } export type CharacterUpdateManyWithWhereWithoutImageInput = { where: Prisma.CharacterScalarWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.CharacterUpdateManyMutationInput, + Prisma.CharacterUncheckedUpdateManyWithoutImageInput + > } export type CharacterScalarWhereInput = { AND?: Prisma.CharacterScalarWhereInput | Prisma.CharacterScalarWhereInput[] OR?: Prisma.CharacterScalarWhereInput[] NOT?: Prisma.CharacterScalarWhereInput | Prisma.CharacterScalarWhereInput[] - id?: Prisma.StringFilter<"Character"> | string - name?: Prisma.StringFilter<"Character"> | string - description?: Prisma.StringNullableFilter<"Character"> | string | null - imageId?: Prisma.StringFilter<"Character"> | string - createdAt?: Prisma.DateTimeFilter<"Character"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Character"> | Date | string + id?: Prisma.StringFilter<'Character'> | string + name?: Prisma.StringFilter<'Character'> | string + description?: Prisma.StringNullableFilter<'Character'> | string | null + imageId?: Prisma.StringFilter<'Character'> | string + createdAt?: Prisma.DateTimeFilter<'Character'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Character'> | Date | string } export type CharacterCreateWithoutGenerationsInput = { @@ -486,18 +562,30 @@ export type CharacterUncheckedCreateWithoutGenerationsInput = { export type CharacterCreateOrConnectWithoutGenerationsInput = { where: Prisma.CharacterWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.CharacterCreateWithoutGenerationsInput, + Prisma.CharacterUncheckedCreateWithoutGenerationsInput + > } export type CharacterUpsertWithoutGenerationsInput = { - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.CharacterUpdateWithoutGenerationsInput, + Prisma.CharacterUncheckedUpdateWithoutGenerationsInput + > + create: Prisma.XOR< + Prisma.CharacterCreateWithoutGenerationsInput, + Prisma.CharacterUncheckedCreateWithoutGenerationsInput + > where?: Prisma.CharacterWhereInput } export type CharacterUpdateToOneWithWhereWithoutGenerationsInput = { where?: Prisma.CharacterWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.CharacterUpdateWithoutGenerationsInput, + Prisma.CharacterUncheckedUpdateWithoutGenerationsInput + > } export type CharacterUpdateWithoutGenerationsInput = { @@ -552,7 +640,6 @@ export type CharacterUncheckedUpdateManyWithoutImageInput = { updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } - /** * Count Type CharacterCountOutputType */ @@ -561,14 +648,18 @@ export type CharacterCountOutputType = { generations: number } -export type CharacterCountOutputTypeSelect = { +export type CharacterCountOutputTypeSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { generations?: boolean | CharacterCountOutputTypeCountGenerationsArgs } /** * CharacterCountOutputType without action */ -export type CharacterCountOutputTypeDefaultArgs = { +export type CharacterCountOutputTypeDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the CharacterCountOutputType */ @@ -578,42 +669,58 @@ export type CharacterCountOutputTypeDefaultArgs = { +export type CharacterCountOutputTypeCountGenerationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.GenerationWhereInput } +export type CharacterSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + image?: boolean | Prisma.AssetDefaultArgs + generations?: boolean | Prisma.Character$generationsArgs + _count?: boolean | Prisma.CharacterCountOutputTypeDefaultArgs + }, + ExtArgs['result']['character'] +> -export type CharacterSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - description?: boolean - imageId?: boolean - createdAt?: boolean - updatedAt?: boolean - image?: boolean | Prisma.AssetDefaultArgs - generations?: boolean | Prisma.Character$generationsArgs - _count?: boolean | Prisma.CharacterCountOutputTypeDefaultArgs -}, ExtArgs["result"]["character"]> +export type CharacterSelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['character'] +> -export type CharacterSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - description?: boolean - imageId?: boolean - createdAt?: boolean - updatedAt?: boolean - image?: boolean | Prisma.AssetDefaultArgs -}, ExtArgs["result"]["character"]> - -export type CharacterSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - description?: boolean - imageId?: boolean - createdAt?: boolean - updatedAt?: boolean - image?: boolean | Prisma.AssetDefaultArgs -}, ExtArgs["result"]["character"]> +export type CharacterSelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['character'] +> export type CharacterSelectScalar = { id?: boolean @@ -624,45 +731,66 @@ export type CharacterSelectScalar = { updatedAt?: boolean } -export type CharacterOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "imageId" | "createdAt" | "updatedAt", ExtArgs["result"]["character"]> -export type CharacterInclude = { +export type CharacterOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + 'id' | 'name' | 'description' | 'imageId' | 'createdAt' | 'updatedAt', + ExtArgs['result']['character'] +> +export type CharacterInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { image?: boolean | Prisma.AssetDefaultArgs generations?: boolean | Prisma.Character$generationsArgs _count?: boolean | Prisma.CharacterCountOutputTypeDefaultArgs } -export type CharacterIncludeCreateManyAndReturn = { +export type CharacterIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { image?: boolean | Prisma.AssetDefaultArgs } -export type CharacterIncludeUpdateManyAndReturn = { +export type CharacterIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { image?: boolean | Prisma.AssetDefaultArgs } -export type $CharacterPayload = { - name: "Character" +export type $CharacterPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'Character' objects: { image: Prisma.$AssetPayload generations: Prisma.$GenerationPayload[] } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: string - name: string - description: string | null - imageId: string - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["character"]> + scalars: runtime.Types.Extensions.GetPayloadResult< + { + id: string + name: string + description: string | null + imageId: string + createdAt: Date + updatedAt: Date + }, + ExtArgs['result']['character'] + > composites: {} } -export type CharacterGetPayload = runtime.Types.Result.GetResult +export type CharacterGetPayload = + runtime.Types.Result.GetResult -export type CharacterCountArgs = - Omit & { - select?: CharacterCountAggregateInputType | true - } +export type CharacterCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: CharacterCountAggregateInputType | true +} -export interface CharacterDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Character'], meta: { name: 'Character' } } +export interface CharacterDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { types: Prisma.TypeMap['model']['Character']; meta: { name: 'Character' } } /** * Find zero or one Character that matches the filter. * @param {CharacterFindUniqueArgs} args - Arguments to find a Character @@ -674,7 +802,19 @@ export interface CharacterDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CharacterClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find one Character that matches the filter or throw an error with `error.code='P2025'` @@ -688,7 +828,19 @@ export interface CharacterDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CharacterClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find the first Character that matches the filter. @@ -703,7 +855,19 @@ export interface CharacterDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__CharacterClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find the first Character that matches the filter or @@ -719,7 +883,19 @@ export interface CharacterDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__CharacterClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find zero or more Characters that matches the filter. @@ -737,7 +913,16 @@ export interface CharacterDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findMany', + GlobalOmitOptions + > + > /** * Create a Character. @@ -751,7 +936,19 @@ export interface CharacterDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CharacterClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'create', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Create many Characters. @@ -765,7 +962,9 @@ export interface CharacterDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Create many Characters and returns the data saved in the database. @@ -789,7 +988,16 @@ export interface CharacterDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + createManyAndReturn( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > /** * Delete a Character. @@ -803,7 +1011,19 @@ export interface CharacterDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CharacterClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'delete', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Update one Character. @@ -820,7 +1040,19 @@ export interface CharacterDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CharacterClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'update', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Delete zero or more Characters. @@ -834,7 +1066,9 @@ export interface CharacterDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more Characters. @@ -853,7 +1087,9 @@ export interface CharacterDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more Characters and returns the data updated in the database. @@ -883,7 +1119,16 @@ export interface CharacterDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + updateManyAndReturn( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > /** * Create or update one Character. @@ -902,8 +1147,19 @@ export interface CharacterDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__CharacterClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'upsert', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Count the number of Characters. @@ -917,7 +1173,7 @@ export interface CharacterDelegate( args?: Prisma.Subset, ): Prisma.PrismaPromise< @@ -951,8 +1207,10 @@ export interface CharacterDelegate(args: Prisma.Subset): Prisma.PrismaPromise> + **/ + aggregate( + args: Prisma.Subset, + ): Prisma.PrismaPromise> /** * Group by Character. @@ -971,7 +1229,7 @@ export interface CharacterDelegate>>, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetCharacterGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Character model - */ -readonly fields: CharacterFieldRefs; + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields], + >( + args: Prisma.SubsetIntersection & InputErrors, + ): {} extends InputErrors ? GetCharacterGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Character model + */ + readonly fields: CharacterFieldRefs } /** @@ -1042,23 +1299,56 @@ readonly fields: CharacterFieldRefs; * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ -export interface Prisma__CharacterClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - image = {}>(args?: Prisma.Subset>): Prisma.Prisma__AssetClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - generations = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> +export interface Prisma__CharacterClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + image = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__AssetClient< + | runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + generations = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + 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): runtime.Types.Utils.JsPromise + then( + onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + catch( + onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. @@ -1068,27 +1358,25 @@ export interface Prisma__CharacterClient void) | undefined | null): runtime.Types.Utils.JsPromise } - - - /** * Fields of the Character model */ export interface CharacterFieldRefs { - readonly id: Prisma.FieldRef<"Character", 'String'> - readonly name: Prisma.FieldRef<"Character", 'String'> - readonly description: Prisma.FieldRef<"Character", 'String'> - readonly imageId: Prisma.FieldRef<"Character", 'String'> - readonly createdAt: Prisma.FieldRef<"Character", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Character", 'DateTime'> + readonly id: Prisma.FieldRef<'Character', 'String'> + readonly name: Prisma.FieldRef<'Character', 'String'> + readonly description: Prisma.FieldRef<'Character', 'String'> + readonly imageId: Prisma.FieldRef<'Character', 'String'> + readonly createdAt: Prisma.FieldRef<'Character', 'DateTime'> + readonly updatedAt: Prisma.FieldRef<'Character', 'DateTime'> } - // Custom InputTypes /** * Character findUnique */ -export type CharacterFindUniqueArgs = { +export type CharacterFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1110,7 +1398,9 @@ export type CharacterFindUniqueArgs = { +export type CharacterFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1132,7 +1422,9 @@ export type CharacterFindUniqueOrThrowArgs = { +export type CharacterFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1184,7 +1476,9 @@ export type CharacterFindFirstArgs = { +export type CharacterFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1236,7 +1530,9 @@ export type CharacterFindFirstOrThrowArgs = { +export type CharacterFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1283,7 +1579,9 @@ export type CharacterFindManyArgs = { +export type CharacterCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1305,7 +1603,9 @@ export type CharacterCreateArgs = { +export type CharacterCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to create many Characters. */ @@ -1315,7 +1615,9 @@ export type CharacterCreateManyArgs = { +export type CharacterCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1337,7 +1639,9 @@ export type CharacterCreateManyAndReturnArgs = { +export type CharacterUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1363,11 +1667,16 @@ export type CharacterUpdateArgs = { +export type CharacterUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to update Characters. */ - data: Prisma.XOR + data: Prisma.XOR< + Prisma.CharacterUpdateManyMutationInput, + Prisma.CharacterUncheckedUpdateManyInput + > /** * Filter which Characters to update */ @@ -1381,7 +1690,9 @@ export type CharacterUpdateManyArgs = { +export type CharacterUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1393,7 +1704,10 @@ export type CharacterUpdateManyAndReturnArgs + data: Prisma.XOR< + Prisma.CharacterUpdateManyMutationInput, + Prisma.CharacterUncheckedUpdateManyInput + > /** * Filter which Characters to update */ @@ -1411,7 +1725,9 @@ export type CharacterUpdateManyAndReturnArgs = { +export type CharacterUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1441,7 +1757,9 @@ export type CharacterUpsertArgs = { +export type CharacterDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ @@ -1463,7 +1781,9 @@ export type CharacterDeleteArgs = { +export type CharacterDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which Characters to delete */ @@ -1477,7 +1797,9 @@ export type CharacterDeleteManyArgs = { +export type Character$generationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1501,7 +1823,9 @@ export type Character$generationsArgs = { +export type CharacterDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Character */ diff --git a/src/generated/prisma/models/Equipment.ts b/src/generated/prisma/models/Equipment.ts index d948aab..db53ad6 100644 --- a/src/generated/prisma/models/Equipment.ts +++ b/src/generated/prisma/models/Equipment.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -8,9 +7,9 @@ * * 🟢 You can import this file directly. */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.ts" -import type * as Prisma from "../internal/prismaNamespace.ts" +import type * as runtime from '@prisma/client/runtime/client' +import type * as $Enums from '../enums.ts' +import type * as Prisma from '../internal/prismaNamespace.ts' /** * Model Equipment @@ -58,7 +57,6 @@ export type EquipmentCountAggregateOutputType = { _all: number } - export type EquipmentMinAggregateInputType = { id?: true name?: true @@ -93,7 +91,9 @@ export type EquipmentCountAggregateInputType = { _all?: true } -export type EquipmentAggregateArgs = { +export type EquipmentAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which Equipment to aggregate. */ @@ -126,36 +126,37 @@ export type EquipmentAggregateArgs = { - [P in keyof T & keyof AggregateEquipment]: P extends '_count' | 'count' + [P in keyof T & keyof AggregateEquipment]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } - - - -export type EquipmentGroupByArgs = { +export type EquipmentGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.EquipmentWhereInput - orderBy?: Prisma.EquipmentOrderByWithAggregationInput | Prisma.EquipmentOrderByWithAggregationInput[] + orderBy?: + | Prisma.EquipmentOrderByWithAggregationInput + | Prisma.EquipmentOrderByWithAggregationInput[] by: Prisma.EquipmentScalarFieldEnum[] | Prisma.EquipmentScalarFieldEnum having?: Prisma.EquipmentScalarWhereWithAggregatesInput take?: number @@ -181,33 +182,33 @@ export type EquipmentGroupByOutputType = { type GetEquipmentGroupByPayload = Prisma.PrismaPromise< Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof EquipmentGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType + Prisma.PickEnumerable & { + [P in keyof T & keyof EquipmentGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number : Prisma.GetScalarType - } - > + : Prisma.GetScalarType + } > - - +> export type EquipmentWhereInput = { AND?: Prisma.EquipmentWhereInput | Prisma.EquipmentWhereInput[] OR?: Prisma.EquipmentWhereInput[] NOT?: Prisma.EquipmentWhereInput | Prisma.EquipmentWhereInput[] - id?: Prisma.StringFilter<"Equipment"> | string - name?: Prisma.StringFilter<"Equipment"> | string - description?: Prisma.StringFilter<"Equipment"> | string - categoryId?: Prisma.StringFilter<"Equipment"> | string - subCategoryId?: Prisma.StringNullableFilter<"Equipment"> | string | null - imageId?: Prisma.StringFilter<"Equipment"> | string - createdAt?: Prisma.DateTimeFilter<"Equipment"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Equipment"> | Date | string + id?: Prisma.StringFilter<'Equipment'> | string + name?: Prisma.StringFilter<'Equipment'> | string + description?: Prisma.StringFilter<'Equipment'> | string + categoryId?: Prisma.StringFilter<'Equipment'> | string + subCategoryId?: Prisma.StringNullableFilter<'Equipment'> | string | null + imageId?: Prisma.StringFilter<'Equipment'> | string + createdAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string category?: Prisma.XOR - subCategory?: Prisma.XOR | null + subCategory?: Prisma.XOR< + Prisma.CategoryNullableScalarRelationFilter, + Prisma.CategoryWhereInput + > | null image?: Prisma.XOR generations?: Prisma.GenerationEquipmentListRelationFilter } @@ -227,23 +228,29 @@ export type EquipmentOrderByWithRelationInput = { generations?: Prisma.GenerationEquipmentOrderByRelationAggregateInput } -export type EquipmentWhereUniqueInput = Prisma.AtLeast<{ - id?: string - AND?: Prisma.EquipmentWhereInput | Prisma.EquipmentWhereInput[] - OR?: Prisma.EquipmentWhereInput[] - NOT?: Prisma.EquipmentWhereInput | Prisma.EquipmentWhereInput[] - name?: Prisma.StringFilter<"Equipment"> | string - description?: Prisma.StringFilter<"Equipment"> | string - categoryId?: Prisma.StringFilter<"Equipment"> | string - subCategoryId?: Prisma.StringNullableFilter<"Equipment"> | string | null - imageId?: Prisma.StringFilter<"Equipment"> | string - createdAt?: Prisma.DateTimeFilter<"Equipment"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Equipment"> | Date | string - category?: Prisma.XOR - subCategory?: Prisma.XOR | null - image?: Prisma.XOR - generations?: Prisma.GenerationEquipmentListRelationFilter -}, "id"> +export type EquipmentWhereUniqueInput = Prisma.AtLeast< + { + id?: string + AND?: Prisma.EquipmentWhereInput | Prisma.EquipmentWhereInput[] + OR?: Prisma.EquipmentWhereInput[] + NOT?: Prisma.EquipmentWhereInput | Prisma.EquipmentWhereInput[] + name?: Prisma.StringFilter<'Equipment'> | string + description?: Prisma.StringFilter<'Equipment'> | string + categoryId?: Prisma.StringFilter<'Equipment'> | string + subCategoryId?: Prisma.StringNullableFilter<'Equipment'> | string | null + imageId?: Prisma.StringFilter<'Equipment'> | string + createdAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string + category?: Prisma.XOR + subCategory?: Prisma.XOR< + Prisma.CategoryNullableScalarRelationFilter, + Prisma.CategoryWhereInput + > | null + image?: Prisma.XOR + generations?: Prisma.GenerationEquipmentListRelationFilter + }, + 'id' +> export type EquipmentOrderByWithAggregationInput = { id?: Prisma.SortOrder @@ -260,17 +267,21 @@ export type EquipmentOrderByWithAggregationInput = { } export type EquipmentScalarWhereWithAggregatesInput = { - AND?: Prisma.EquipmentScalarWhereWithAggregatesInput | Prisma.EquipmentScalarWhereWithAggregatesInput[] + AND?: + | Prisma.EquipmentScalarWhereWithAggregatesInput + | Prisma.EquipmentScalarWhereWithAggregatesInput[] OR?: Prisma.EquipmentScalarWhereWithAggregatesInput[] - NOT?: Prisma.EquipmentScalarWhereWithAggregatesInput | Prisma.EquipmentScalarWhereWithAggregatesInput[] - id?: Prisma.StringWithAggregatesFilter<"Equipment"> | string - name?: Prisma.StringWithAggregatesFilter<"Equipment"> | string - description?: Prisma.StringWithAggregatesFilter<"Equipment"> | string - categoryId?: Prisma.StringWithAggregatesFilter<"Equipment"> | string - subCategoryId?: Prisma.StringNullableWithAggregatesFilter<"Equipment"> | string | null - imageId?: Prisma.StringWithAggregatesFilter<"Equipment"> | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Equipment"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Equipment"> | Date | string + NOT?: + | Prisma.EquipmentScalarWhereWithAggregatesInput + | Prisma.EquipmentScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<'Equipment'> | string + name?: Prisma.StringWithAggregatesFilter<'Equipment'> | string + description?: Prisma.StringWithAggregatesFilter<'Equipment'> | string + categoryId?: Prisma.StringWithAggregatesFilter<'Equipment'> | string + subCategoryId?: Prisma.StringNullableWithAggregatesFilter<'Equipment'> | string | null + imageId?: Prisma.StringWithAggregatesFilter<'Equipment'> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<'Equipment'> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Equipment'> | Date | string } export type EquipmentCreateInput = { @@ -400,143 +411,287 @@ export type EquipmentScalarRelationFilter = { } export type EquipmentCreateNestedManyWithoutImageInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutImageInput[] | Prisma.EquipmentUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutImageInput | Prisma.EquipmentCreateOrConnectWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > + | Prisma.EquipmentCreateWithoutImageInput[] + | Prisma.EquipmentUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutImageInput + | Prisma.EquipmentCreateOrConnectWithoutImageInput[] createMany?: Prisma.EquipmentCreateManyImageInputEnvelope connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] } export type EquipmentUncheckedCreateNestedManyWithoutImageInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutImageInput[] | Prisma.EquipmentUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutImageInput | Prisma.EquipmentCreateOrConnectWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > + | Prisma.EquipmentCreateWithoutImageInput[] + | Prisma.EquipmentUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutImageInput + | Prisma.EquipmentCreateOrConnectWithoutImageInput[] createMany?: Prisma.EquipmentCreateManyImageInputEnvelope connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] } export type EquipmentUpdateManyWithoutImageNestedInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutImageInput[] | Prisma.EquipmentUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutImageInput | Prisma.EquipmentCreateOrConnectWithoutImageInput[] - upsert?: Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput | Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > + | Prisma.EquipmentCreateWithoutImageInput[] + | Prisma.EquipmentUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutImageInput + | Prisma.EquipmentCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput[] createMany?: Prisma.EquipmentCreateManyImageInputEnvelope set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] - update?: Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput | Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput[] - updateMany?: Prisma.EquipmentUpdateManyWithWhereWithoutImageInput | Prisma.EquipmentUpdateManyWithWhereWithoutImageInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutImageInput + | Prisma.EquipmentUpdateManyWithWhereWithoutImageInput[] deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] } export type EquipmentUncheckedUpdateManyWithoutImageNestedInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutImageInput[] | Prisma.EquipmentUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutImageInput | Prisma.EquipmentCreateOrConnectWithoutImageInput[] - upsert?: Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput | Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > + | Prisma.EquipmentCreateWithoutImageInput[] + | Prisma.EquipmentUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutImageInput + | Prisma.EquipmentCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput[] createMany?: Prisma.EquipmentCreateManyImageInputEnvelope set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] - update?: Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput | Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput[] - updateMany?: Prisma.EquipmentUpdateManyWithWhereWithoutImageInput | Prisma.EquipmentUpdateManyWithWhereWithoutImageInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutImageInput + | Prisma.EquipmentUpdateManyWithWhereWithoutImageInput[] deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] } export type EquipmentCreateNestedManyWithoutCategoryInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutCategoryInput[] | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutCategoryInput | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > + | Prisma.EquipmentCreateWithoutCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] createMany?: Prisma.EquipmentCreateManyCategoryInputEnvelope connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] } export type EquipmentCreateNestedManyWithoutSubCategoryInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutSubCategoryInput[] | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > + | Prisma.EquipmentCreateWithoutSubCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] createMany?: Prisma.EquipmentCreateManySubCategoryInputEnvelope connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] } export type EquipmentUncheckedCreateNestedManyWithoutCategoryInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutCategoryInput[] | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutCategoryInput | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > + | Prisma.EquipmentCreateWithoutCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] createMany?: Prisma.EquipmentCreateManyCategoryInputEnvelope connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] } export type EquipmentUncheckedCreateNestedManyWithoutSubCategoryInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutSubCategoryInput[] | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > + | Prisma.EquipmentCreateWithoutSubCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] createMany?: Prisma.EquipmentCreateManySubCategoryInputEnvelope connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] } export type EquipmentUpdateManyWithoutCategoryNestedInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutCategoryInput[] | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutCategoryInput | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] - upsert?: Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput | Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > + | Prisma.EquipmentCreateWithoutCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput[] createMany?: Prisma.EquipmentCreateManyCategoryInputEnvelope set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] - update?: Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput | Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput[] - updateMany?: Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput | Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput + | Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput[] deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] } export type EquipmentUpdateManyWithoutSubCategoryNestedInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutSubCategoryInput[] | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] - upsert?: Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput | Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > + | Prisma.EquipmentCreateWithoutSubCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput[] createMany?: Prisma.EquipmentCreateManySubCategoryInputEnvelope set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] - update?: Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput | Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput[] - updateMany?: Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput | Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput + | Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput[] deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] } export type EquipmentUncheckedUpdateManyWithoutCategoryNestedInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutCategoryInput[] | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutCategoryInput | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] - upsert?: Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput | Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > + | Prisma.EquipmentCreateWithoutCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput[] createMany?: Prisma.EquipmentCreateManyCategoryInputEnvelope set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] - update?: Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput | Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput[] - updateMany?: Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput | Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput + | Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput[] deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] } export type EquipmentUncheckedUpdateManyWithoutSubCategoryNestedInput = { - create?: Prisma.XOR | Prisma.EquipmentCreateWithoutSubCategoryInput[] | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] - connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] - upsert?: Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput | Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput[] + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > + | Prisma.EquipmentCreateWithoutSubCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput[] createMany?: Prisma.EquipmentCreateManySubCategoryInputEnvelope set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] - update?: Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput | Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput[] - updateMany?: Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput | Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput + | Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput[] deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] } export type EquipmentCreateNestedOneWithoutGenerationsInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.EquipmentCreateWithoutGenerationsInput, + Prisma.EquipmentUncheckedCreateWithoutGenerationsInput + > connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutGenerationsInput connect?: Prisma.EquipmentWhereUniqueInput } export type EquipmentUpdateOneRequiredWithoutGenerationsNestedInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.EquipmentCreateWithoutGenerationsInput, + Prisma.EquipmentUncheckedCreateWithoutGenerationsInput + > connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutGenerationsInput upsert?: Prisma.EquipmentUpsertWithoutGenerationsInput connect?: Prisma.EquipmentWhereUniqueInput - update?: Prisma.XOR, Prisma.EquipmentUncheckedUpdateWithoutGenerationsInput> + update?: Prisma.XOR< + Prisma.XOR< + Prisma.EquipmentUpdateToOneWithWhereWithoutGenerationsInput, + Prisma.EquipmentUpdateWithoutGenerationsInput + >, + Prisma.EquipmentUncheckedUpdateWithoutGenerationsInput + > } export type EquipmentCreateWithoutImageInput = { @@ -563,7 +718,10 @@ export type EquipmentUncheckedCreateWithoutImageInput = { export type EquipmentCreateOrConnectWithoutImageInput = { where: Prisma.EquipmentWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > } export type EquipmentCreateManyImageInputEnvelope = { @@ -572,32 +730,44 @@ export type EquipmentCreateManyImageInputEnvelope = { export type EquipmentUpsertWithWhereUniqueWithoutImageInput = { where: Prisma.EquipmentWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.EquipmentUpdateWithoutImageInput, + Prisma.EquipmentUncheckedUpdateWithoutImageInput + > + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > } export type EquipmentUpdateWithWhereUniqueWithoutImageInput = { where: Prisma.EquipmentWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.EquipmentUpdateWithoutImageInput, + Prisma.EquipmentUncheckedUpdateWithoutImageInput + > } export type EquipmentUpdateManyWithWhereWithoutImageInput = { where: Prisma.EquipmentScalarWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.EquipmentUpdateManyMutationInput, + Prisma.EquipmentUncheckedUpdateManyWithoutImageInput + > } export type EquipmentScalarWhereInput = { AND?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] OR?: Prisma.EquipmentScalarWhereInput[] NOT?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] - id?: Prisma.StringFilter<"Equipment"> | string - name?: Prisma.StringFilter<"Equipment"> | string - description?: Prisma.StringFilter<"Equipment"> | string - categoryId?: Prisma.StringFilter<"Equipment"> | string - subCategoryId?: Prisma.StringNullableFilter<"Equipment"> | string | null - imageId?: Prisma.StringFilter<"Equipment"> | string - createdAt?: Prisma.DateTimeFilter<"Equipment"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Equipment"> | Date | string + id?: Prisma.StringFilter<'Equipment'> | string + name?: Prisma.StringFilter<'Equipment'> | string + description?: Prisma.StringFilter<'Equipment'> | string + categoryId?: Prisma.StringFilter<'Equipment'> | string + subCategoryId?: Prisma.StringNullableFilter<'Equipment'> | string | null + imageId?: Prisma.StringFilter<'Equipment'> | string + createdAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string } export type EquipmentCreateWithoutCategoryInput = { @@ -624,7 +794,10 @@ export type EquipmentUncheckedCreateWithoutCategoryInput = { export type EquipmentCreateOrConnectWithoutCategoryInput = { where: Prisma.EquipmentWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > } export type EquipmentCreateManyCategoryInputEnvelope = { @@ -655,7 +828,10 @@ export type EquipmentUncheckedCreateWithoutSubCategoryInput = { export type EquipmentCreateOrConnectWithoutSubCategoryInput = { where: Prisma.EquipmentWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > } export type EquipmentCreateManySubCategoryInputEnvelope = { @@ -664,34 +840,58 @@ export type EquipmentCreateManySubCategoryInputEnvelope = { export type EquipmentUpsertWithWhereUniqueWithoutCategoryInput = { where: Prisma.EquipmentWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.EquipmentUpdateWithoutCategoryInput, + Prisma.EquipmentUncheckedUpdateWithoutCategoryInput + > + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > } export type EquipmentUpdateWithWhereUniqueWithoutCategoryInput = { where: Prisma.EquipmentWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.EquipmentUpdateWithoutCategoryInput, + Prisma.EquipmentUncheckedUpdateWithoutCategoryInput + > } export type EquipmentUpdateManyWithWhereWithoutCategoryInput = { where: Prisma.EquipmentScalarWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.EquipmentUpdateManyMutationInput, + Prisma.EquipmentUncheckedUpdateManyWithoutCategoryInput + > } export type EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput = { where: Prisma.EquipmentWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.EquipmentUpdateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedUpdateWithoutSubCategoryInput + > + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > } export type EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput = { where: Prisma.EquipmentWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.EquipmentUpdateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedUpdateWithoutSubCategoryInput + > } export type EquipmentUpdateManyWithWhereWithoutSubCategoryInput = { where: Prisma.EquipmentScalarWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.EquipmentUpdateManyMutationInput, + Prisma.EquipmentUncheckedUpdateManyWithoutSubCategoryInput + > } export type EquipmentCreateWithoutGenerationsInput = { @@ -718,18 +918,30 @@ export type EquipmentUncheckedCreateWithoutGenerationsInput = { export type EquipmentCreateOrConnectWithoutGenerationsInput = { where: Prisma.EquipmentWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutGenerationsInput, + Prisma.EquipmentUncheckedCreateWithoutGenerationsInput + > } export type EquipmentUpsertWithoutGenerationsInput = { - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.EquipmentUpdateWithoutGenerationsInput, + Prisma.EquipmentUncheckedUpdateWithoutGenerationsInput + > + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutGenerationsInput, + Prisma.EquipmentUncheckedCreateWithoutGenerationsInput + > where?: Prisma.EquipmentWhereInput } export type EquipmentUpdateToOneWithWhereWithoutGenerationsInput = { where?: Prisma.EquipmentWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.EquipmentUpdateWithoutGenerationsInput, + Prisma.EquipmentUncheckedUpdateWithoutGenerationsInput + > } export type EquipmentUpdateWithoutGenerationsInput = { @@ -880,7 +1092,6 @@ export type EquipmentUncheckedUpdateManyWithoutSubCategoryInput = { updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } - /** * Count Type EquipmentCountOutputType */ @@ -889,14 +1100,18 @@ export type EquipmentCountOutputType = { generations: number } -export type EquipmentCountOutputTypeSelect = { +export type EquipmentCountOutputTypeSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { generations?: boolean | EquipmentCountOutputTypeCountGenerationsArgs } /** * EquipmentCountOutputType without action */ -export type EquipmentCountOutputTypeDefaultArgs = { +export type EquipmentCountOutputTypeDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the EquipmentCountOutputType */ @@ -906,54 +1121,70 @@ export type EquipmentCountOutputTypeDefaultArgs = { +export type EquipmentCountOutputTypeCountGenerationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.GenerationEquipmentWhereInput } +export type EquipmentSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + categoryId?: boolean + subCategoryId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + category?: boolean | Prisma.CategoryDefaultArgs + subCategory?: boolean | Prisma.Equipment$subCategoryArgs + image?: boolean | Prisma.AssetDefaultArgs + generations?: boolean | Prisma.Equipment$generationsArgs + _count?: boolean | Prisma.EquipmentCountOutputTypeDefaultArgs + }, + ExtArgs['result']['equipment'] +> -export type EquipmentSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - description?: boolean - categoryId?: boolean - subCategoryId?: boolean - imageId?: boolean - createdAt?: boolean - updatedAt?: boolean - category?: boolean | Prisma.CategoryDefaultArgs - subCategory?: boolean | Prisma.Equipment$subCategoryArgs - image?: boolean | Prisma.AssetDefaultArgs - generations?: boolean | Prisma.Equipment$generationsArgs - _count?: boolean | Prisma.EquipmentCountOutputTypeDefaultArgs -}, ExtArgs["result"]["equipment"]> +export type EquipmentSelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + categoryId?: boolean + subCategoryId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + category?: boolean | Prisma.CategoryDefaultArgs + subCategory?: boolean | Prisma.Equipment$subCategoryArgs + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['equipment'] +> -export type EquipmentSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - description?: boolean - categoryId?: boolean - subCategoryId?: boolean - imageId?: boolean - createdAt?: boolean - updatedAt?: boolean - category?: boolean | Prisma.CategoryDefaultArgs - subCategory?: boolean | Prisma.Equipment$subCategoryArgs - image?: boolean | Prisma.AssetDefaultArgs -}, ExtArgs["result"]["equipment"]> - -export type EquipmentSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - description?: boolean - categoryId?: boolean - subCategoryId?: boolean - imageId?: boolean - createdAt?: boolean - updatedAt?: boolean - category?: boolean | Prisma.CategoryDefaultArgs - subCategory?: boolean | Prisma.Equipment$subCategoryArgs - image?: boolean | Prisma.AssetDefaultArgs -}, ExtArgs["result"]["equipment"]> +export type EquipmentSelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + categoryId?: boolean + subCategoryId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + category?: boolean | Prisma.CategoryDefaultArgs + subCategory?: boolean | Prisma.Equipment$subCategoryArgs + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['equipment'] +> export type EquipmentSelectScalar = { id?: boolean @@ -966,55 +1197,83 @@ export type EquipmentSelectScalar = { updatedAt?: boolean } -export type EquipmentOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "categoryId" | "subCategoryId" | "imageId" | "createdAt" | "updatedAt", ExtArgs["result"]["equipment"]> -export type EquipmentInclude = { +export type EquipmentOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + | 'id' + | 'name' + | 'description' + | 'categoryId' + | 'subCategoryId' + | 'imageId' + | 'createdAt' + | 'updatedAt', + ExtArgs['result']['equipment'] +> +export type EquipmentInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { category?: boolean | Prisma.CategoryDefaultArgs subCategory?: boolean | Prisma.Equipment$subCategoryArgs image?: boolean | Prisma.AssetDefaultArgs generations?: boolean | Prisma.Equipment$generationsArgs _count?: boolean | Prisma.EquipmentCountOutputTypeDefaultArgs } -export type EquipmentIncludeCreateManyAndReturn = { +export type EquipmentIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { category?: boolean | Prisma.CategoryDefaultArgs subCategory?: boolean | Prisma.Equipment$subCategoryArgs image?: boolean | Prisma.AssetDefaultArgs } -export type EquipmentIncludeUpdateManyAndReturn = { +export type EquipmentIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { category?: boolean | Prisma.CategoryDefaultArgs subCategory?: boolean | Prisma.Equipment$subCategoryArgs image?: boolean | Prisma.AssetDefaultArgs } -export type $EquipmentPayload = { - name: "Equipment" +export type $EquipmentPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'Equipment' objects: { category: Prisma.$CategoryPayload subCategory: Prisma.$CategoryPayload | null image: Prisma.$AssetPayload generations: Prisma.$GenerationEquipmentPayload[] } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: string - name: string - description: string - categoryId: string - subCategoryId: string | null - imageId: string - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["equipment"]> + scalars: runtime.Types.Extensions.GetPayloadResult< + { + id: string + name: string + description: string + categoryId: string + subCategoryId: string | null + imageId: string + createdAt: Date + updatedAt: Date + }, + ExtArgs['result']['equipment'] + > composites: {} } -export type EquipmentGetPayload = runtime.Types.Result.GetResult +export type EquipmentGetPayload = + runtime.Types.Result.GetResult -export type EquipmentCountArgs = - Omit & { - select?: EquipmentCountAggregateInputType | true - } +export type EquipmentCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: EquipmentCountAggregateInputType | true +} -export interface EquipmentDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Equipment'], meta: { name: 'Equipment' } } +export interface EquipmentDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { types: Prisma.TypeMap['model']['Equipment']; meta: { name: 'Equipment' } } /** * Find zero or one Equipment that matches the filter. * @param {EquipmentFindUniqueArgs} args - Arguments to find a Equipment @@ -1026,7 +1285,19 @@ export interface EquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__EquipmentClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find one Equipment that matches the filter or throw an error with `error.code='P2025'` @@ -1040,7 +1311,19 @@ export interface EquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__EquipmentClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find the first Equipment that matches the filter. @@ -1055,7 +1338,19 @@ export interface EquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__EquipmentClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find the first Equipment that matches the filter or @@ -1071,7 +1366,19 @@ export interface EquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__EquipmentClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find zero or more Equipment that matches the filter. @@ -1089,7 +1396,16 @@ export interface EquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findMany', + GlobalOmitOptions + > + > /** * Create a Equipment. @@ -1103,7 +1419,19 @@ export interface EquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__EquipmentClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'create', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Create many Equipment. @@ -1117,7 +1445,9 @@ export interface EquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Create many Equipment and returns the data saved in the database. @@ -1141,7 +1471,16 @@ export interface EquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + createManyAndReturn( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > /** * Delete a Equipment. @@ -1155,7 +1494,19 @@ export interface EquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__EquipmentClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'delete', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Update one Equipment. @@ -1172,7 +1523,19 @@ export interface EquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__EquipmentClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'update', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Delete zero or more Equipment. @@ -1186,7 +1549,9 @@ export interface EquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more Equipment. @@ -1205,7 +1570,9 @@ export interface EquipmentDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more Equipment and returns the data updated in the database. @@ -1235,7 +1602,16 @@ export interface EquipmentDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + updateManyAndReturn( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > /** * Create or update one Equipment. @@ -1254,8 +1630,19 @@ export interface EquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__EquipmentClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'upsert', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Count the number of Equipment. @@ -1269,7 +1656,7 @@ export interface EquipmentDelegate( args?: Prisma.Subset, ): Prisma.PrismaPromise< @@ -1303,8 +1690,10 @@ export interface EquipmentDelegate(args: Prisma.Subset): Prisma.PrismaPromise> + **/ + aggregate( + args: Prisma.Subset, + ): Prisma.PrismaPromise> /** * Group by Equipment. @@ -1323,7 +1712,7 @@ export interface EquipmentDelegate>>, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetEquipmentGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Equipment model - */ -readonly fields: EquipmentFieldRefs; + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields], + >( + args: Prisma.SubsetIntersection & InputErrors, + ): {} extends InputErrors ? GetEquipmentGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Equipment model + */ + readonly fields: EquipmentFieldRefs } /** @@ -1394,25 +1782,83 @@ readonly fields: EquipmentFieldRefs; * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ -export interface Prisma__EquipmentClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - category = {}>(args?: Prisma.Subset>): Prisma.Prisma__CategoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - subCategory = {}>(args?: Prisma.Subset>): Prisma.Prisma__CategoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - image = {}>(args?: Prisma.Subset>): Prisma.Prisma__AssetClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - generations = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> +export interface Prisma__EquipmentClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + category = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__CategoryClient< + | runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + subCategory = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + image = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__AssetClient< + | runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + generations = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + 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): runtime.Types.Utils.JsPromise + then( + onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + catch( + onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. @@ -1422,29 +1868,27 @@ export interface Prisma__EquipmentClient void) | undefined | null): runtime.Types.Utils.JsPromise } - - - /** * Fields of the Equipment model */ export interface EquipmentFieldRefs { - readonly id: Prisma.FieldRef<"Equipment", 'String'> - readonly name: Prisma.FieldRef<"Equipment", 'String'> - readonly description: Prisma.FieldRef<"Equipment", 'String'> - readonly categoryId: Prisma.FieldRef<"Equipment", 'String'> - readonly subCategoryId: Prisma.FieldRef<"Equipment", 'String'> - readonly imageId: Prisma.FieldRef<"Equipment", 'String'> - readonly createdAt: Prisma.FieldRef<"Equipment", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Equipment", 'DateTime'> + readonly id: Prisma.FieldRef<'Equipment', 'String'> + readonly name: Prisma.FieldRef<'Equipment', 'String'> + readonly description: Prisma.FieldRef<'Equipment', 'String'> + readonly categoryId: Prisma.FieldRef<'Equipment', 'String'> + readonly subCategoryId: Prisma.FieldRef<'Equipment', 'String'> + readonly imageId: Prisma.FieldRef<'Equipment', 'String'> + readonly createdAt: Prisma.FieldRef<'Equipment', 'DateTime'> + readonly updatedAt: Prisma.FieldRef<'Equipment', 'DateTime'> } - // Custom InputTypes /** * Equipment findUnique */ -export type EquipmentFindUniqueArgs = { +export type EquipmentFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1466,7 +1910,9 @@ export type EquipmentFindUniqueArgs = { +export type EquipmentFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1488,7 +1934,9 @@ export type EquipmentFindUniqueOrThrowArgs = { +export type EquipmentFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1540,7 +1988,9 @@ export type EquipmentFindFirstArgs = { +export type EquipmentFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1592,7 +2042,9 @@ export type EquipmentFindFirstOrThrowArgs = { +export type EquipmentFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1639,7 +2091,9 @@ export type EquipmentFindManyArgs = { +export type EquipmentCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1661,7 +2115,9 @@ export type EquipmentCreateArgs = { +export type EquipmentCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to create many Equipment. */ @@ -1671,7 +2127,9 @@ export type EquipmentCreateManyArgs = { +export type EquipmentCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1693,7 +2151,9 @@ export type EquipmentCreateManyAndReturnArgs = { +export type EquipmentUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1719,11 +2179,16 @@ export type EquipmentUpdateArgs = { +export type EquipmentUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to update Equipment. */ - data: Prisma.XOR + data: Prisma.XOR< + Prisma.EquipmentUpdateManyMutationInput, + Prisma.EquipmentUncheckedUpdateManyInput + > /** * Filter which Equipment to update */ @@ -1737,7 +2202,9 @@ export type EquipmentUpdateManyArgs = { +export type EquipmentUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1749,7 +2216,10 @@ export type EquipmentUpdateManyAndReturnArgs + data: Prisma.XOR< + Prisma.EquipmentUpdateManyMutationInput, + Prisma.EquipmentUncheckedUpdateManyInput + > /** * Filter which Equipment to update */ @@ -1767,7 +2237,9 @@ export type EquipmentUpdateManyAndReturnArgs = { +export type EquipmentUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1797,7 +2269,9 @@ export type EquipmentUpsertArgs = { +export type EquipmentDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ @@ -1819,7 +2293,9 @@ export type EquipmentDeleteArgs = { +export type EquipmentDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which Equipment to delete */ @@ -1833,7 +2309,9 @@ export type EquipmentDeleteManyArgs = { +export type Equipment$subCategoryArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Category */ @@ -1852,7 +2330,9 @@ export type Equipment$subCategoryArgs = { +export type Equipment$generationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1866,7 +2346,9 @@ export type Equipment$generationsArgs | null where?: Prisma.GenerationEquipmentWhereInput - orderBy?: Prisma.GenerationEquipmentOrderByWithRelationInput | Prisma.GenerationEquipmentOrderByWithRelationInput[] + orderBy?: + | Prisma.GenerationEquipmentOrderByWithRelationInput + | Prisma.GenerationEquipmentOrderByWithRelationInput[] cursor?: Prisma.GenerationEquipmentWhereUniqueInput take?: number skip?: number @@ -1876,7 +2358,9 @@ export type Equipment$generationsArgs = { +export type EquipmentDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Equipment */ diff --git a/src/generated/prisma/models/Generation.ts b/src/generated/prisma/models/Generation.ts index 80a842d..dddf718 100644 --- a/src/generated/prisma/models/Generation.ts +++ b/src/generated/prisma/models/Generation.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -8,9 +7,9 @@ * * 🟢 You can import this file directly. */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.ts" -import type * as Prisma from "../internal/prismaNamespace.ts" +import type * as runtime from '@prisma/client/runtime/client' +import type * as $Enums from '../enums.ts' +import type * as Prisma from '../internal/prismaNamespace.ts' /** * Model Generation @@ -49,7 +48,6 @@ export type GenerationCountAggregateOutputType = { _all: number } - export type GenerationMinAggregateInputType = { id?: true characterId?: true @@ -75,7 +73,9 @@ export type GenerationCountAggregateInputType = { _all?: true } -export type GenerationAggregateArgs = { +export type GenerationAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which Generation to aggregate. */ @@ -108,36 +108,37 @@ export type GenerationAggregateArgs = { - [P in keyof T & keyof AggregateGeneration]: P extends '_count' | 'count' + [P in keyof T & keyof AggregateGeneration]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } - - - -export type GenerationGroupByArgs = { +export type GenerationGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.GenerationWhereInput - orderBy?: Prisma.GenerationOrderByWithAggregationInput | Prisma.GenerationOrderByWithAggregationInput[] + orderBy?: + | Prisma.GenerationOrderByWithAggregationInput + | Prisma.GenerationOrderByWithAggregationInput[] by: Prisma.GenerationScalarFieldEnum[] | Prisma.GenerationScalarFieldEnum having?: Prisma.GenerationScalarWhereWithAggregatesInput take?: number @@ -160,28 +161,25 @@ export type GenerationGroupByOutputType = { type GetGenerationGroupByPayload = Prisma.PrismaPromise< Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof GenerationGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType + Prisma.PickEnumerable & { + [P in keyof T & keyof GenerationGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number : Prisma.GetScalarType - } - > + : Prisma.GetScalarType + } > - - +> export type GenerationWhereInput = { AND?: Prisma.GenerationWhereInput | Prisma.GenerationWhereInput[] OR?: Prisma.GenerationWhereInput[] NOT?: Prisma.GenerationWhereInput | Prisma.GenerationWhereInput[] - id?: Prisma.StringFilter<"Generation"> | string - characterId?: Prisma.StringFilter<"Generation"> | string - imageId?: Prisma.StringFilter<"Generation"> | string - createdAt?: Prisma.DateTimeFilter<"Generation"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Generation"> | Date | string + id?: Prisma.StringFilter<'Generation'> | string + characterId?: Prisma.StringFilter<'Generation'> | string + imageId?: Prisma.StringFilter<'Generation'> | string + createdAt?: Prisma.DateTimeFilter<'Generation'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Generation'> | Date | string character?: Prisma.XOR image?: Prisma.XOR equipments?: Prisma.GenerationEquipmentListRelationFilter @@ -198,19 +196,22 @@ export type GenerationOrderByWithRelationInput = { equipments?: Prisma.GenerationEquipmentOrderByRelationAggregateInput } -export type GenerationWhereUniqueInput = Prisma.AtLeast<{ - id?: string - AND?: Prisma.GenerationWhereInput | Prisma.GenerationWhereInput[] - OR?: Prisma.GenerationWhereInput[] - NOT?: Prisma.GenerationWhereInput | Prisma.GenerationWhereInput[] - characterId?: Prisma.StringFilter<"Generation"> | string - imageId?: Prisma.StringFilter<"Generation"> | string - createdAt?: Prisma.DateTimeFilter<"Generation"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Generation"> | Date | string - character?: Prisma.XOR - image?: Prisma.XOR - equipments?: Prisma.GenerationEquipmentListRelationFilter -}, "id"> +export type GenerationWhereUniqueInput = Prisma.AtLeast< + { + id?: string + AND?: Prisma.GenerationWhereInput | Prisma.GenerationWhereInput[] + OR?: Prisma.GenerationWhereInput[] + NOT?: Prisma.GenerationWhereInput | Prisma.GenerationWhereInput[] + characterId?: Prisma.StringFilter<'Generation'> | string + imageId?: Prisma.StringFilter<'Generation'> | string + createdAt?: Prisma.DateTimeFilter<'Generation'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Generation'> | Date | string + character?: Prisma.XOR + image?: Prisma.XOR + equipments?: Prisma.GenerationEquipmentListRelationFilter + }, + 'id' +> export type GenerationOrderByWithAggregationInput = { id?: Prisma.SortOrder @@ -224,14 +225,18 @@ export type GenerationOrderByWithAggregationInput = { } export type GenerationScalarWhereWithAggregatesInput = { - AND?: Prisma.GenerationScalarWhereWithAggregatesInput | Prisma.GenerationScalarWhereWithAggregatesInput[] + AND?: + | Prisma.GenerationScalarWhereWithAggregatesInput + | Prisma.GenerationScalarWhereWithAggregatesInput[] OR?: Prisma.GenerationScalarWhereWithAggregatesInput[] - NOT?: Prisma.GenerationScalarWhereWithAggregatesInput | Prisma.GenerationScalarWhereWithAggregatesInput[] - id?: Prisma.StringWithAggregatesFilter<"Generation"> | string - characterId?: Prisma.StringWithAggregatesFilter<"Generation"> | string - imageId?: Prisma.StringWithAggregatesFilter<"Generation"> | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Generation"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Generation"> | Date | string + NOT?: + | Prisma.GenerationScalarWhereWithAggregatesInput + | Prisma.GenerationScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<'Generation'> | string + characterId?: Prisma.StringWithAggregatesFilter<'Generation'> | string + imageId?: Prisma.StringWithAggregatesFilter<'Generation'> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<'Generation'> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Generation'> | Date | string } export type GenerationCreateInput = { @@ -332,101 +337,201 @@ export type GenerationScalarRelationFilter = { } export type GenerationCreateNestedManyWithoutImageInput = { - create?: Prisma.XOR | Prisma.GenerationCreateWithoutImageInput[] | Prisma.GenerationUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutImageInput | Prisma.GenerationCreateOrConnectWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > + | Prisma.GenerationCreateWithoutImageInput[] + | Prisma.GenerationUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutImageInput + | Prisma.GenerationCreateOrConnectWithoutImageInput[] createMany?: Prisma.GenerationCreateManyImageInputEnvelope connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] } export type GenerationUncheckedCreateNestedManyWithoutImageInput = { - create?: Prisma.XOR | Prisma.GenerationCreateWithoutImageInput[] | Prisma.GenerationUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutImageInput | Prisma.GenerationCreateOrConnectWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > + | Prisma.GenerationCreateWithoutImageInput[] + | Prisma.GenerationUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutImageInput + | Prisma.GenerationCreateOrConnectWithoutImageInput[] createMany?: Prisma.GenerationCreateManyImageInputEnvelope connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] } export type GenerationUpdateManyWithoutImageNestedInput = { - create?: Prisma.XOR | Prisma.GenerationCreateWithoutImageInput[] | Prisma.GenerationUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutImageInput | Prisma.GenerationCreateOrConnectWithoutImageInput[] - upsert?: Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput | Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > + | Prisma.GenerationCreateWithoutImageInput[] + | Prisma.GenerationUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutImageInput + | Prisma.GenerationCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput + | Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput[] createMany?: Prisma.GenerationCreateManyImageInputEnvelope set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] - update?: Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput | Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput[] - updateMany?: Prisma.GenerationUpdateManyWithWhereWithoutImageInput | Prisma.GenerationUpdateManyWithWhereWithoutImageInput[] + update?: + | Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput + | Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.GenerationUpdateManyWithWhereWithoutImageInput + | Prisma.GenerationUpdateManyWithWhereWithoutImageInput[] deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] } export type GenerationUncheckedUpdateManyWithoutImageNestedInput = { - create?: Prisma.XOR | Prisma.GenerationCreateWithoutImageInput[] | Prisma.GenerationUncheckedCreateWithoutImageInput[] - connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutImageInput | Prisma.GenerationCreateOrConnectWithoutImageInput[] - upsert?: Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput | Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput[] + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > + | Prisma.GenerationCreateWithoutImageInput[] + | Prisma.GenerationUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutImageInput + | Prisma.GenerationCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput + | Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput[] createMany?: Prisma.GenerationCreateManyImageInputEnvelope set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] - update?: Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput | Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput[] - updateMany?: Prisma.GenerationUpdateManyWithWhereWithoutImageInput | Prisma.GenerationUpdateManyWithWhereWithoutImageInput[] + update?: + | Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput + | Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.GenerationUpdateManyWithWhereWithoutImageInput + | Prisma.GenerationUpdateManyWithWhereWithoutImageInput[] deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] } export type GenerationCreateNestedManyWithoutCharacterInput = { - create?: Prisma.XOR | Prisma.GenerationCreateWithoutCharacterInput[] | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] - connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutCharacterInput | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > + | Prisma.GenerationCreateWithoutCharacterInput[] + | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutCharacterInput + | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] createMany?: Prisma.GenerationCreateManyCharacterInputEnvelope connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] } export type GenerationUncheckedCreateNestedManyWithoutCharacterInput = { - create?: Prisma.XOR | Prisma.GenerationCreateWithoutCharacterInput[] | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] - connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutCharacterInput | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > + | Prisma.GenerationCreateWithoutCharacterInput[] + | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutCharacterInput + | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] createMany?: Prisma.GenerationCreateManyCharacterInputEnvelope connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] } export type GenerationUpdateManyWithoutCharacterNestedInput = { - create?: Prisma.XOR | Prisma.GenerationCreateWithoutCharacterInput[] | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] - connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutCharacterInput | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] - upsert?: Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput | Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput[] + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > + | Prisma.GenerationCreateWithoutCharacterInput[] + | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutCharacterInput + | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] + upsert?: + | Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput + | Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput[] createMany?: Prisma.GenerationCreateManyCharacterInputEnvelope set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] - update?: Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput | Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput[] - updateMany?: Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput | Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput[] + update?: + | Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput + | Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput[] + updateMany?: + | Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput + | Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput[] deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] } export type GenerationUncheckedUpdateManyWithoutCharacterNestedInput = { - create?: Prisma.XOR | Prisma.GenerationCreateWithoutCharacterInput[] | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] - connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutCharacterInput | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] - upsert?: Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput | Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput[] + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > + | Prisma.GenerationCreateWithoutCharacterInput[] + | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutCharacterInput + | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] + upsert?: + | Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput + | Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput[] createMany?: Prisma.GenerationCreateManyCharacterInputEnvelope set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] - update?: Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput | Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput[] - updateMany?: Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput | Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput[] + update?: + | Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput + | Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput[] + updateMany?: + | Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput + | Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput[] deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] } export type GenerationCreateNestedOneWithoutEquipmentsInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.GenerationCreateWithoutEquipmentsInput, + Prisma.GenerationUncheckedCreateWithoutEquipmentsInput + > connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutEquipmentsInput connect?: Prisma.GenerationWhereUniqueInput } export type GenerationUpdateOneRequiredWithoutEquipmentsNestedInput = { - create?: Prisma.XOR + create?: Prisma.XOR< + Prisma.GenerationCreateWithoutEquipmentsInput, + Prisma.GenerationUncheckedCreateWithoutEquipmentsInput + > connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutEquipmentsInput upsert?: Prisma.GenerationUpsertWithoutEquipmentsInput connect?: Prisma.GenerationWhereUniqueInput - update?: Prisma.XOR, Prisma.GenerationUncheckedUpdateWithoutEquipmentsInput> + update?: Prisma.XOR< + Prisma.XOR< + Prisma.GenerationUpdateToOneWithWhereWithoutEquipmentsInput, + Prisma.GenerationUpdateWithoutEquipmentsInput + >, + Prisma.GenerationUncheckedUpdateWithoutEquipmentsInput + > } export type GenerationCreateWithoutImageInput = { @@ -447,7 +552,10 @@ export type GenerationUncheckedCreateWithoutImageInput = { export type GenerationCreateOrConnectWithoutImageInput = { where: Prisma.GenerationWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > } export type GenerationCreateManyImageInputEnvelope = { @@ -456,29 +564,41 @@ export type GenerationCreateManyImageInputEnvelope = { export type GenerationUpsertWithWhereUniqueWithoutImageInput = { where: Prisma.GenerationWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.GenerationUpdateWithoutImageInput, + Prisma.GenerationUncheckedUpdateWithoutImageInput + > + create: Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > } export type GenerationUpdateWithWhereUniqueWithoutImageInput = { where: Prisma.GenerationWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationUpdateWithoutImageInput, + Prisma.GenerationUncheckedUpdateWithoutImageInput + > } export type GenerationUpdateManyWithWhereWithoutImageInput = { where: Prisma.GenerationScalarWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationUpdateManyMutationInput, + Prisma.GenerationUncheckedUpdateManyWithoutImageInput + > } export type GenerationScalarWhereInput = { AND?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] OR?: Prisma.GenerationScalarWhereInput[] NOT?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] - id?: Prisma.StringFilter<"Generation"> | string - characterId?: Prisma.StringFilter<"Generation"> | string - imageId?: Prisma.StringFilter<"Generation"> | string - createdAt?: Prisma.DateTimeFilter<"Generation"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Generation"> | Date | string + id?: Prisma.StringFilter<'Generation'> | string + characterId?: Prisma.StringFilter<'Generation'> | string + imageId?: Prisma.StringFilter<'Generation'> | string + createdAt?: Prisma.DateTimeFilter<'Generation'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Generation'> | Date | string } export type GenerationCreateWithoutCharacterInput = { @@ -499,7 +619,10 @@ export type GenerationUncheckedCreateWithoutCharacterInput = { export type GenerationCreateOrConnectWithoutCharacterInput = { where: Prisma.GenerationWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > } export type GenerationCreateManyCharacterInputEnvelope = { @@ -508,18 +631,30 @@ export type GenerationCreateManyCharacterInputEnvelope = { export type GenerationUpsertWithWhereUniqueWithoutCharacterInput = { where: Prisma.GenerationWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.GenerationUpdateWithoutCharacterInput, + Prisma.GenerationUncheckedUpdateWithoutCharacterInput + > + create: Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > } export type GenerationUpdateWithWhereUniqueWithoutCharacterInput = { where: Prisma.GenerationWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationUpdateWithoutCharacterInput, + Prisma.GenerationUncheckedUpdateWithoutCharacterInput + > } export type GenerationUpdateManyWithWhereWithoutCharacterInput = { where: Prisma.GenerationScalarWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationUpdateManyMutationInput, + Prisma.GenerationUncheckedUpdateManyWithoutCharacterInput + > } export type GenerationCreateWithoutEquipmentsInput = { @@ -540,18 +675,30 @@ export type GenerationUncheckedCreateWithoutEquipmentsInput = { export type GenerationCreateOrConnectWithoutEquipmentsInput = { where: Prisma.GenerationWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.GenerationCreateWithoutEquipmentsInput, + Prisma.GenerationUncheckedCreateWithoutEquipmentsInput + > } export type GenerationUpsertWithoutEquipmentsInput = { - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.GenerationUpdateWithoutEquipmentsInput, + Prisma.GenerationUncheckedUpdateWithoutEquipmentsInput + > + create: Prisma.XOR< + Prisma.GenerationCreateWithoutEquipmentsInput, + Prisma.GenerationUncheckedCreateWithoutEquipmentsInput + > where?: Prisma.GenerationWhereInput } export type GenerationUpdateToOneWithWhereWithoutEquipmentsInput = { where?: Prisma.GenerationWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationUpdateWithoutEquipmentsInput, + Prisma.GenerationUncheckedUpdateWithoutEquipmentsInput + > } export type GenerationUpdateWithoutEquipmentsInput = { @@ -630,7 +777,6 @@ export type GenerationUncheckedUpdateManyWithoutCharacterInput = { updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } - /** * Count Type GenerationCountOutputType */ @@ -639,14 +785,18 @@ export type GenerationCountOutputType = { equipments: number } -export type GenerationCountOutputTypeSelect = { +export type GenerationCountOutputTypeSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { equipments?: boolean | GenerationCountOutputTypeCountEquipmentsArgs } /** * GenerationCountOutputType without action */ -export type GenerationCountOutputTypeDefaultArgs = { +export type GenerationCountOutputTypeDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationCountOutputType */ @@ -656,42 +806,58 @@ export type GenerationCountOutputTypeDefaultArgs = { +export type GenerationCountOutputTypeCountEquipmentsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.GenerationEquipmentWhereInput } +export type GenerationSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + characterId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + character?: boolean | Prisma.CharacterDefaultArgs + image?: boolean | Prisma.AssetDefaultArgs + equipments?: boolean | Prisma.Generation$equipmentsArgs + _count?: boolean | Prisma.GenerationCountOutputTypeDefaultArgs + }, + ExtArgs['result']['generation'] +> -export type GenerationSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - characterId?: boolean - imageId?: boolean - createdAt?: boolean - updatedAt?: boolean - character?: boolean | Prisma.CharacterDefaultArgs - image?: boolean | Prisma.AssetDefaultArgs - equipments?: boolean | Prisma.Generation$equipmentsArgs - _count?: boolean | Prisma.GenerationCountOutputTypeDefaultArgs -}, ExtArgs["result"]["generation"]> +export type GenerationSelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + characterId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + character?: boolean | Prisma.CharacterDefaultArgs + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['generation'] +> -export type GenerationSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - characterId?: boolean - imageId?: boolean - createdAt?: boolean - updatedAt?: boolean - character?: boolean | Prisma.CharacterDefaultArgs - image?: boolean | Prisma.AssetDefaultArgs -}, ExtArgs["result"]["generation"]> - -export type GenerationSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - characterId?: boolean - imageId?: boolean - createdAt?: boolean - updatedAt?: boolean - character?: boolean | Prisma.CharacterDefaultArgs - image?: boolean | Prisma.AssetDefaultArgs -}, ExtArgs["result"]["generation"]> +export type GenerationSelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + characterId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + character?: boolean | Prisma.CharacterDefaultArgs + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['generation'] +> export type GenerationSelectScalar = { id?: boolean @@ -701,48 +867,72 @@ export type GenerationSelectScalar = { updatedAt?: boolean } -export type GenerationOmit = runtime.Types.Extensions.GetOmit<"id" | "characterId" | "imageId" | "createdAt" | "updatedAt", ExtArgs["result"]["generation"]> -export type GenerationInclude = { +export type GenerationOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + 'id' | 'characterId' | 'imageId' | 'createdAt' | 'updatedAt', + ExtArgs['result']['generation'] +> +export type GenerationInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { character?: boolean | Prisma.CharacterDefaultArgs image?: boolean | Prisma.AssetDefaultArgs equipments?: boolean | Prisma.Generation$equipmentsArgs _count?: boolean | Prisma.GenerationCountOutputTypeDefaultArgs } -export type GenerationIncludeCreateManyAndReturn = { +export type GenerationIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { character?: boolean | Prisma.CharacterDefaultArgs image?: boolean | Prisma.AssetDefaultArgs } -export type GenerationIncludeUpdateManyAndReturn = { +export type GenerationIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { character?: boolean | Prisma.CharacterDefaultArgs image?: boolean | Prisma.AssetDefaultArgs } -export type $GenerationPayload = { - name: "Generation" +export type $GenerationPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'Generation' objects: { character: Prisma.$CharacterPayload image: Prisma.$AssetPayload equipments: Prisma.$GenerationEquipmentPayload[] } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: string - characterId: string - imageId: string - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["generation"]> + scalars: runtime.Types.Extensions.GetPayloadResult< + { + id: string + characterId: string + imageId: string + createdAt: Date + updatedAt: Date + }, + ExtArgs['result']['generation'] + > composites: {} } -export type GenerationGetPayload = runtime.Types.Result.GetResult +export type GenerationGetPayload = + runtime.Types.Result.GetResult -export type GenerationCountArgs = - Omit & { - select?: GenerationCountAggregateInputType | true +export type GenerationCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: GenerationCountAggregateInputType | true +} + +export interface GenerationDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { + types: Prisma.TypeMap['model']['Generation'] + meta: { name: 'Generation' } } - -export interface GenerationDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Generation'], meta: { name: 'Generation' } } /** * Find zero or one Generation that matches the filter. * @param {GenerationFindUniqueArgs} args - Arguments to find a Generation @@ -754,7 +944,19 @@ export interface GenerationDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find one Generation that matches the filter or throw an error with `error.code='P2025'` @@ -768,7 +970,19 @@ export interface GenerationDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find the first Generation that matches the filter. @@ -783,7 +997,19 @@ export interface GenerationDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__GenerationClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find the first Generation that matches the filter or @@ -799,7 +1025,19 @@ export interface GenerationDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__GenerationClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find zero or more Generations that matches the filter. @@ -817,7 +1055,16 @@ export interface GenerationDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findMany', + GlobalOmitOptions + > + > /** * Create a Generation. @@ -831,7 +1078,19 @@ export interface GenerationDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'create', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Create many Generations. @@ -845,7 +1104,9 @@ export interface GenerationDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Create many Generations and returns the data saved in the database. @@ -869,7 +1130,16 @@ export interface GenerationDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + createManyAndReturn( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > /** * Delete a Generation. @@ -883,7 +1153,19 @@ export interface GenerationDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'delete', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Update one Generation. @@ -900,7 +1182,19 @@ export interface GenerationDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'update', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Delete zero or more Generations. @@ -914,7 +1208,9 @@ export interface GenerationDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more Generations. @@ -933,7 +1229,9 @@ export interface GenerationDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more Generations and returns the data updated in the database. @@ -963,7 +1261,16 @@ export interface GenerationDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + updateManyAndReturn( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > /** * Create or update one Generation. @@ -982,8 +1289,19 @@ export interface GenerationDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'upsert', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Count the number of Generations. @@ -997,7 +1315,7 @@ export interface GenerationDelegate( args?: Prisma.Subset, ): Prisma.PrismaPromise< @@ -1031,8 +1349,10 @@ export interface GenerationDelegate(args: Prisma.Subset): Prisma.PrismaPromise> + **/ + aggregate( + args: Prisma.Subset, + ): Prisma.PrismaPromise> /** * Group by Generation. @@ -1051,7 +1371,7 @@ export interface GenerationDelegate>>, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetGenerationGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Generation model - */ -readonly fields: GenerationFieldRefs; + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields], + >( + args: Prisma.SubsetIntersection & InputErrors, + ): {} extends InputErrors ? GetGenerationGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Generation model + */ + readonly fields: GenerationFieldRefs } /** @@ -1122,24 +1441,70 @@ readonly fields: GenerationFieldRefs; * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ -export interface Prisma__GenerationClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - character = {}>(args?: Prisma.Subset>): Prisma.Prisma__CharacterClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - image = {}>(args?: Prisma.Subset>): Prisma.Prisma__AssetClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - equipments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> +export interface Prisma__GenerationClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + character = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__CharacterClient< + | runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + image = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__AssetClient< + | runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + equipments = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + 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): runtime.Types.Utils.JsPromise + then( + onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + catch( + onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. @@ -1149,26 +1514,24 @@ export interface Prisma__GenerationClient void) | undefined | null): runtime.Types.Utils.JsPromise } - - - /** * Fields of the Generation model */ export interface GenerationFieldRefs { - readonly id: Prisma.FieldRef<"Generation", 'String'> - readonly characterId: Prisma.FieldRef<"Generation", 'String'> - readonly imageId: Prisma.FieldRef<"Generation", 'String'> - readonly createdAt: Prisma.FieldRef<"Generation", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Generation", 'DateTime'> + readonly id: Prisma.FieldRef<'Generation', 'String'> + readonly characterId: Prisma.FieldRef<'Generation', 'String'> + readonly imageId: Prisma.FieldRef<'Generation', 'String'> + readonly createdAt: Prisma.FieldRef<'Generation', 'DateTime'> + readonly updatedAt: Prisma.FieldRef<'Generation', 'DateTime'> } - // Custom InputTypes /** * Generation findUnique */ -export type GenerationFindUniqueArgs = { +export type GenerationFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1190,7 +1553,9 @@ export type GenerationFindUniqueArgs = { +export type GenerationFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1212,7 +1577,9 @@ export type GenerationFindUniqueOrThrowArgs = { +export type GenerationFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1264,7 +1631,9 @@ export type GenerationFindFirstArgs = { +export type GenerationFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1316,7 +1685,9 @@ export type GenerationFindFirstOrThrowArgs = { +export type GenerationFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1363,7 +1734,9 @@ export type GenerationFindManyArgs = { +export type GenerationCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1385,7 +1758,9 @@ export type GenerationCreateArgs = { +export type GenerationCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to create many Generations. */ @@ -1395,7 +1770,9 @@ export type GenerationCreateManyArgs = { +export type GenerationCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1417,7 +1794,9 @@ export type GenerationCreateManyAndReturnArgs = { +export type GenerationUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1443,11 +1822,16 @@ export type GenerationUpdateArgs = { +export type GenerationUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to update Generations. */ - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationUpdateManyMutationInput, + Prisma.GenerationUncheckedUpdateManyInput + > /** * Filter which Generations to update */ @@ -1461,7 +1845,9 @@ export type GenerationUpdateManyArgs = { +export type GenerationUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1473,7 +1859,10 @@ export type GenerationUpdateManyAndReturnArgs + data: Prisma.XOR< + Prisma.GenerationUpdateManyMutationInput, + Prisma.GenerationUncheckedUpdateManyInput + > /** * Filter which Generations to update */ @@ -1491,7 +1880,9 @@ export type GenerationUpdateManyAndReturnArgs = { +export type GenerationUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1521,7 +1912,9 @@ export type GenerationUpsertArgs = { +export type GenerationDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ @@ -1543,7 +1936,9 @@ export type GenerationDeleteArgs = { +export type GenerationDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which Generations to delete */ @@ -1557,7 +1952,9 @@ export type GenerationDeleteManyArgs = { +export type Generation$equipmentsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1571,7 +1968,9 @@ export type Generation$equipmentsArgs | null where?: Prisma.GenerationEquipmentWhereInput - orderBy?: Prisma.GenerationEquipmentOrderByWithRelationInput | Prisma.GenerationEquipmentOrderByWithRelationInput[] + orderBy?: + | Prisma.GenerationEquipmentOrderByWithRelationInput + | Prisma.GenerationEquipmentOrderByWithRelationInput[] cursor?: Prisma.GenerationEquipmentWhereUniqueInput take?: number skip?: number @@ -1581,7 +1980,9 @@ export type Generation$equipmentsArgs = { +export type GenerationDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the Generation */ diff --git a/src/generated/prisma/models/GenerationEquipment.ts b/src/generated/prisma/models/GenerationEquipment.ts index 291194a..f8208f5 100644 --- a/src/generated/prisma/models/GenerationEquipment.ts +++ b/src/generated/prisma/models/GenerationEquipment.ts @@ -1,4 +1,3 @@ - /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file @@ -8,15 +7,16 @@ * * 🟢 You can import this file directly. */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.ts" -import type * as Prisma from "../internal/prismaNamespace.ts" +import type * as runtime from '@prisma/client/runtime/client' +import type * as $Enums from '../enums.ts' +import type * as Prisma from '../internal/prismaNamespace.ts' /** * Model GenerationEquipment * */ -export type GenerationEquipmentModel = runtime.Types.Result.DefaultSelection +export type GenerationEquipmentModel = + runtime.Types.Result.DefaultSelection export type AggregateGenerationEquipment = { _count: GenerationEquipmentCountAggregateOutputType | null @@ -40,7 +40,6 @@ export type GenerationEquipmentCountAggregateOutputType = { _all: number } - export type GenerationEquipmentMinAggregateInputType = { generationId?: true equipmentId?: true @@ -57,7 +56,9 @@ export type GenerationEquipmentCountAggregateInputType = { _all?: true } -export type GenerationEquipmentAggregateArgs = { +export type GenerationEquipmentAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which GenerationEquipment to aggregate. */ @@ -67,7 +68,9 @@ export type GenerationEquipmentAggregateArgs = { - [P in keyof T & keyof AggregateGenerationEquipment]: P extends '_count' | 'count' + [P in keyof T & keyof AggregateGenerationEquipment]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } - - - -export type GenerationEquipmentGroupByArgs = { +export type GenerationEquipmentGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { where?: Prisma.GenerationEquipmentWhereInput - orderBy?: Prisma.GenerationEquipmentOrderByWithAggregationInput | Prisma.GenerationEquipmentOrderByWithAggregationInput[] + orderBy?: + | Prisma.GenerationEquipmentOrderByWithAggregationInput + | Prisma.GenerationEquipmentOrderByWithAggregationInput[] by: Prisma.GenerationEquipmentScalarFieldEnum[] | Prisma.GenerationEquipmentScalarFieldEnum having?: Prisma.GenerationEquipmentScalarWhereWithAggregatesInput take?: number @@ -137,11 +141,11 @@ export type GenerationEquipmentGroupByOutputType = { _max: GenerationEquipmentMaxAggregateOutputType | null } -type GetGenerationEquipmentGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof GenerationEquipmentGroupByOutputType))]: P extends '_count' +type GetGenerationEquipmentGroupByPayload = + Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & { + [P in keyof T & keyof GenerationEquipmentGroupByOutputType]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType @@ -150,14 +154,12 @@ type GetGenerationEquipmentGroupByPayload > - - export type GenerationEquipmentWhereInput = { AND?: Prisma.GenerationEquipmentWhereInput | Prisma.GenerationEquipmentWhereInput[] OR?: Prisma.GenerationEquipmentWhereInput[] NOT?: Prisma.GenerationEquipmentWhereInput | Prisma.GenerationEquipmentWhereInput[] - generationId?: Prisma.StringFilter<"GenerationEquipment"> | string - equipmentId?: Prisma.StringFilter<"GenerationEquipment"> | string + generationId?: Prisma.StringFilter<'GenerationEquipment'> | string + equipmentId?: Prisma.StringFilter<'GenerationEquipment'> | string generation?: Prisma.XOR equipment?: Prisma.XOR } @@ -169,16 +171,19 @@ export type GenerationEquipmentOrderByWithRelationInput = { equipment?: Prisma.EquipmentOrderByWithRelationInput } -export type GenerationEquipmentWhereUniqueInput = Prisma.AtLeast<{ - generationId_equipmentId?: Prisma.GenerationEquipmentGenerationIdEquipmentIdCompoundUniqueInput - AND?: Prisma.GenerationEquipmentWhereInput | Prisma.GenerationEquipmentWhereInput[] - OR?: Prisma.GenerationEquipmentWhereInput[] - NOT?: Prisma.GenerationEquipmentWhereInput | Prisma.GenerationEquipmentWhereInput[] - generationId?: Prisma.StringFilter<"GenerationEquipment"> | string - equipmentId?: Prisma.StringFilter<"GenerationEquipment"> | string - generation?: Prisma.XOR - equipment?: Prisma.XOR -}, "generationId_equipmentId"> +export type GenerationEquipmentWhereUniqueInput = Prisma.AtLeast< + { + generationId_equipmentId?: Prisma.GenerationEquipmentGenerationIdEquipmentIdCompoundUniqueInput + AND?: Prisma.GenerationEquipmentWhereInput | Prisma.GenerationEquipmentWhereInput[] + OR?: Prisma.GenerationEquipmentWhereInput[] + NOT?: Prisma.GenerationEquipmentWhereInput | Prisma.GenerationEquipmentWhereInput[] + generationId?: Prisma.StringFilter<'GenerationEquipment'> | string + equipmentId?: Prisma.StringFilter<'GenerationEquipment'> | string + generation?: Prisma.XOR + equipment?: Prisma.XOR + }, + 'generationId_equipmentId' +> export type GenerationEquipmentOrderByWithAggregationInput = { generationId?: Prisma.SortOrder @@ -189,11 +194,15 @@ export type GenerationEquipmentOrderByWithAggregationInput = { } export type GenerationEquipmentScalarWhereWithAggregatesInput = { - AND?: Prisma.GenerationEquipmentScalarWhereWithAggregatesInput | Prisma.GenerationEquipmentScalarWhereWithAggregatesInput[] + AND?: + | Prisma.GenerationEquipmentScalarWhereWithAggregatesInput + | Prisma.GenerationEquipmentScalarWhereWithAggregatesInput[] OR?: Prisma.GenerationEquipmentScalarWhereWithAggregatesInput[] - NOT?: Prisma.GenerationEquipmentScalarWhereWithAggregatesInput | Prisma.GenerationEquipmentScalarWhereWithAggregatesInput[] - generationId?: Prisma.StringWithAggregatesFilter<"GenerationEquipment"> | string - equipmentId?: Prisma.StringWithAggregatesFilter<"GenerationEquipment"> | string + NOT?: + | Prisma.GenerationEquipmentScalarWhereWithAggregatesInput + | Prisma.GenerationEquipmentScalarWhereWithAggregatesInput[] + generationId?: Prisma.StringWithAggregatesFilter<'GenerationEquipment'> | string + equipmentId?: Prisma.StringWithAggregatesFilter<'GenerationEquipment'> | string } export type GenerationEquipmentCreateInput = { @@ -221,9 +230,7 @@ export type GenerationEquipmentCreateManyInput = { equipmentId: string } -export type GenerationEquipmentUpdateManyMutationInput = { - -} +export type GenerationEquipmentUpdateManyMutationInput = {} export type GenerationEquipmentUncheckedUpdateManyInput = { generationId?: Prisma.StringFieldUpdateOperationsInput | string @@ -261,87 +268,207 @@ export type GenerationEquipmentMinOrderByAggregateInput = { } export type GenerationEquipmentCreateNestedManyWithoutEquipmentInput = { - create?: Prisma.XOR | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] - connectOrCreate?: Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > + | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] createMany?: Prisma.GenerationEquipmentCreateManyEquipmentInputEnvelope - connect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] } export type GenerationEquipmentUncheckedCreateNestedManyWithoutEquipmentInput = { - create?: Prisma.XOR | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] - connectOrCreate?: Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > + | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] createMany?: Prisma.GenerationEquipmentCreateManyEquipmentInputEnvelope - connect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] } export type GenerationEquipmentUpdateManyWithoutEquipmentNestedInput = { - create?: Prisma.XOR | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] - connectOrCreate?: Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] - upsert?: Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput[] + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > + | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] + upsert?: + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput[] createMany?: Prisma.GenerationEquipmentCreateManyEquipmentInputEnvelope set?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - disconnect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + disconnect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] delete?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - connect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - update?: Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput[] - updateMany?: Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput[] - deleteMany?: Prisma.GenerationEquipmentScalarWhereInput | Prisma.GenerationEquipmentScalarWhereInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + update?: + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput[] + updateMany?: + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput[] + deleteMany?: + | Prisma.GenerationEquipmentScalarWhereInput + | Prisma.GenerationEquipmentScalarWhereInput[] } export type GenerationEquipmentUncheckedUpdateManyWithoutEquipmentNestedInput = { - create?: Prisma.XOR | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] - connectOrCreate?: Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] - upsert?: Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput[] + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > + | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] + upsert?: + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput[] createMany?: Prisma.GenerationEquipmentCreateManyEquipmentInputEnvelope set?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - disconnect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + disconnect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] delete?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - connect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - update?: Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput[] - updateMany?: Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput[] - deleteMany?: Prisma.GenerationEquipmentScalarWhereInput | Prisma.GenerationEquipmentScalarWhereInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + update?: + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput[] + updateMany?: + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput[] + deleteMany?: + | Prisma.GenerationEquipmentScalarWhereInput + | Prisma.GenerationEquipmentScalarWhereInput[] } export type GenerationEquipmentCreateNestedManyWithoutGenerationInput = { - create?: Prisma.XOR | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] - connectOrCreate?: Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > + | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] createMany?: Prisma.GenerationEquipmentCreateManyGenerationInputEnvelope - connect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] } export type GenerationEquipmentUncheckedCreateNestedManyWithoutGenerationInput = { - create?: Prisma.XOR | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] - connectOrCreate?: Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > + | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] createMany?: Prisma.GenerationEquipmentCreateManyGenerationInputEnvelope - connect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] } export type GenerationEquipmentUpdateManyWithoutGenerationNestedInput = { - create?: Prisma.XOR | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] - connectOrCreate?: Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] - upsert?: Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput[] + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > + | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] + upsert?: + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput[] createMany?: Prisma.GenerationEquipmentCreateManyGenerationInputEnvelope set?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - disconnect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + disconnect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] delete?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - connect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - update?: Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput[] - updateMany?: Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput[] - deleteMany?: Prisma.GenerationEquipmentScalarWhereInput | Prisma.GenerationEquipmentScalarWhereInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + update?: + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput[] + updateMany?: + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput[] + deleteMany?: + | Prisma.GenerationEquipmentScalarWhereInput + | Prisma.GenerationEquipmentScalarWhereInput[] } export type GenerationEquipmentUncheckedUpdateManyWithoutGenerationNestedInput = { - create?: Prisma.XOR | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] - connectOrCreate?: Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] - upsert?: Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput[] + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > + | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] + upsert?: + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput[] createMany?: Prisma.GenerationEquipmentCreateManyGenerationInputEnvelope set?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - disconnect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + disconnect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] delete?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - connect?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] - update?: Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput[] - updateMany?: Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput[] - deleteMany?: Prisma.GenerationEquipmentScalarWhereInput | Prisma.GenerationEquipmentScalarWhereInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + update?: + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput[] + updateMany?: + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput[] + deleteMany?: + | Prisma.GenerationEquipmentScalarWhereInput + | Prisma.GenerationEquipmentScalarWhereInput[] } export type GenerationEquipmentCreateWithoutEquipmentInput = { @@ -354,35 +481,52 @@ export type GenerationEquipmentUncheckedCreateWithoutEquipmentInput = { export type GenerationEquipmentCreateOrConnectWithoutEquipmentInput = { where: Prisma.GenerationEquipmentWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > } export type GenerationEquipmentCreateManyEquipmentInputEnvelope = { - data: Prisma.GenerationEquipmentCreateManyEquipmentInput | Prisma.GenerationEquipmentCreateManyEquipmentInput[] + data: + | Prisma.GenerationEquipmentCreateManyEquipmentInput + | Prisma.GenerationEquipmentCreateManyEquipmentInput[] } export type GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput = { where: Prisma.GenerationEquipmentWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.GenerationEquipmentUpdateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedUpdateWithoutEquipmentInput + > + create: Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > } export type GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput = { where: Prisma.GenerationEquipmentWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedUpdateWithoutEquipmentInput + > } export type GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput = { where: Prisma.GenerationEquipmentScalarWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateManyMutationInput, + Prisma.GenerationEquipmentUncheckedUpdateManyWithoutEquipmentInput + > } export type GenerationEquipmentScalarWhereInput = { AND?: Prisma.GenerationEquipmentScalarWhereInput | Prisma.GenerationEquipmentScalarWhereInput[] OR?: Prisma.GenerationEquipmentScalarWhereInput[] NOT?: Prisma.GenerationEquipmentScalarWhereInput | Prisma.GenerationEquipmentScalarWhereInput[] - generationId?: Prisma.StringFilter<"GenerationEquipment"> | string - equipmentId?: Prisma.StringFilter<"GenerationEquipment"> | string + generationId?: Prisma.StringFilter<'GenerationEquipment'> | string + equipmentId?: Prisma.StringFilter<'GenerationEquipment'> | string } export type GenerationEquipmentCreateWithoutGenerationInput = { @@ -395,27 +539,44 @@ export type GenerationEquipmentUncheckedCreateWithoutGenerationInput = { export type GenerationEquipmentCreateOrConnectWithoutGenerationInput = { where: Prisma.GenerationEquipmentWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > } export type GenerationEquipmentCreateManyGenerationInputEnvelope = { - data: Prisma.GenerationEquipmentCreateManyGenerationInput | Prisma.GenerationEquipmentCreateManyGenerationInput[] + data: + | Prisma.GenerationEquipmentCreateManyGenerationInput + | Prisma.GenerationEquipmentCreateManyGenerationInput[] } export type GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput = { where: Prisma.GenerationEquipmentWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR< + Prisma.GenerationEquipmentUpdateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedUpdateWithoutGenerationInput + > + create: Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > } export type GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput = { where: Prisma.GenerationEquipmentWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedUpdateWithoutGenerationInput + > } export type GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput = { where: Prisma.GenerationEquipmentScalarWhereInput - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateManyMutationInput, + Prisma.GenerationEquipmentUncheckedUpdateManyWithoutGenerationInput + > } export type GenerationEquipmentCreateManyEquipmentInput = { @@ -450,70 +611,108 @@ export type GenerationEquipmentUncheckedUpdateManyWithoutGenerationInput = { equipmentId?: Prisma.StringFieldUpdateOperationsInput | string } +export type GenerationEquipmentSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + generationId?: boolean + equipmentId?: boolean + generation?: boolean | Prisma.GenerationDefaultArgs + equipment?: boolean | Prisma.EquipmentDefaultArgs + }, + ExtArgs['result']['generationEquipment'] +> +export type GenerationEquipmentSelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + generationId?: boolean + equipmentId?: boolean + generation?: boolean | Prisma.GenerationDefaultArgs + equipment?: boolean | Prisma.EquipmentDefaultArgs + }, + ExtArgs['result']['generationEquipment'] +> -export type GenerationEquipmentSelect = runtime.Types.Extensions.GetSelect<{ - generationId?: boolean - equipmentId?: boolean - generation?: boolean | Prisma.GenerationDefaultArgs - equipment?: boolean | Prisma.EquipmentDefaultArgs -}, ExtArgs["result"]["generationEquipment"]> - -export type GenerationEquipmentSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - generationId?: boolean - equipmentId?: boolean - generation?: boolean | Prisma.GenerationDefaultArgs - equipment?: boolean | Prisma.EquipmentDefaultArgs -}, ExtArgs["result"]["generationEquipment"]> - -export type GenerationEquipmentSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - generationId?: boolean - equipmentId?: boolean - generation?: boolean | Prisma.GenerationDefaultArgs - equipment?: boolean | Prisma.EquipmentDefaultArgs -}, ExtArgs["result"]["generationEquipment"]> +export type GenerationEquipmentSelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + generationId?: boolean + equipmentId?: boolean + generation?: boolean | Prisma.GenerationDefaultArgs + equipment?: boolean | Prisma.EquipmentDefaultArgs + }, + ExtArgs['result']['generationEquipment'] +> export type GenerationEquipmentSelectScalar = { generationId?: boolean equipmentId?: boolean } -export type GenerationEquipmentOmit = runtime.Types.Extensions.GetOmit<"generationId" | "equipmentId", ExtArgs["result"]["generationEquipment"]> -export type GenerationEquipmentInclude = { +export type GenerationEquipmentOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + 'generationId' | 'equipmentId', + ExtArgs['result']['generationEquipment'] +> +export type GenerationEquipmentInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { generation?: boolean | Prisma.GenerationDefaultArgs equipment?: boolean | Prisma.EquipmentDefaultArgs } -export type GenerationEquipmentIncludeCreateManyAndReturn = { +export type GenerationEquipmentIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { generation?: boolean | Prisma.GenerationDefaultArgs equipment?: boolean | Prisma.EquipmentDefaultArgs } -export type GenerationEquipmentIncludeUpdateManyAndReturn = { +export type GenerationEquipmentIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { generation?: boolean | Prisma.GenerationDefaultArgs equipment?: boolean | Prisma.EquipmentDefaultArgs } -export type $GenerationEquipmentPayload = { - name: "GenerationEquipment" +export type $GenerationEquipmentPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'GenerationEquipment' objects: { generation: Prisma.$GenerationPayload equipment: Prisma.$EquipmentPayload } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - generationId: string - equipmentId: string - }, ExtArgs["result"]["generationEquipment"]> + scalars: runtime.Types.Extensions.GetPayloadResult< + { + generationId: string + equipmentId: string + }, + ExtArgs['result']['generationEquipment'] + > composites: {} } -export type GenerationEquipmentGetPayload = runtime.Types.Result.GetResult +export type GenerationEquipmentGetPayload< + S extends boolean | null | undefined | GenerationEquipmentDefaultArgs, +> = runtime.Types.Result.GetResult -export type GenerationEquipmentCountArgs = - Omit & { - select?: GenerationEquipmentCountAggregateInputType | true +export type GenerationEquipmentCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: GenerationEquipmentCountAggregateInputType | true +} + +export interface GenerationEquipmentDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { + types: Prisma.TypeMap['model']['GenerationEquipment'] + meta: { name: 'GenerationEquipment' } } - -export interface GenerationEquipmentDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['GenerationEquipment'], meta: { name: 'GenerationEquipment' } } /** * Find zero or one GenerationEquipment that matches the filter. * @param {GenerationEquipmentFindUniqueArgs} args - Arguments to find a GenerationEquipment @@ -525,7 +724,19 @@ export interface GenerationEquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationEquipmentClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find one GenerationEquipment that matches the filter or throw an error with `error.code='P2025'` @@ -539,7 +750,19 @@ export interface GenerationEquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationEquipmentClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find the first GenerationEquipment that matches the filter. @@ -554,7 +777,19 @@ export interface GenerationEquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__GenerationEquipmentClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > /** * Find the first GenerationEquipment that matches the filter or @@ -570,7 +805,19 @@ export interface GenerationEquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.Prisma__GenerationEquipmentClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Find zero or more GenerationEquipments that matches the filter. @@ -588,7 +835,16 @@ export interface GenerationEquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'findMany', + GlobalOmitOptions + > + > /** * Create a GenerationEquipment. @@ -602,7 +858,19 @@ export interface GenerationEquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationEquipmentClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'create', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Create many GenerationEquipments. @@ -616,7 +884,9 @@ export interface GenerationEquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Create many GenerationEquipments and returns the data saved in the database. @@ -640,7 +910,16 @@ export interface GenerationEquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + createManyAndReturn( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > /** * Delete a GenerationEquipment. @@ -654,7 +933,19 @@ export interface GenerationEquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationEquipmentClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'delete', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Update one GenerationEquipment. @@ -671,7 +962,19 @@ export interface GenerationEquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationEquipmentClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'update', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Delete zero or more GenerationEquipments. @@ -685,7 +988,9 @@ export interface GenerationEquipmentDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more GenerationEquipments. @@ -704,7 +1009,9 @@ export interface GenerationEquipmentDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise /** * Update zero or more GenerationEquipments and returns the data updated in the database. @@ -734,7 +1041,16 @@ export interface GenerationEquipmentDelegate(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + updateManyAndReturn( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > /** * Create or update one GenerationEquipment. @@ -753,8 +1069,19 @@ export interface GenerationEquipmentDelegate(args: Prisma.SelectSubset>): Prisma.Prisma__GenerationEquipmentClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'upsert', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > /** * Count the number of GenerationEquipments. @@ -768,7 +1095,7 @@ export interface GenerationEquipmentDelegate( args?: Prisma.Subset, ): Prisma.PrismaPromise< @@ -802,8 +1129,10 @@ export interface GenerationEquipmentDelegate(args: Prisma.Subset): Prisma.PrismaPromise> + **/ + aggregate( + args: Prisma.Subset, + ): Prisma.PrismaPromise> /** * Group by GenerationEquipment. @@ -822,7 +1151,7 @@ export interface GenerationEquipmentDelegate>>, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetGenerationEquipmentGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the GenerationEquipment model - */ -readonly fields: GenerationEquipmentFieldRefs; + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields], + >( + args: Prisma.SubsetIntersection & InputErrors, + ): {} extends InputErrors + ? GetGenerationEquipmentGroupByPayload + : Prisma.PrismaPromise + /** + * Fields of the GenerationEquipment model + */ + readonly fields: GenerationEquipmentFieldRefs } /** @@ -893,23 +1223,59 @@ readonly fields: GenerationEquipmentFieldRefs; * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ -export interface Prisma__GenerationEquipmentClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - generation = {}>(args?: Prisma.Subset>): Prisma.Prisma__GenerationClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - equipment = {}>(args?: Prisma.Subset>): Prisma.Prisma__EquipmentClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> +export interface Prisma__GenerationEquipmentClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + generation = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__GenerationClient< + | runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + equipment = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__EquipmentClient< + | runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + then( + onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + catch( + onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null, + ): runtime.Types.Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. @@ -919,23 +1285,21 @@ export interface Prisma__GenerationEquipmentClient void) | undefined | null): runtime.Types.Utils.JsPromise } - - - /** * Fields of the GenerationEquipment model */ export interface GenerationEquipmentFieldRefs { - readonly generationId: Prisma.FieldRef<"GenerationEquipment", 'String'> - readonly equipmentId: Prisma.FieldRef<"GenerationEquipment", 'String'> + readonly generationId: Prisma.FieldRef<'GenerationEquipment', 'String'> + readonly equipmentId: Prisma.FieldRef<'GenerationEquipment', 'String'> } - // Custom InputTypes /** * GenerationEquipment findUnique */ -export type GenerationEquipmentFindUniqueArgs = { +export type GenerationEquipmentFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -957,7 +1321,9 @@ export type GenerationEquipmentFindUniqueArgs = { +export type GenerationEquipmentFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -979,7 +1345,9 @@ export type GenerationEquipmentFindUniqueOrThrowArgs = { +export type GenerationEquipmentFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1001,7 +1369,9 @@ export type GenerationEquipmentFindFirstArgs = { +export type GenerationEquipmentFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1053,7 +1425,9 @@ export type GenerationEquipmentFindFirstOrThrowArgs = { +export type GenerationEquipmentFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1105,7 +1481,9 @@ export type GenerationEquipmentFindManyArgs = { +export type GenerationEquipmentCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1146,13 +1526,18 @@ export type GenerationEquipmentCreateArgs + data: Prisma.XOR< + Prisma.GenerationEquipmentCreateInput, + Prisma.GenerationEquipmentUncheckedCreateInput + > } /** * GenerationEquipment createMany */ -export type GenerationEquipmentCreateManyArgs = { +export type GenerationEquipmentCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to create many GenerationEquipments. */ @@ -1162,7 +1547,9 @@ export type GenerationEquipmentCreateManyArgs = { +export type GenerationEquipmentCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1184,7 +1571,9 @@ export type GenerationEquipmentCreateManyAndReturnArgs = { +export type GenerationEquipmentUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1200,7 +1589,10 @@ export type GenerationEquipmentUpdateArgs + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateInput, + Prisma.GenerationEquipmentUncheckedUpdateInput + > /** * Choose, which GenerationEquipment to update. */ @@ -1210,11 +1602,16 @@ export type GenerationEquipmentUpdateArgs = { +export type GenerationEquipmentUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * The data used to update GenerationEquipments. */ - data: Prisma.XOR + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateManyMutationInput, + Prisma.GenerationEquipmentUncheckedUpdateManyInput + > /** * Filter which GenerationEquipments to update */ @@ -1228,7 +1625,9 @@ export type GenerationEquipmentUpdateManyArgs = { +export type GenerationEquipmentUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1240,7 +1639,10 @@ export type GenerationEquipmentUpdateManyAndReturnArgs + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateManyMutationInput, + Prisma.GenerationEquipmentUncheckedUpdateManyInput + > /** * Filter which GenerationEquipments to update */ @@ -1258,7 +1660,9 @@ export type GenerationEquipmentUpdateManyAndReturnArgs = { +export type GenerationEquipmentUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1278,17 +1682,25 @@ export type GenerationEquipmentUpsertArgs + create: Prisma.XOR< + Prisma.GenerationEquipmentCreateInput, + Prisma.GenerationEquipmentUncheckedCreateInput + > /** * In case the GenerationEquipment was found with the provided `where` argument, update it with this data. */ - update: Prisma.XOR + update: Prisma.XOR< + Prisma.GenerationEquipmentUpdateInput, + Prisma.GenerationEquipmentUncheckedUpdateInput + > } /** * GenerationEquipment delete */ -export type GenerationEquipmentDeleteArgs = { +export type GenerationEquipmentDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ @@ -1310,7 +1722,9 @@ export type GenerationEquipmentDeleteArgs = { +export type GenerationEquipmentDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Filter which GenerationEquipments to delete */ @@ -1324,7 +1738,9 @@ export type GenerationEquipmentDeleteManyArgs = { +export type GenerationEquipmentDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { /** * Select specific fields to fetch from the GenerationEquipment */ diff --git a/src/service/ai.ts b/src/service/ai.ts index e1adb8e..36e8a97 100644 --- a/src/service/ai.ts +++ b/src/service/ai.ts @@ -1,110 +1,113 @@ -import { GoogleGenAI } from "@google/genai"; -import { z } from 'zod'; -import zodToJsonSchema from "zod-to-json-schema"; +import { GoogleGenAI } from '@google/genai' +import { z } from 'zod' +import zodToJsonSchema from 'zod-to-json-schema' // Generic AI service interface for flexibility export interface AIService { - generateText(prompt: string, images: File[], schema?: z.ZodType): Promise; - generateImage(prompt: string, referenceImages?: File[]): Promise; + generateText(prompt: string, images: File[], schema?: z.ZodType): Promise + generateImage(prompt: string, referenceImages?: File[]): Promise } export class GeminiService implements AIService { - private genAI: GoogleGenAI; + private genAI: GoogleGenAI constructor() { - this.genAI = new GoogleGenAI({ apiKey: process.env.API_KEY || '' }); + this.genAI = new GoogleGenAI({ apiKey: process.env.API_KEY || '' }) } // Generates JSON output from text and images using Gemini async generateText(prompt: string, images: File[] = [], schema?: z.ZodType): Promise { - const model = 'gemini-1.5-flash'; // Or 'gemini-2.0-flash-exp' if available for faster responses + const model = 'gemini-1.5-flash' // Or 'gemini-2.0-flash-exp' if available for faster responses - const parts: Array<{ text: string } | { inlineData: { mimeType: string; data: string } }> = []; + const parts: Array<{ text: string } | { inlineData: { mimeType: string; data: string } }> = [] // Convert files to base64 parts for (const image of images) { - const buffer = await image.arrayBuffer(); - const base64 = Buffer.from(buffer).toString('base64'); - parts.push({ - inlineData: { - mimeType: image.type, - data: base64 - } - }); + const buffer = await image.arrayBuffer() + const base64 = Buffer.from(buffer).toString('base64') + parts.push({ + inlineData: { + mimeType: image.type, + data: base64, + }, + }) } - parts.push({ text: prompt }); + parts.push({ text: prompt }) // eslint-disable-next-line @typescript-eslint/no-explicit-any const config: any = { - responseMimeType: "application/json", - }; + responseMimeType: 'application/json', + } if (schema) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - config.responseSchema = zodToJsonSchema(schema as any); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + config.responseSchema = zodToJsonSchema(schema as any) } const result = await this.genAI.models.generateContent({ model: model, contents: { parts }, - config: config - }); + config: config, + }) // @ts-ignore - The property exists on the response object - const textProp = typeof result.text === 'function' ? result.text() : result.text; - const text = typeof textProp === 'string' ? textProp : undefined; - if (!text) throw new Error("No text generated"); + const textProp = typeof result.text === 'function' ? result.text() : result.text + const text = typeof textProp === 'string' ? textProp : undefined + if (!text) throw new Error('No text generated') try { // Clean up markdown if present - const cleanText = text.replace(/^```(json)?\n?|\n?```$/g, '').trim(); - const json = JSON.parse(cleanText); + const cleanText = text.replace(/^```(json)?\n?|\n?```$/g, '').trim() + const json = JSON.parse(cleanText) if (schema) { - return schema.parse(json); + return schema.parse(json) } - return json as T; + return json as T } catch (e: unknown) { - console.error("Failed to parse JSON", text); - throw new Error(`Invalid JSON response from AI: ${e instanceof Error ? e.message : String(e)}`, { cause: e }); + console.error('Failed to parse JSON', text) + throw new Error( + `Invalid JSON response from AI: ${e instanceof Error ? e.message : String(e)}`, + { cause: e }, + ) } } // Generates an image based on prompt and optional reference images async generateImage(prompt: string, referenceImages: File[] = []): Promise { - const parts: Array<{ text: string } | { inlineData: { mimeType: string; data: string } }> = []; + const parts: Array<{ text: string } | { inlineData: { mimeType: string; data: string } }> = [] for (const image of referenceImages) { - const buffer = await image.arrayBuffer(); - const base64 = Buffer.from(buffer).toString('base64'); - parts.push({ - inlineData: { - mimeType: image.type, - data: base64 - } - }); + const buffer = await image.arrayBuffer() + const base64 = Buffer.from(buffer).toString('base64') + parts.push({ + inlineData: { + mimeType: image.type, + data: base64, + }, + }) } - parts.push({ text: prompt }); + parts.push({ text: prompt }) const result = await this.genAI.models.generateContent({ - model: 'gemini-2.0-flash-exp', // Using a known capable model - contents: { parts }, - }); + model: 'gemini-2.0-flash-exp', // Using a known capable model + contents: { parts }, + }) // Check for image in response - const candidate = result.candidates?.[0]; + const candidate = result.candidates?.[0] if (candidate?.content?.parts) { - for (const part of candidate.content.parts) { - if (part.inlineData?.mimeType?.startsWith('image/')) { - return `data:${part.inlineData.mimeType};base64,${part.inlineData.data}`; - } + for (const part of candidate.content.parts) { + if (part.inlineData?.mimeType?.startsWith('image/')) { + return `data:${part.inlineData.mimeType};base64,${part.inlineData.data}` } + } } - throw new Error("No image generated in response"); + throw new Error('No image generated in response') } } -export const aiService = new GeminiService(); +export const aiService = new GeminiService() diff --git a/src/service/category.ts b/src/service/category.ts index c2b10c4..0dfb76a 100644 --- a/src/service/category.ts +++ b/src/service/category.ts @@ -14,10 +14,10 @@ export class CategoryService { where: { name: { equals: normalizedName, - // mode: 'insensitive' // SQLite doesn't support 'mode: insensitive' directly like Postgres, usually need manual lower() or collate NOCASE + // mode: 'insensitive' // SQLite doesn't support 'mode: insensitive' directly like Postgres, usually need manual lower() or collate NOCASE }, - parentId: parentId || null - } + parentId: parentId || null, + }, }) if (existing) { @@ -30,8 +30,8 @@ export class CategoryService { data: { id, name: normalizedName, - parentId: parentId || null - } + parentId: parentId || null, + }, }) return newCategory.id @@ -43,14 +43,14 @@ export class CategoryService { static async listAll() { return prisma.category.findMany({ where: { - parentId: null + parentId: null, }, include: { - subCategories: true + subCategories: true, }, orderBy: { - name: 'asc' - } + name: 'asc', + }, }) } } diff --git a/src/service/equipment.ts b/src/service/equipment.ts index 4426b44..0809b19 100644 --- a/src/service/equipment.ts +++ b/src/service/equipment.ts @@ -65,7 +65,7 @@ export class EquipmentService { include: { image: true, category: true, - } + }, }) } } diff --git a/src/service/extraction.test.ts b/src/service/extraction.test.ts index d6053d6..39353c1 100644 --- a/src/service/extraction.test.ts +++ b/src/service/extraction.test.ts @@ -5,15 +5,17 @@ import { ExtractionService } from './extraction' mock.module('./ai', () => ({ aiService: { generateText: mock(async () => ({ - assets: [{ - item_name: 'Helmet', - description: 'A rusty helmet', - background_color: 'Red', - category: 'Head' - }] + assets: [ + { + item_name: 'Helmet', + description: 'A rusty helmet', + background_color: 'Red', + category: 'Head', + }, + ], })), generateImage: mock(async () => 'data:image/png;base64,mockImage'), - } + }, })) mock.module('./file', () => ({ @@ -21,27 +23,27 @@ mock.module('./file', () => ({ saveBase64Image: mock(async () => ({ path: 'data/files/123.webp', filename: '123.webp', - mimeType: 'image/webp' - })) - } + mimeType: 'image/webp', + })), + }, })) mock.module('./category', () => ({ CategoryService: { - findOrCreate: mock(async () => 'cat_123') - } + findOrCreate: mock(async () => 'cat_123'), + }, })) mock.module('./asset', () => ({ AssetService: { - createAssetRecord: mock(async () => ({ id: 'asset_123' })) - } + createAssetRecord: mock(async () => ({ id: 'asset_123' })), + }, })) mock.module('./equipment', () => ({ EquipmentService: { - createEquipment: mock(async () => ({ id: 'eq_123', name: 'Helmet' })) - } + createEquipment: mock(async () => ({ id: 'eq_123', name: 'Helmet' })), + }, })) mock.module('sharp', () => { @@ -49,9 +51,9 @@ mock.module('sharp', () => { metadata: () => Promise.resolve({ width: 100, height: 100 }), clone: () => ({ extract: () => ({ - toBuffer: () => Promise.resolve(Buffer.from('mockCrop')) - }) - }) + toBuffer: () => Promise.resolve(Buffer.from('mockCrop')), + }), + }), }) }) diff --git a/src/service/extraction.ts b/src/service/extraction.ts index c916228..0d43985 100644 --- a/src/service/extraction.ts +++ b/src/service/extraction.ts @@ -43,18 +43,20 @@ Instructions: Output Format (Strict JSON): Return ONLY a JSON object with a list of assets. -`; +` const schema = z.object({ - assets: z.array(z.object({ - item_name: z.string().describe("Name of the item"), - background_color: z.string().describe("Background color assigned"), - description: z.string().describe("Description of the item"), - category: z.string().describe("Category of the item"), - })), - }); + assets: z.array( + z.object({ + item_name: z.string().describe('Name of the item'), + background_color: z.string().describe('Background color assigned'), + description: z.string().describe('Description of the item'), + category: z.string().describe('Category of the item'), + }), + ), + }) - return aiService.generateText(prompt, [file], schema); + return aiService.generateText(prompt, [file], schema) } /** @@ -62,16 +64,25 @@ Return ONLY a JSON object with a list of assets. */ static async generateTextureSheet(file: File, assets: ExtractedAsset[]): Promise { const HEX_COLORS: Record = { - Red: '#FF0000', Yellow: '#FFFF00', Green: '#00FF00', White: '#FFFFFF', - Blue: '#0000FF', Black: '#000000', Magenta: '#FF00FF', Cyan: '#00FFFF', - Orange: '#FFA500', Gray: '#808080' - }; + Red: '#FF0000', + Yellow: '#FFFF00', + Green: '#00FF00', + White: '#FFFFFF', + Blue: '#0000FF', + Black: '#000000', + Magenta: '#FF00FF', + Cyan: '#00FFFF', + Orange: '#FFA500', + Gray: '#808080', + } - const mappingString = assets.map(asset => { - const colorName = asset.background_color; - const hex = HEX_COLORS[colorName] || '#000000'; - return `- ${asset.item_name}: ${colorName} Background (${hex}). ${asset.description}`; - }).join('\n'); + const mappingString = assets + .map((asset) => { + const colorName = asset.background_color + const hex = HEX_COLORS[colorName] || '#000000' + return `- ${asset.item_name}: ${colorName} Background (${hex}). ${asset.description}` + }) + .join('\n') const prompt = ` Task: Character Asset Extraction & Grid Generation @@ -89,17 +100,17 @@ Item & Background Mapping: ${mappingString} Output Requirement: High-resolution texture sheet, flat lay presentation, sharp edges, and uniform lighting across all assets. -`; +` - return aiService.generateImage(prompt, [file]); + return aiService.generateImage(prompt, [file]) } /** * Detects bounding boxes for assets in the texture sheet. */ static async detectBoundingBoxes(sheetBase64: string): Promise { - const buffer = Buffer.from(sheetBase64.replace(/^data:image\/\w+;base64,/, ''), 'base64'); - const file = new File([buffer], 'sheet.png', { type: 'image/png' }); + const buffer = Buffer.from(sheetBase64.replace(/^data:image\/\w+;base64,/, ''), 'base64') + const file = new File([buffer], 'sheet.png', { type: 'image/png' }) const prompt = ` Task: Spatial Asset Detection & Normalized Grid Mapping @@ -114,71 +125,78 @@ Instructions: Output Format (Strict JSON): Return ONLY a JSON object. Provide the grid dimensions and a list of detected assets with their coordinates. -`; +` const schema = z.object({ grid_dimensions: z.object({ rows: z.number(), cols: z.number(), }), - assets: z.array(z.object({ - item_name: z.string(), - coordinates: z.tuple([z.number(), z.number(), z.number(), z.number()]).describe("[ymin, xmin, ymax, xmax]"), - bg_color_detected: z.string(), - })), - }); + assets: z.array( + z.object({ + item_name: z.string(), + coordinates: z + .tuple([z.number(), z.number(), z.number(), z.number()]) + .describe('[ymin, xmin, ymax, xmax]'), + bg_color_detected: z.string(), + }), + ), + }) - return aiService.generateText(prompt, [file], schema); + return aiService.generateText(prompt, [file], schema) } /** * Crops assets from the texture sheet based on bounding boxes. */ - static async cropAssets(sheetBase64: string, boxes: BoundingBoxResponse): Promise<{ name: string, base64: string }[]> { - const buffer = Buffer.from(sheetBase64.replace(/^data:image\/\w+;base64,/, ''), 'base64'); - const image = sharp(buffer); - const metadata = await image.metadata(); + static async cropAssets( + sheetBase64: string, + boxes: BoundingBoxResponse, + ): Promise<{ name: string; base64: string }[]> { + const buffer = Buffer.from(sheetBase64.replace(/^data:image\/\w+;base64,/, ''), 'base64') + const image = sharp(buffer) + const metadata = await image.metadata() - if (!metadata.width || !metadata.height) throw new Error("Could not determine image dimensions"); + if (!metadata.width || !metadata.height) throw new Error('Could not determine image dimensions') - const croppedAssets = []; + const croppedAssets = [] for (const box of boxes.assets) { - const [ymin, xmin, ymax, xmax] = box.coordinates; + const [ymin, xmin, ymax, xmax] = box.coordinates - const left = Math.floor(xmin * metadata.width); - const top = Math.floor(ymin * metadata.height); - const width = Math.floor((xmax - xmin) * metadata.width); - const height = Math.floor((ymax - ymin) * metadata.height); + const left = Math.floor(xmin * metadata.width) + const top = Math.floor(ymin * metadata.height) + const width = Math.floor((xmax - xmin) * metadata.width) + const height = Math.floor((ymax - ymin) * metadata.height) // Ensure we don't go out of bounds - const safeLeft = Math.max(0, left); - const safeTop = Math.max(0, top); - const safeWidth = Math.min(width, metadata.width - safeLeft); - const safeHeight = Math.min(height, metadata.height - safeTop); + const safeLeft = Math.max(0, left) + const safeTop = Math.max(0, top) + const safeWidth = Math.min(width, metadata.width - safeLeft) + const safeHeight = Math.min(height, metadata.height - safeTop) - if (safeWidth <= 0 || safeHeight <= 0) continue; + if (safeWidth <= 0 || safeHeight <= 0) continue const cropBuffer = await image .clone() .extract({ left: safeLeft, top: safeTop, width: safeWidth, height: safeHeight }) - .toBuffer(); + .toBuffer() croppedAssets.push({ name: box.item_name, - base64: `data:image/png;base64,${cropBuffer.toString('base64')}` - }); + base64: `data:image/png;base64,${cropBuffer.toString('base64')}`, + }) } - return croppedAssets; + return croppedAssets } /** * Refines a cropped asset (removes background, upscales). */ static async refineAsset(base64: string): Promise { - const buffer = Buffer.from(base64.replace(/^data:image\/\w+;base64,/, ''), 'base64'); - const file = new File([buffer], 'crop.png', { type: 'image/png' }); + const buffer = Buffer.from(base64.replace(/^data:image\/\w+;base64,/, ''), 'base64') + const file = new File([buffer], 'crop.png', { type: 'image/png' }) const prompt = ` Task: Asset Refinement @@ -189,8 +207,8 @@ Instructions: 3. Upscale the image and enhance details for high-quality game asset presentation. 4. Ensure the object is centered and fully visible. 5. Return only the image. -`; +` // Using generateImage with image input - return aiService.generateImage(prompt, [file]); + return aiService.generateImage(prompt, [file]) } } diff --git a/src/service/file.test.ts b/src/service/file.test.ts index 8d04db4..aa25ecf 100644 --- a/src/service/file.test.ts +++ b/src/service/file.test.ts @@ -2,20 +2,23 @@ import { describe, expect, test, mock } from 'bun:test' import { FileService } from './file' // Valid 1x1 PNG Base64 -const VALID_PNG_BASE64 = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=='; -const VALID_PNG_BUFFER = Buffer.from(VALID_PNG_BASE64, 'base64'); +const VALID_PNG_BASE64 = + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==' +const VALID_PNG_BUFFER = Buffer.from(VALID_PNG_BASE64, 'base64') // Mock sharp mock.module('sharp', () => { return () => ({ webp: () => ({ - toBuffer: () => Promise.resolve(new Uint8Array([1, 2, 3])) - }) + toBuffer: () => Promise.resolve(new Uint8Array([1, 2, 3])), + }), }) }) // Mock Bun.write -const mockWrite = mock((path: string, content: string | Uint8Array) => Promise.resolve(content.length)) +const mockWrite = mock((path: string, content: string | Uint8Array) => + Promise.resolve(content.length), +) // @ts-ignore Bun.write = mockWrite diff --git a/src/service/file.ts b/src/service/file.ts index c3737c0..fe8ccc8 100644 --- a/src/service/file.ts +++ b/src/service/file.ts @@ -11,7 +11,10 @@ export class FileService { * @param name Optional name for the file (used for extension detection if original name is missing). * @returns The relative path to the saved file. */ - static async saveFile(file: File | Blob, name?: string): Promise<{ path: string; filename: string; mimeType: string }> { + static async saveFile( + file: File | Blob, + name?: string, + ): Promise<{ path: string; filename: string; mimeType: string }> { const id = ulid() let buffer: ArrayBuffer | Buffer let filename: string @@ -32,12 +35,12 @@ export class FileService { mimeType = file.type || 'application/octet-stream' } } else { - // Blob case - buffer = await file.arrayBuffer() - const result = await this.optimizeImage(buffer) - buffer = result.buffer - filename = `${id}.webp` - mimeType = 'image/webp' + // Blob case + buffer = await file.arrayBuffer() + const result = await this.optimizeImage(buffer) + buffer = result.buffer + filename = `${id}.webp` + mimeType = 'image/webp' } const path = join('data/files', filename) @@ -62,19 +65,19 @@ export class FileService { * Saves a base64 string as an image file. */ static async saveBase64Image(base64: string): Promise<{ path: string; filename: string }> { - // Strip prefix if present - const data = base64.replace(/^data:image\/\w+;base64,/, '') - const buffer = Buffer.from(data, 'base64') + // Strip prefix if present + const data = base64.replace(/^data:image\/\w+;base64,/, '') + const buffer = Buffer.from(data, 'base64') - // Optimize - const { buffer: optimized } = await this.optimizeImage(buffer) + // Optimize + const { buffer: optimized } = await this.optimizeImage(buffer) - const id = ulid() - const filename = `${id}.webp` - const path = join('data/files', filename) + const id = ulid() + const filename = `${id}.webp` + const path = join('data/files', filename) - await Bun.write(path, optimized) + await Bun.write(path, optimized) - return { path, filename } + return { path, filename } } } diff --git a/src/ui/App.tsx b/src/ui/App.tsx index 7e88959..5c2cfd5 100644 --- a/src/ui/App.tsx +++ b/src/ui/App.tsx @@ -1,25 +1,25 @@ -import React, { useState } from 'react'; -import { ExtractionStatus } from './types'; -import { Extractor } from './components/Extractor'; -import { Stash } from './components/Stash'; -import { LoadingOverlay } from './components/LoadingOverlay'; +import React, { useState } from 'react' +import { ExtractionStatus } from './types' +import { Extractor } from './components/Extractor' +import { Stash } from './components/Stash' +import { LoadingOverlay } from './components/LoadingOverlay' export default function App() { - const [view, setView] = useState<'extractor' | 'stash'>('extractor'); - const [status, setStatus] = useState('idle'); - const [statusMessage, setStatusMessage] = useState(''); - const [error, setError] = useState(null); + const [view, setView] = useState<'extractor' | 'stash'>('extractor') + const [status, setStatus] = useState('idle') + const [statusMessage, setStatusMessage] = useState('') + const [error, setError] = useState(null) const handleStatusChange = (newStatus: ExtractionStatus, message?: string) => { - setStatus(newStatus); - if (message) setStatusMessage(message); - }; + setStatus(newStatus) + if (message) setStatusMessage(message) + } interface NavButtonProps { - target: 'extractor' | 'stash'; - label: string; - color: string; - icon: string; + target: 'extractor' | 'stash' + label: string + color: string + icon: string } const NavButton = ({ target, label, color, icon }: NavButtonProps) => ( @@ -33,57 +33,75 @@ export default function App() { > {icon} {label} - ); + ) return (

{/* Global Error */} {error && (
- {error} - + {error} +
)} {/* Loading Overlay */} - {(status !== 'idle' && status !== 'complete' && status !== 'error') && ( + {status !== 'idle' && status !== 'complete' && status !== 'error' && ( // Note: Progress is illustrative here unless we stream progress numbers from backend )}
-
-
- -
-
-

Forgery

-

Digital Asset Synthesis

-
-
+
+
+ + + +
+
+

+ Forgery +

+

+ Digital Asset Synthesis +

+
+
-
- - -
+
+ + +
- {view === 'extractor' && ( - {}} - status={status} - statusMessage={statusMessage} - /> - )} - {view === 'stash' && ( - setView('extractor')} - /> - )} + {view === 'extractor' && ( + {}} + status={status} + statusMessage={statusMessage} + /> + )} + {view === 'stash' && setView('extractor')} />}
- ); -} \ No newline at end of file + ) +} diff --git a/src/ui/components/Extractor.tsx b/src/ui/components/Extractor.tsx index 1b80bd7..43ffdc5 100644 --- a/src/ui/components/Extractor.tsx +++ b/src/ui/components/Extractor.tsx @@ -1,13 +1,13 @@ -import React, { useState } from 'react'; -import { ExtractionStatus, ExtractedAsset } from '../types'; -import { client } from '../client'; +import React, { useState } from 'react' +import { ExtractionStatus, ExtractedAsset } from '../types' +import { client } from '../client' interface ExtractorProps { - onStatusChange: (status: ExtractionStatus, message?: string) => void; - onError: (msg: string | null) => void; - onAssetsExtracted: (assets: ExtractedAsset[]) => void; - status: ExtractionStatus; - statusMessage: string; + onStatusChange: (status: ExtractionStatus, message?: string) => void + onError: (msg: string | null) => void + onAssetsExtracted: (assets: ExtractedAsset[]) => void + status: ExtractionStatus + statusMessage: string } export const Extractor: React.FC = ({ @@ -15,203 +15,271 @@ export const Extractor: React.FC = ({ onError, onAssetsExtracted, status, - statusMessage + statusMessage, }) => { - const [file, setFile] = useState(null); - const [preview, setPreview] = useState(null); - const [results, setResults] = useState([]); + const [file, setFile] = useState(null) + const [preview, setPreview] = useState(null) + const [results, setResults] = useState([]) const handleFileChange = (e: React.ChangeEvent) => { if (e.target.files && e.target.files[0]) { - const f = e.target.files[0]; - setFile(f); - setPreview(URL.createObjectURL(f)); - setResults([]); - onError(null); - onStatusChange('idle'); + const f = e.target.files[0] + setFile(f) + setPreview(URL.createObjectURL(f)) + setResults([]) + onError(null) + onStatusChange('idle') } - }; + } const handleExtract = async () => { - if (!file) return; + if (!file) return - setResults([]); - onError(null); - onStatusChange('analyzing', "Starting extraction..."); + setResults([]) + onError(null) + onStatusChange('analyzing', 'Starting extraction...') try { // Hono RPC Client for File Upload const response = await client.extract.$post({ form: { - image: file - } - }); + image: file, + }, + }) - if (!response.ok) throw new Error("Server error"); - if (!response.body) throw new Error("No response body"); + if (!response.ok) throw new Error('Server error') + if (!response.body) throw new Error('No response body') - const reader = response.body.getReader(); - const decoder = new TextDecoder(); - let buffer = ''; + const reader = response.body.getReader() + const decoder = new TextDecoder() + let buffer = '' while (true) { - const { done, value } = await reader.read(); - if (done) break; + const { done, value } = await reader.read() + if (done) break - buffer += decoder.decode(value, { stream: true }); - const lines = buffer.split('\n\n'); // SSE events are separated by double newline - buffer = lines.pop() || ''; // Keep incomplete line + buffer += decoder.decode(value, { stream: true }) + const lines = buffer.split('\n\n') // SSE events are separated by double newline + buffer = lines.pop() || '' // Keep incomplete line for (const line of lines) { if (line.startsWith('event: ')) { - // Basic SSE parsing - const eventMatch = line.match(/^event: (.+)$/m); - const dataMatch = line.match(/^data: (.+)$/m); + // Basic SSE parsing + const eventMatch = line.match(/^event: (.+)$/m) + const dataMatch = line.match(/^data: (.+)$/m) - if (eventMatch && dataMatch) { - const event = eventMatch[1].trim(); - const data = JSON.parse(dataMatch[1]); + if (eventMatch && dataMatch) { + const event = eventMatch[1].trim() + const data = JSON.parse(dataMatch[1]) - if (event === 'status') { - onStatusChange(data.status, data.message); - } else if (event === 'complete') { - onStatusChange('complete', "Extraction complete!"); - setResults(data.assets); - onAssetsExtracted(data.assets); - } else if (event === 'error') { - throw new Error(data.message); - } - } + if (event === 'status') { + onStatusChange(data.status, data.message) + } else if (event === 'complete') { + onStatusChange('complete', 'Extraction complete!') + setResults(data.assets) + onAssetsExtracted(data.assets) + } else if (event === 'error') { + throw new Error(data.message) + } + } } } } - } catch (e: unknown) { - console.error(e); - const error = e instanceof Error ? e : new Error(String(e)); - onError(error.message || "Extraction failed"); - onStatusChange('error'); + console.error(e) + const error = e instanceof Error ? e : new Error(String(e)) + onError(error.message || 'Extraction failed') + onStatusChange('error') } - }; + } const handleReset = () => { - setFile(null); - if (preview) URL.revokeObjectURL(preview); - setPreview(null); - setResults([]); - onStatusChange('idle'); - }; + setFile(null) + if (preview) URL.revokeObjectURL(preview) + setPreview(null) + setResults([]) + onStatusChange('idle') + } if (results.length > 0) { - return ( -
- {/* Source Selection Strip */} -
-

Source Reference

-
-
- -
-
-
- - {/* Results Grid */} -
+ return ( +
+ {/* Source Selection Strip */} +
+

+ Source Reference +

+
+
+ +
+
- ); + + {/* Results Grid */} +
+
+
+

+ ✦ LOOT ACQUIRED +

+

+ {results.length} items found & stashed +

+
+
+ +
+
+ +
+ {results.map((item, i) => ( +
+
+ {/* Checkerboard bg */} +
+ + + {/* Download Overlay */} + + + + + +
+
+
{item.name}
+
{item.category.name}
+
+
+
+ ))} +
+
+
+ ) } // Initial State return (
- {!file ? ( -
-
- -
-

UPLOAD SOURCE

-

Drop character image to identify and extract equipment sprites.

-
- -
+ {!file ? ( +
+
+ + +
- ) : ( -
-
-
-

Staging Area

-
- -
- -
- -
- - -

POWERED BY GEMINI 2.0 FLASH

+

UPLOAD SOURCE

+

+ Drop character image to identify and extract equipment sprites. +

+
+
- )} +
+ ) : ( +
+
+
+

Staging Area

+
+ +
+ +
+ +
+ + +

+ POWERED BY GEMINI 2.0 FLASH +

+
+ )}
- ); -}; \ No newline at end of file + ) +} diff --git a/src/ui/components/LoadingOverlay.tsx b/src/ui/components/LoadingOverlay.tsx index 97c1f5b..c1f2651 100644 --- a/src/ui/components/LoadingOverlay.tsx +++ b/src/ui/components/LoadingOverlay.tsx @@ -1,49 +1,58 @@ -import React from 'react'; -import { ExtractionStatus } from '../types'; +import React from 'react' +import { ExtractionStatus } from '../types' interface LoadingOverlayProps { - status: ExtractionStatus; - current?: number; - total?: number; + status: ExtractionStatus + current?: number + total?: number } -export const LoadingOverlay: React.FC = ({ status, current = 0, total = 0 }) => { +export const LoadingOverlay: React.FC = ({ + status, + current = 0, + total = 0, +}) => { const getStatusText = () => { switch (status) { - case 'analyzing': return 'Scanning Neural Patterns...'; - case 'generating': return 'Synthesizing Texture Data...'; - case 'splitting': return 'Isolating Components...'; - case 'refining': return 'Upscaling & Polishing...'; - default: return 'Processing...'; + case 'analyzing': + return 'Scanning Neural Patterns...' + case 'generating': + return 'Synthesizing Texture Data...' + case 'splitting': + return 'Isolating Components...' + case 'refining': + return 'Upscaling & Polishing...' + default: + return 'Processing...' } - }; + } - const percent = total > 0 ? Math.round((current / total) * 100) : 0; + const percent = total > 0 ? Math.round((current / total) * 100) : 0 return (
-
-
- System Status - {percent}% -
-
-
-
-
+
+
+ System Status + {percent}% +
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-

{getStatusText()}

-

Do not close window

+

{getStatusText()}

+

Do not close window

- ); -}; \ No newline at end of file + ) +} diff --git a/src/ui/components/Stash.tsx b/src/ui/components/Stash.tsx index 17376d9..e7ee5b0 100644 --- a/src/ui/components/Stash.tsx +++ b/src/ui/components/Stash.tsx @@ -1,88 +1,141 @@ -import React, { useState, useEffect } from 'react'; -import { client } from '../client'; -import { InferResponseType } from 'hono/client'; +import React, { useState, useEffect } from 'react' +import { client } from '../client' +import { InferResponseType } from 'hono/client' -type EquipmentResponse = InferResponseType; -type StashItem = EquipmentResponse['items'][number]; +type EquipmentResponse = InferResponseType +type StashItem = EquipmentResponse['items'][number] interface StashProps { - onNavigateToExtractor: () => void; + onNavigateToExtractor: () => void } export const Stash: React.FC = ({ onNavigateToExtractor }) => { - const [items, setItems] = useState([]); - const [loading, setLoading] = useState(true); + const [items, setItems] = useState([]) + const [loading, setLoading] = useState(true) useEffect(() => { - fetchItems(); - }, []); + fetchItems() + }, []) const fetchItems = async () => { try { // Using Hono RPC client const res = await client.equipments.$get({ query: { - limit: '100' - } - }); + limit: '100', + }, + }) if (res.ok) { - const data = await res.json() as any; - setItems(data.items); + const data = (await res.json()) as any + setItems(data.items) } } catch (e) { - console.error("Failed to load stash", e); + console.error('Failed to load stash', e) } finally { - setLoading(false); + setLoading(false) } - }; + } if (loading) { - return
Loading Stash...
; + return
Loading Stash...
} if (items.length === 0) { - return ( -
-
- -
-

Empty Stash

-

Your inventory is empty. Use the Extractor to loot equipment from character images.

- + return ( +
+
+ + +
- ); +

+ Empty Stash +

+

+ Your inventory is empty. Use the Extractor to loot equipment from character images. +

+ +
+ ) } return (
-
-
-

Your Stash

-

{items.length} Items Collected

-
- -
+
+
+

+ Your Stash +

+

+ {items.length} Items Collected +

+
+ +
-
- {items.map((item) => ( -
-
-
- -
-
-
-

{item.name}

-
-

{item.category?.name || 'Unknown'}

-
-
- ))} -
+
+ {items.map((item) => ( +
+
+
+ +
+
+
+

+ {item.name} +

+
+

+ {item.category?.name || 'Unknown'} +

+
+
+ ))} +
- ); -}; \ No newline at end of file + ) +} diff --git a/src/ui/index.css b/src/ui/index.css index ff98c58..aad6ba3 100644 --- a/src/ui/index.css +++ b/src/ui/index.css @@ -1,4 +1,4 @@ -@import "tailwindcss"; +@import 'tailwindcss'; @theme { --color-border: #e5e7eb; @@ -37,10 +37,11 @@ body { font-family: 'Inter', sans-serif; background-color: #f3f4f6; /* Gray 100 */ background-image: - radial-gradient(#e5e7eb 1px, transparent 1px), - radial-gradient(#e5e7eb 1px, transparent 1px); + radial-gradient(#e5e7eb 1px, transparent 1px), radial-gradient(#e5e7eb 1px, transparent 1px); background-size: 20px 20px; - background-position: 0 0, 10px 10px; + background-position: + 0 0, + 10px 10px; color: #1f2937; /* Gray 800 */ } @@ -63,8 +64,14 @@ body { } @keyframes fade-in-up { - from { opacity: 0; transform: translateY(10px); } - to { opacity: 1; transform: translateY(0); } + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0); + } } .animate-fade-in-up { animation: fade-in-up 0.4s ease-out forwards; diff --git a/src/ui/index.html b/src/ui/index.html index d1dcbe8..4f9dabd 100644 --- a/src/ui/index.html +++ b/src/ui/index.html @@ -1,4 +1,4 @@ - + @@ -6,10 +6,10 @@ Forgery - +
- \ No newline at end of file + diff --git a/src/ui/index.ts b/src/ui/index.ts index f67b2c6..6cbd97c 100644 --- a/src/ui/index.ts +++ b/src/ui/index.ts @@ -1 +1 @@ -console.log("Hello via Bun!"); \ No newline at end of file +console.log('Hello via Bun!') diff --git a/src/ui/index.tsx b/src/ui/index.tsx index 07f4ded..4d8a80b 100644 --- a/src/ui/index.tsx +++ b/src/ui/index.tsx @@ -1,6 +1,6 @@ -import { createRoot } from 'react-dom/client'; -import App from './App'; -import './index.css'; +import { createRoot } from 'react-dom/client' +import App from './App' +import './index.css' -const root = createRoot(document.getElementById('root') as HTMLElement); -root.render(); +const root = createRoot(document.getElementById('root') as HTMLElement) +root.render() diff --git a/src/ui/types.ts b/src/ui/types.ts index cec740c..e5d90f9 100644 --- a/src/ui/types.ts +++ b/src/ui/types.ts @@ -1,14 +1,21 @@ export interface Category { - id: string; - name: string; + id: string + name: string } export interface ExtractedAsset { - id: string; - name: string; - description: string; - category: Category; - imageUrl: string; + id: string + name: string + description: string + category: Category + imageUrl: string } -export type ExtractionStatus = 'idle' | 'analyzing' | 'generating' | 'splitting' | 'refining' | 'complete' | 'error'; +export type ExtractionStatus = + | 'idle' + | 'analyzing' + | 'generating' + | 'splitting' + | 'refining' + | 'complete' + | 'error'