From 6cca0bad142333e6987d4ec78a26c893f5fb9069 Mon Sep 17 00:00:00 2001 From: ledouxm Date: Wed, 24 Apr 2024 08:55:28 +0200 Subject: [PATCH] feat: set electric client in its own package --- package.json | 3 +- packages/electric-client/package-lock.json | 249 + packages/electric-client/package.json | 43 + .../scripts/completePrismaClient.ts | 0 .../src/generated/client/index.ts | 2802 ++++++ .../src/generated/client/migrations.ts | 93 + .../src/generated/client/prismaClient.d.ts | 8028 +++++++++++++++++ .../src/generated/client/runtime/library.d.ts | 1 + packages/electric-client/src/index.ts | 1 + packages/electric-client/tsconfig.json | 30 + packages/frontend/package.json | 3 +- packages/frontend/src/db.ts | 2 +- pnpm-lock.yaml | 129 +- src/generated/client/index.ts | 2802 ++++++ 14 files changed, 14083 insertions(+), 103 deletions(-) create mode 100644 packages/electric-client/package-lock.json create mode 100644 packages/electric-client/package.json rename packages/{frontend => electric-client}/scripts/completePrismaClient.ts (100%) create mode 100644 packages/electric-client/src/generated/client/index.ts create mode 100644 packages/electric-client/src/generated/client/migrations.ts create mode 100644 packages/electric-client/src/generated/client/prismaClient.d.ts create mode 100644 packages/electric-client/src/generated/client/runtime/library.d.ts create mode 100644 packages/electric-client/src/index.ts create mode 100644 packages/electric-client/tsconfig.json create mode 100644 src/generated/client/index.ts diff --git a/package.json b/package.json index 857c808c..76170136 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "frontend": "pnpm --filter @cr-vif/frontend", "backend": "pnpm --filter @cr-vif/backend", + "electric-client": "pnpm --filter @cr-vif/electric-client", "db:create": "pnpm backend migration:create", "db:migrate": "pnpm db:create", "electric:up": "pnpm electric-sql with-config \"pnpm pg-migrations apply --database {{ELECTRIC_PROXY}} --directory ./db/migrations\"", @@ -26,7 +27,7 @@ "@pandabox/prettier-plugin": "^0.1.0", "@playwright/test": "^1.43.0", "@types/node": "^20.11.28", - "electric-sql": "^0.9.5", + "electric-sql": "^0.10.1", "prettier": "^3.2.5", "typed-openapi": "^0.4.1" } diff --git a/packages/electric-client/package-lock.json b/packages/electric-client/package-lock.json new file mode 100644 index 00000000..f68837db --- /dev/null +++ b/packages/electric-client/package-lock.json @@ -0,0 +1,249 @@ +{ + "name": "@cr-vif/electric-client", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@cr-vif/electric-client", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@prisma/client": "^4.8.1", + "electric-sql": "^0.10.1" + }, + "devDependencies": { + "prisma": "^4.8.1" + } + }, + "../../node_modules/.pnpm/electric-sql@0.10.1_@tauri-apps+plugin-sql@2.0.0-alpha.5_react-dom@18.2.0_react@18.2.0/node_modules/electric-sql": { + "version": "0.10.1", + "license": "Apache-2.0", + "dependencies": { + "@electric-sql/prisma-generator": "1.1.4", + "@prisma/client": "4.8.1", + "async-mutex": "^0.4.0", + "base-64": "^1.0.0", + "better-sqlite3": "^8.4.0", + "commander": "^11.1.0", + "cross-fetch": "^3.1.5", + "decompress": "^4.2.1", + "dotenv-flow": "^4.1.0", + "events": "^3.3.0", + "exponential-backoff": "^3.1.0", + "frame-stream": "^3.0.1", + "get-port": "^7.0.0", + "jose": "^4.14.4", + "lodash.flow": "^3.5.0", + "lodash.groupby": "^4.6.0", + "lodash.isequal": "^4.5.0", + "lodash.mapvalues": "^4.6.0", + "lodash.omitby": "^4.6.0", + "lodash.partition": "^4.6.0", + "lodash.pick": "^4.4.0", + "lodash.throttle": "^4.1.1", + "lodash.uniqwith": "^4.5.0", + "loglevel": "^1.8.1", + "long": "^5.2.0", + "object.hasown": "^1.1.2", + "ohash": "^1.1.2", + "prisma": "4.8.1", + "prompts": "^2.4.2", + "protobufjs": "^7.1.1", + "squel": "^5.13.0", + "tcp-port-used": "^1.0.2", + "text-encoder-lite": "^2.0.0", + "ts-dedent": "^2.2.0", + "ws": "^8.8.1", + "zod": "3.21.1" + }, + "bin": { + "electric-sql": "dist/cli/main.js" + }, + "devDependencies": { + "@electric-sql/prisma-generator": "1.1.4", + "@op-engineering/op-sqlite": ">= 2.0.16", + "@tauri-apps/plugin-sql": "2.0.0-alpha.5", + "@testing-library/react": "^13.4.0", + "@types/base-64": "^1.0.0", + "@types/better-sqlite3": "7.6.3", + "@types/decompress": "^4.2.4", + "@types/lodash.flow": "^3.5.7", + "@types/lodash.groupby": "^4.6.7", + "@types/lodash.isequal": "^4.5.6", + "@types/lodash.mapvalues": "^4.6.7", + "@types/lodash.omitby": "^4.6.7", + "@types/lodash.partition": "^4.6.7", + "@types/lodash.pick": "^4.4.7", + "@types/lodash.throttle": "^4.1.7", + "@types/lodash.uniqwith": "^4.5.9", + "@types/node": "^18.8.4", + "@types/prompts": "^2.4.9", + "@types/react": "^18.0.18", + "@types/tcp-port-used": "^1.0.2", + "@types/uuid": "^9.0.1", + "@types/ws": "^8.5.3", + "@typescript-eslint/eslint-plugin": "^5.34.0", + "@typescript-eslint/parser": "^5.34.0", + "@vue/test-utils": "^2.4.4", + "ava": "^4.3.1", + "concurrently": "^8.2.2", + "eslint": "^8.22.0", + "expo-sqlite": "^13.0.0", + "glob": "^10.3.10", + "global-jsdom": "24.0.0", + "husky": "^8.0.3", + "jsdom": "24.0.0", + "lint-staged": "^13.1.0", + "memorystorage": "^0.12.0", + "nodemon": "^3.0.2", + "prettier": "2.8.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "release-it": "^15.5.0", + "shx": "^0.3.4", + "ts-proto": "^1.125.0", + "tsup": "^8.0.1", + "tsx": "^4.1.1", + "typeorm": "^0.3.9", + "typescript": "^5.3.3", + "vue": "^3.4.19", + "vue-tsc": "^1.8.27", + "wa-sqlite": "rhashimoto/wa-sqlite#semver:^0.9.8", + "web-worker": "^1.2.0" + }, + "peerDependencies": { + "@capacitor-community/sqlite": ">= 5.6.2", + "@op-engineering/op-sqlite": ">= 2.0.16", + "@tauri-apps/plugin-sql": "2.0.0-alpha.5", + "expo-sqlite": ">= 13.0.0", + "react": ">= 16.8.0", + "react-dom": ">= 16.8.0", + "react-native": ">= 0.68.0", + "typeorm": ">=0.3.0", + "vue": ">=3.0.0", + "wa-sqlite": "rhashimoto/wa-sqlite#semver:^0.9.8" + }, + "peerDependenciesMeta": { + "@capacitor-community/sqlite": { + "optional": true + }, + "@op-engineering/op-sqlite": { + "optional": true + }, + "expo-sqlite": { + "optional": true + }, + "react": { + "optional": true + }, + "react-native": { + "optional": true + }, + "typeorm": { + "optional": true + }, + "vue": { + "optional": true + }, + "wa-sqlite": { + "optional": true + } + } + }, + "../../node_modules/.pnpm/prisma@4.8.1/node_modules/prisma": { + "version": "4.8.1", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/engines": "4.8.1" + }, + "bin": { + "prisma": "build/index.js", + "prisma2": "build/index.js" + }, + "devDependencies": { + "@prisma/client": "4.8.1", + "@prisma/debug": "4.8.1", + "@prisma/fetch-engine": "4.8.1", + "@prisma/generator-helper": "4.8.1", + "@prisma/get-platform": "4.8.1", + "@prisma/internals": "4.8.1", + "@prisma/migrate": "4.8.1", + "@prisma/studio": "0.479.0", + "@prisma/studio-server": "0.479.0", + "@swc/core": "1.3.14", + "@swc/jest": "0.2.23", + "@types/debug": "4.1.7", + "@types/fs-extra": "9.0.13", + "@types/jest": "29.2.4", + "@types/rimraf": "3.0.2", + "@types/ws": "8.5.3", + "chalk": "4.1.2", + "checkpoint-client": "1.1.21", + "debug": "4.3.4", + "dotenv": "16.0.3", + "esbuild": "0.15.13", + "execa": "5.1.1", + "fast-deep-equal": "3.1.3", + "fs-extra": "11.1.0", + "fs-jetpack": "5.1.0", + "get-port": "5.1.1", + "global-dirs": "3.0.0", + "is-installed-globally": "0.4.0", + "jest": "29.3.1", + "jest-junit": "15.0.0", + "line-replace": "2.0.1", + "log-update": "4.0.0", + "make-dir": "3.1.0", + "node-fetch": "2.6.7", + "open": "7.4.2", + "pkg-up": "3.1.0", + "replace-string": "3.1.0", + "resolve-pkg": "2.0.0", + "rimraf": "3.0.2", + "strip-ansi": "6.0.1", + "tempy": "1.0.1", + "ts-pattern": "4.0.5", + "typescript": "4.8.4" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@prisma/client": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.8.1.tgz", + "integrity": "sha512-d4xhZhETmeXK/yZ7K0KcVOzEfI5YKGGEr4F5SBV04/MU4ncN/HcE28sy3e4Yt8UFW0ZuImKFQJE+9rWt9WbGSQ==", + "hasInstallScript": true, + "dependencies": { + "@prisma/engines-version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe" + }, + "engines": { + "node": ">=14.17" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/engines-version": { + "version": "4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe.tgz", + "integrity": "sha512-MHSOSexomRMom8QN4t7bu87wPPD+pa+hW9+71JnVcF3DqyyO/ycCLhRL1we3EojRpZxKvuyGho2REQsMCvxcJw==" + }, + "node_modules/electric-sql": { + "resolved": "../../node_modules/.pnpm/electric-sql@0.10.1_@tauri-apps+plugin-sql@2.0.0-alpha.5_react-dom@18.2.0_react@18.2.0/node_modules/electric-sql", + "link": true + }, + "node_modules/prisma": { + "resolved": "../../node_modules/.pnpm/prisma@4.8.1/node_modules/prisma", + "link": true + } + } +} diff --git a/packages/electric-client/package.json b/packages/electric-client/package.json new file mode 100644 index 00000000..0d8dc5a3 --- /dev/null +++ b/packages/electric-client/package.json @@ -0,0 +1,43 @@ +{ + "name": "@cr-vif/electric-client", + "version": "1.0.0", + "description": "", + "scripts": { + "generate": "pnpm electric-sql generate && pnpm complete", + "complete": "vite-node ./scripts/completePrismaClient.ts", + "build": "tsup src/index.ts --dts --format cjs,esm" + }, + "main": "dist/index.cjs", + "module": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + ".": { + "source": "./src/index.ts", + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } + }, + "./development": { + "import": { + "default": "./src/index.ts", + "types": "./src/index.ts" + } + } + }, + "keywords": [], + "author": "", + "license": "ISC", + "peerDependencies": { + "@prisma/client": "^4.8.1", + "electric-sql": "^0.10.1" + }, + "devDependencies": { + "prisma": "^4.8.1", + "vite-node": "^1.4.0" + } +} diff --git a/packages/frontend/scripts/completePrismaClient.ts b/packages/electric-client/scripts/completePrismaClient.ts similarity index 100% rename from packages/frontend/scripts/completePrismaClient.ts rename to packages/electric-client/scripts/completePrismaClient.ts diff --git a/packages/electric-client/src/generated/client/index.ts b/packages/electric-client/src/generated/client/index.ts new file mode 100644 index 00000000..a2d475b7 --- /dev/null +++ b/packages/electric-client/src/generated/client/index.ts @@ -0,0 +1,2802 @@ +import { z } from 'zod'; +import type { Prisma } from './prismaClient'; +import { type TableSchema, DbSchema, Relation, ElectricClient, type HKT } from 'electric-sql/client/model'; +import migrations from './migrations'; + +///////////////////////////////////////// +// HELPER FUNCTIONS +///////////////////////////////////////// + + +///////////////////////////////////////// +// ENUMS +///////////////////////////////////////// + +export const ChipScalarFieldEnumSchema = z.enum(['id','label','value']); + +export const ClauseScalarFieldEnumSchema = z.enum(['id','label','value']); + +export const QueryModeSchema = z.enum(['default','insensitive']); + +export const ReportScalarFieldEnumSchema = z.enum(['id','title','project_description','redacted_by','meet_date','applicant_name','applicant_address','project_cadastral_ref','project_space_type','decision','precisions','contacts','further_information','created_by_id','created_by_username','created_at','service_instructeur']); + +export const Report_to_chipScalarFieldEnumSchema = z.enum(['id','report_id','chip_id']); + +export const Report_to_clauseScalarFieldEnumSchema = z.enum(['id','report_id','clause_id']); + +export const SortOrderSchema = z.enum(['asc','desc']); + +export const TransactionIsolationLevelSchema = z.enum(['ReadUncommitted','ReadCommitted','RepeatableRead','Serializable']); +///////////////////////////////////////// +// MODELS +///////////////////////////////////////// + +///////////////////////////////////////// +// CHIP SCHEMA +///////////////////////////////////////// + +export const ChipSchema = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), +}) + +export type Chip = z.infer + +///////////////////////////////////////// +// CLAUSE SCHEMA +///////////////////////////////////////// + +export const ClauseSchema = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), +}) + +export type Clause = z.infer + +///////////////////////////////////////// +// REPORT SCHEMA +///////////////////////////////////////// + +export const ReportSchema = z.object({ + id: z.string(), + title: z.string().nullable(), + project_description: z.string().nullable(), + redacted_by: z.string().nullable(), + meet_date: z.coerce.date().nullable(), + applicant_name: z.string().nullable(), + applicant_address: z.string().nullable(), + project_cadastral_ref: z.string().nullable(), + project_space_type: z.string().nullable(), + decision: z.string().nullable(), + precisions: z.string().nullable(), + contacts: z.string().nullable(), + further_information: z.string().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().nullable(), +}) + +export type Report = z.infer + +///////////////////////////////////////// +// REPORT TO CHIP SCHEMA +///////////////////////////////////////// + +export const Report_to_chipSchema = z.object({ + id: z.string(), + report_id: z.string(), + chip_id: z.string(), +}) + +export type Report_to_chip = z.infer + +///////////////////////////////////////// +// REPORT TO CLAUSE SCHEMA +///////////////////////////////////////// + +export const Report_to_clauseSchema = z.object({ + id: z.string(), + report_id: z.string(), + clause_id: z.string(), +}) + +export type Report_to_clause = z.infer + +///////////////////////////////////////// +// SELECT & INCLUDE +///////////////////////////////////////// + +// CHIP +//------------------------------------------------------ + +export const ChipIncludeSchema: z.ZodType = z.object({ + report_to_chip: z.union([z.boolean(),z.lazy(() => Report_to_chipFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ChipCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const ChipArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ChipSelectSchema).optional(), + include: z.lazy(() => ChipIncludeSchema).optional(), +}).strict(); + +export const ChipCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ChipCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const ChipCountOutputTypeSelectSchema: z.ZodType = z.object({ + report_to_chip: z.boolean().optional(), +}).strict(); + +export const ChipSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + label: z.boolean().optional(), + value: z.boolean().optional(), + report_to_chip: z.union([z.boolean(),z.lazy(() => Report_to_chipFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ChipCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// CLAUSE +//------------------------------------------------------ + +export const ClauseIncludeSchema: z.ZodType = z.object({ + report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ClauseCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const ClauseArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ClauseSelectSchema).optional(), + include: z.lazy(() => ClauseIncludeSchema).optional(), +}).strict(); + +export const ClauseCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ClauseCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const ClauseCountOutputTypeSelectSchema: z.ZodType = z.object({ + report_to_clause: z.boolean().optional(), +}).strict(); + +export const ClauseSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + label: z.boolean().optional(), + value: z.boolean().optional(), + report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ClauseCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// REPORT +//------------------------------------------------------ + +export const ReportIncludeSchema: z.ZodType = z.object({ + report_to_chip: z.union([z.boolean(),z.lazy(() => Report_to_chipFindManyArgsSchema)]).optional(), + report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ReportCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const ReportArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ReportSelectSchema).optional(), + include: z.lazy(() => ReportIncludeSchema).optional(), +}).strict(); + +export const ReportCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ReportCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const ReportCountOutputTypeSelectSchema: z.ZodType = z.object({ + report_to_chip: z.boolean().optional(), + report_to_clause: z.boolean().optional(), +}).strict(); + +export const ReportSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + title: z.boolean().optional(), + project_description: z.boolean().optional(), + redacted_by: z.boolean().optional(), + meet_date: z.boolean().optional(), + applicant_name: z.boolean().optional(), + applicant_address: z.boolean().optional(), + project_cadastral_ref: z.boolean().optional(), + project_space_type: z.boolean().optional(), + decision: z.boolean().optional(), + precisions: z.boolean().optional(), + contacts: z.boolean().optional(), + further_information: z.boolean().optional(), + created_by_id: z.boolean().optional(), + created_by_username: z.boolean().optional(), + created_at: z.boolean().optional(), + service_instructeur: z.boolean().optional(), + report_to_chip: z.union([z.boolean(),z.lazy(() => Report_to_chipFindManyArgsSchema)]).optional(), + report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ReportCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// REPORT TO CHIP +//------------------------------------------------------ + +export const Report_to_chipIncludeSchema: z.ZodType = z.object({ + chip: z.union([z.boolean(),z.lazy(() => ChipArgsSchema)]).optional(), + report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), +}).strict() + +export const Report_to_chipArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => Report_to_chipSelectSchema).optional(), + include: z.lazy(() => Report_to_chipIncludeSchema).optional(), +}).strict(); + +export const Report_to_chipSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + report_id: z.boolean().optional(), + chip_id: z.boolean().optional(), + chip: z.union([z.boolean(),z.lazy(() => ChipArgsSchema)]).optional(), + report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), +}).strict() + +// REPORT TO CLAUSE +//------------------------------------------------------ + +export const Report_to_clauseIncludeSchema: z.ZodType = z.object({ + clause: z.union([z.boolean(),z.lazy(() => ClauseArgsSchema)]).optional(), + report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), +}).strict() + +export const Report_to_clauseArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => Report_to_clauseSelectSchema).optional(), + include: z.lazy(() => Report_to_clauseIncludeSchema).optional(), +}).strict(); + +export const Report_to_clauseSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + report_id: z.boolean().optional(), + clause_id: z.boolean().optional(), + clause: z.union([z.boolean(),z.lazy(() => ClauseArgsSchema)]).optional(), + report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), +}).strict() + + +///////////////////////////////////////// +// INPUT TYPES +///////////////////////////////////////// + +export const ChipWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ChipWhereInputSchema),z.lazy(() => ChipWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => ChipWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ChipWhereInputSchema),z.lazy(() => ChipWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + label: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + value: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_to_chip: z.lazy(() => Report_to_chipListRelationFilterSchema).optional() +}).strict(); + +export const ChipOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional(), + report_to_chip: z.lazy(() => Report_to_chipOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const ChipWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().optional() +}).strict(); + +export const ChipOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => ChipCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => ChipMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => ChipMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const ChipScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ChipScalarWhereWithAggregatesInputSchema),z.lazy(() => ChipScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => ChipScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ChipScalarWhereWithAggregatesInputSchema),z.lazy(() => ChipScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + label: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + value: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + +export const ClauseWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ClauseWhereInputSchema),z.lazy(() => ClauseWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => ClauseWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ClauseWhereInputSchema),z.lazy(() => ClauseWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + label: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + value: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_to_clause: z.lazy(() => Report_to_clauseListRelationFilterSchema).optional() +}).strict(); + +export const ClauseOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const ClauseWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().optional() +}).strict(); + +export const ClauseOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => ClauseCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => ClauseMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => ClauseMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const ClauseScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema),z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema),z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + label: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + value: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + +export const ReportWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ReportWhereInputSchema),z.lazy(() => ReportWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => ReportWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ReportWhereInputSchema),z.lazy(() => ReportWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + title: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + project_description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + redacted_by: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + meet_date: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + applicant_name: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + applicant_address: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + project_cadastral_ref: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + project_space_type: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + decision: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + precisions: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + contacts: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + further_information: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + created_by_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + created_by_username: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + created_at: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + service_instructeur: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipListRelationFilterSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseListRelationFilterSchema).optional() +}).strict(); + +export const ReportOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + project_description: z.lazy(() => SortOrderSchema).optional(), + redacted_by: z.lazy(() => SortOrderSchema).optional(), + meet_date: z.lazy(() => SortOrderSchema).optional(), + applicant_name: z.lazy(() => SortOrderSchema).optional(), + applicant_address: z.lazy(() => SortOrderSchema).optional(), + project_cadastral_ref: z.lazy(() => SortOrderSchema).optional(), + project_space_type: z.lazy(() => SortOrderSchema).optional(), + decision: z.lazy(() => SortOrderSchema).optional(), + precisions: z.lazy(() => SortOrderSchema).optional(), + contacts: z.lazy(() => SortOrderSchema).optional(), + further_information: z.lazy(() => SortOrderSchema).optional(), + created_by_id: z.lazy(() => SortOrderSchema).optional(), + created_by_username: z.lazy(() => SortOrderSchema).optional(), + created_at: z.lazy(() => SortOrderSchema).optional(), + service_instructeur: z.lazy(() => SortOrderSchema).optional(), + report_to_chip: z.lazy(() => Report_to_chipOrderByRelationAggregateInputSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const ReportWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().optional() +}).strict(); + +export const ReportOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + project_description: z.lazy(() => SortOrderSchema).optional(), + redacted_by: z.lazy(() => SortOrderSchema).optional(), + meet_date: z.lazy(() => SortOrderSchema).optional(), + applicant_name: z.lazy(() => SortOrderSchema).optional(), + applicant_address: z.lazy(() => SortOrderSchema).optional(), + project_cadastral_ref: z.lazy(() => SortOrderSchema).optional(), + project_space_type: z.lazy(() => SortOrderSchema).optional(), + decision: z.lazy(() => SortOrderSchema).optional(), + precisions: z.lazy(() => SortOrderSchema).optional(), + contacts: z.lazy(() => SortOrderSchema).optional(), + further_information: z.lazy(() => SortOrderSchema).optional(), + created_by_id: z.lazy(() => SortOrderSchema).optional(), + created_by_username: z.lazy(() => SortOrderSchema).optional(), + created_at: z.lazy(() => SortOrderSchema).optional(), + service_instructeur: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => ReportCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => ReportMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => ReportMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const ReportScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ReportScalarWhereWithAggregatesInputSchema),z.lazy(() => ReportScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => ReportScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ReportScalarWhereWithAggregatesInputSchema),z.lazy(() => ReportScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + title: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + project_description: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + redacted_by: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + meet_date: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), + applicant_name: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + applicant_address: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + project_cadastral_ref: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + project_space_type: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + decision: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + precisions: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + contacts: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + further_information: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + created_by_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + created_by_username: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + created_at: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + service_instructeur: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), +}).strict(); + +export const Report_to_chipWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_chipWhereInputSchema),z.lazy(() => Report_to_chipWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_chipWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_chipWhereInputSchema),z.lazy(() => Report_to_chipWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + chip_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + chip: z.union([ z.lazy(() => ChipRelationFilterSchema),z.lazy(() => ChipWhereInputSchema) ]).optional(), + report: z.union([ z.lazy(() => ReportRelationFilterSchema),z.lazy(() => ReportWhereInputSchema) ]).optional(), +}).strict(); + +export const Report_to_chipOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + chip_id: z.lazy(() => SortOrderSchema).optional(), + chip: z.lazy(() => ChipOrderByWithRelationInputSchema).optional(), + report: z.lazy(() => ReportOrderByWithRelationInputSchema).optional() +}).strict(); + +export const Report_to_chipWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().optional() +}).strict(); + +export const Report_to_chipOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + chip_id: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => Report_to_chipCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => Report_to_chipMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => Report_to_chipMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const Report_to_chipScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_chipScalarWhereWithAggregatesInputSchema),z.lazy(() => Report_to_chipScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_chipScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_chipScalarWhereWithAggregatesInputSchema),z.lazy(() => Report_to_chipScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + chip_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + +export const Report_to_clauseWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_clauseWhereInputSchema),z.lazy(() => Report_to_clauseWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_clauseWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_clauseWhereInputSchema),z.lazy(() => Report_to_clauseWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + clause_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + clause: z.union([ z.lazy(() => ClauseRelationFilterSchema),z.lazy(() => ClauseWhereInputSchema) ]).optional(), + report: z.union([ z.lazy(() => ReportRelationFilterSchema),z.lazy(() => ReportWhereInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + clause_id: z.lazy(() => SortOrderSchema).optional(), + clause: z.lazy(() => ClauseOrderByWithRelationInputSchema).optional(), + report: z.lazy(() => ReportOrderByWithRelationInputSchema).optional() +}).strict(); + +export const Report_to_clauseWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().optional() +}).strict(); + +export const Report_to_clauseOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + clause_id: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => Report_to_clauseCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => Report_to_clauseMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => Report_to_clauseMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const Report_to_clauseScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema),z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema),z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + clause_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + +export const ChipCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), + report_to_chip: z.lazy(() => Report_to_chipCreateNestedManyWithoutChipInputSchema).optional() +}).strict(); + +export const ChipUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedCreateNestedManyWithoutChipInputSchema).optional() +}).strict(); + +export const ChipUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_to_chip: z.lazy(() => Report_to_chipUpdateManyWithoutChipNestedInputSchema).optional() +}).strict(); + +export const ChipUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedUpdateManyWithoutChipNestedInputSchema).optional() +}).strict(); + +export const ChipCreateManyInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ChipUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ChipUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ClauseCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), + report_to_clause: z.lazy(() => Report_to_clauseCreateNestedManyWithoutClauseInputSchema).optional() +}).strict(); + +export const ClauseUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedCreateNestedManyWithoutClauseInputSchema).optional() +}).strict(); + +export const ClauseUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_to_clause: z.lazy(() => Report_to_clauseUpdateManyWithoutClauseNestedInputSchema).optional() +}).strict(); + +export const ClauseUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutClauseNestedInputSchema).optional() +}).strict(); + +export const ClauseCreateManyInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ClauseUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ClauseUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ReportCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipCreateNestedManyWithoutReportInputSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedCreateNestedManyWithoutReportInputSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUpdateManyWithoutReportNestedInputSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const ReportUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedUpdateManyWithoutReportNestedInputSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const ReportCreateManyInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable() +}).strict(); + +export const ReportUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const ReportUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const Report_to_chipCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + chip: z.lazy(() => ChipCreateNestedOneWithoutReport_to_chipInputSchema), + report: z.lazy(() => ReportCreateNestedOneWithoutReport_to_chipInputSchema) +}).strict(); + +export const Report_to_chipUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string(), + chip_id: z.string() +}).strict(); + +export const Report_to_chipUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + chip: z.lazy(() => ChipUpdateOneRequiredWithoutReport_to_chipNestedInputSchema).optional(), + report: z.lazy(() => ReportUpdateOneRequiredWithoutReport_to_chipNestedInputSchema).optional() +}).strict(); + +export const Report_to_chipUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + chip_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_chipCreateManyInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string(), + chip_id: z.string() +}).strict(); + +export const Report_to_chipUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + chip_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + clause: z.lazy(() => ClauseCreateNestedOneWithoutReport_to_clauseInputSchema), + report: z.lazy(() => ReportCreateNestedOneWithoutReport_to_clauseInputSchema) +}).strict(); + +export const Report_to_clauseUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string(), + clause_id: z.string() +}).strict(); + +export const Report_to_clauseUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + clause: z.lazy(() => ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional(), + report: z.lazy(() => ReportUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional() +}).strict(); + +export const Report_to_clauseUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + clause_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseCreateManyInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string(), + clause_id: z.string() +}).strict(); + +export const Report_to_clauseUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + clause_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const StringFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringFilterSchema) ]).optional(), +}).strict(); + +export const Report_to_chipListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => Report_to_chipWhereInputSchema).optional(), + some: z.lazy(() => Report_to_chipWhereInputSchema).optional(), + none: z.lazy(() => Report_to_chipWhereInputSchema).optional() +}).strict(); + +export const Report_to_chipOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ChipCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ChipMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ChipMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const StringWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedStringFilterSchema).optional(), + _max: z.lazy(() => NestedStringFilterSchema).optional() +}).strict(); + +export const Report_to_clauseListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => Report_to_clauseWhereInputSchema).optional(), + some: z.lazy(() => Report_to_clauseWhereInputSchema).optional(), + none: z.lazy(() => Report_to_clauseWhereInputSchema).optional() +}).strict(); + +export const Report_to_clauseOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ClauseCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ClauseMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ClauseMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const StringNullableFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const DateTimeNullableFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const DateTimeFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeFilterSchema) ]).optional(), +}).strict(); + +export const ReportCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + project_description: z.lazy(() => SortOrderSchema).optional(), + redacted_by: z.lazy(() => SortOrderSchema).optional(), + meet_date: z.lazy(() => SortOrderSchema).optional(), + applicant_name: z.lazy(() => SortOrderSchema).optional(), + applicant_address: z.lazy(() => SortOrderSchema).optional(), + project_cadastral_ref: z.lazy(() => SortOrderSchema).optional(), + project_space_type: z.lazy(() => SortOrderSchema).optional(), + decision: z.lazy(() => SortOrderSchema).optional(), + precisions: z.lazy(() => SortOrderSchema).optional(), + contacts: z.lazy(() => SortOrderSchema).optional(), + further_information: z.lazy(() => SortOrderSchema).optional(), + created_by_id: z.lazy(() => SortOrderSchema).optional(), + created_by_username: z.lazy(() => SortOrderSchema).optional(), + created_at: z.lazy(() => SortOrderSchema).optional(), + service_instructeur: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ReportMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + project_description: z.lazy(() => SortOrderSchema).optional(), + redacted_by: z.lazy(() => SortOrderSchema).optional(), + meet_date: z.lazy(() => SortOrderSchema).optional(), + applicant_name: z.lazy(() => SortOrderSchema).optional(), + applicant_address: z.lazy(() => SortOrderSchema).optional(), + project_cadastral_ref: z.lazy(() => SortOrderSchema).optional(), + project_space_type: z.lazy(() => SortOrderSchema).optional(), + decision: z.lazy(() => SortOrderSchema).optional(), + precisions: z.lazy(() => SortOrderSchema).optional(), + contacts: z.lazy(() => SortOrderSchema).optional(), + further_information: z.lazy(() => SortOrderSchema).optional(), + created_by_id: z.lazy(() => SortOrderSchema).optional(), + created_by_username: z.lazy(() => SortOrderSchema).optional(), + created_at: z.lazy(() => SortOrderSchema).optional(), + service_instructeur: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ReportMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + project_description: z.lazy(() => SortOrderSchema).optional(), + redacted_by: z.lazy(() => SortOrderSchema).optional(), + meet_date: z.lazy(() => SortOrderSchema).optional(), + applicant_name: z.lazy(() => SortOrderSchema).optional(), + applicant_address: z.lazy(() => SortOrderSchema).optional(), + project_cadastral_ref: z.lazy(() => SortOrderSchema).optional(), + project_space_type: z.lazy(() => SortOrderSchema).optional(), + decision: z.lazy(() => SortOrderSchema).optional(), + precisions: z.lazy(() => SortOrderSchema).optional(), + contacts: z.lazy(() => SortOrderSchema).optional(), + further_information: z.lazy(() => SortOrderSchema).optional(), + created_by_id: z.lazy(() => SortOrderSchema).optional(), + created_by_username: z.lazy(() => SortOrderSchema).optional(), + created_at: z.lazy(() => SortOrderSchema).optional(), + service_instructeur: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const StringNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedStringNullableFilterSchema).optional(), + _max: z.lazy(() => NestedStringNullableFilterSchema).optional() +}).strict(); + +export const DateTimeNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeNullableFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeNullableFilterSchema).optional() +}).strict(); + +export const DateTimeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeFilterSchema).optional() +}).strict(); + +export const ChipRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => ChipWhereInputSchema).optional(), + isNot: z.lazy(() => ChipWhereInputSchema).optional() +}).strict(); + +export const ReportRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => ReportWhereInputSchema).optional(), + isNot: z.lazy(() => ReportWhereInputSchema).optional() +}).strict(); + +export const Report_to_chipCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + chip_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const Report_to_chipMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + chip_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const Report_to_chipMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + chip_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ClauseRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => ClauseWhereInputSchema).optional(), + isNot: z.lazy(() => ClauseWhereInputSchema).optional() +}).strict(); + +export const Report_to_clauseCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + clause_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const Report_to_clauseMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + clause_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const Report_to_clauseMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + clause_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const Report_to_chipCreateNestedManyWithoutChipInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateWithoutChipInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyChipInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedCreateNestedManyWithoutChipInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateWithoutChipInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyChipInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const StringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.string().optional() +}).strict(); + +export const Report_to_chipUpdateManyWithoutChipNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateWithoutChipInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutChipInputSchema),z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutChipInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyChipInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutChipInputSchema),z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutChipInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutChipInputSchema),z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutChipInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedUpdateManyWithoutChipNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateWithoutChipInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutChipInputSchema),z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutChipInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyChipInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutChipInputSchema),z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutChipInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutChipInputSchema),z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutChipInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseCreateNestedManyWithoutClauseInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedCreateNestedManyWithoutClauseInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUpdateManyWithoutClauseNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedUpdateManyWithoutClauseNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_chipCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyReportInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyReportInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const NullableStringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.string().optional().nullable() +}).strict(); + +export const NullableDateTimeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.coerce.date().optional().nullable() +}).strict(); + +export const DateTimeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.coerce.date().optional() +}).strict(); + +export const Report_to_chipUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyReportInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyReportInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const ChipCreateNestedOneWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ChipCreateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedCreateWithoutReport_to_chipInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ChipCreateOrConnectWithoutReport_to_chipInputSchema).optional(), + connect: z.lazy(() => ChipWhereUniqueInputSchema).optional() +}).strict(); + +export const ReportCreateNestedOneWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_chipInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutReport_to_chipInputSchema).optional(), + connect: z.lazy(() => ReportWhereUniqueInputSchema).optional() +}).strict(); + +export const ChipUpdateOneRequiredWithoutReport_to_chipNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ChipCreateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedCreateWithoutReport_to_chipInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ChipCreateOrConnectWithoutReport_to_chipInputSchema).optional(), + upsert: z.lazy(() => ChipUpsertWithoutReport_to_chipInputSchema).optional(), + connect: z.lazy(() => ChipWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => ChipUpdateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedUpdateWithoutReport_to_chipInputSchema) ]).optional(), +}).strict(); + +export const ReportUpdateOneRequiredWithoutReport_to_chipNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_chipInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutReport_to_chipInputSchema).optional(), + upsert: z.lazy(() => ReportUpsertWithoutReport_to_chipInputSchema).optional(), + connect: z.lazy(() => ReportWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => ReportUpdateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutReport_to_chipInputSchema) ]).optional(), +}).strict(); + +export const ClauseCreateNestedOneWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ClauseCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), + connect: z.lazy(() => ClauseWhereUniqueInputSchema).optional() +}).strict(); + +export const ReportCreateNestedOneWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), + connect: z.lazy(() => ReportWhereUniqueInputSchema).optional() +}).strict(); + +export const ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ClauseCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), + upsert: z.lazy(() => ClauseUpsertWithoutReport_to_clauseInputSchema).optional(), + connect: z.lazy(() => ClauseWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => ClauseUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedUpdateWithoutReport_to_clauseInputSchema) ]).optional(), +}).strict(); + +export const ReportUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), + upsert: z.lazy(() => ReportUpsertWithoutReport_to_clauseInputSchema).optional(), + connect: z.lazy(() => ReportWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => ReportUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutReport_to_clauseInputSchema) ]).optional(), +}).strict(); + +export const NestedStringFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringFilterSchema) ]).optional(), +}).strict(); + +export const NestedStringWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedStringFilterSchema).optional(), + _max: z.lazy(() => NestedStringFilterSchema).optional() +}).strict(); + +export const NestedIntFilterSchema: z.ZodType = z.object({ + equals: z.number().optional(), + in: z.number().array().optional(), + notIn: z.number().array().optional(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z.union([ z.number(),z.lazy(() => NestedIntFilterSchema) ]).optional(), +}).strict(); + +export const NestedStringNullableFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const NestedDateTimeNullableFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const NestedDateTimeFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeFilterSchema) ]).optional(), +}).strict(); + +export const NestedStringNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedStringNullableFilterSchema).optional(), + _max: z.lazy(() => NestedStringNullableFilterSchema).optional() +}).strict(); + +export const NestedIntNullableFilterSchema: z.ZodType = z.object({ + equals: z.number().optional().nullable(), + in: z.number().array().optional().nullable(), + notIn: z.number().array().optional().nullable(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z.union([ z.number(),z.lazy(() => NestedIntNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const NestedDateTimeNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeNullableFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeNullableFilterSchema).optional() +}).strict(); + +export const NestedDateTimeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeFilterSchema).optional() +}).strict(); + +export const Report_to_chipCreateWithoutChipInputSchema: z.ZodType = z.object({ + id: z.string(), + report: z.lazy(() => ReportCreateNestedOneWithoutReport_to_chipInputSchema) +}).strict(); + +export const Report_to_chipUncheckedCreateWithoutChipInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string() +}).strict(); + +export const Report_to_chipCreateOrConnectWithoutChipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema) ]), +}).strict(); + +export const Report_to_chipCreateManyChipInputEnvelopeSchema: z.ZodType = z.object({ + data: z.lazy(() => Report_to_chipCreateManyChipInputSchema).array(), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const Report_to_chipUpsertWithWhereUniqueWithoutChipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateWithoutChipInputSchema) ]), + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema) ]), +}).strict(); + +export const Report_to_chipUpdateWithWhereUniqueWithoutChipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + data: z.union([ z.lazy(() => Report_to_chipUpdateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateWithoutChipInputSchema) ]), +}).strict(); + +export const Report_to_chipUpdateManyWithWhereWithoutChipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipScalarWhereInputSchema), + data: z.union([ z.lazy(() => Report_to_chipUpdateManyMutationInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateManyWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const Report_to_chipScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_chipScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + chip_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), +}).strict(); + +export const Report_to_clauseCreateWithoutClauseInputSchema: z.ZodType = z.object({ + id: z.string(), + report: z.lazy(() => ReportCreateNestedOneWithoutReport_to_clauseInputSchema) +}).strict(); + +export const Report_to_clauseUncheckedCreateWithoutClauseInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string() +}).strict(); + +export const Report_to_clauseCreateOrConnectWithoutClauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema) ]), +}).strict(); + +export const Report_to_clauseCreateManyClauseInputEnvelopeSchema: z.ZodType = z.object({ + data: z.lazy(() => Report_to_clauseCreateManyClauseInputSchema).array(), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutClauseInputSchema) ]), + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema) ]), +}).strict(); + +export const Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + data: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutClauseInputSchema) ]), +}).strict(); + +export const Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseScalarWhereInputSchema), + data: z.union([ z.lazy(() => Report_to_clauseUpdateManyMutationInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const Report_to_clauseScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_clauseScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + clause_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), +}).strict(); + +export const Report_to_chipCreateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.string(), + chip: z.lazy(() => ChipCreateNestedOneWithoutReport_to_chipInputSchema) +}).strict(); + +export const Report_to_chipUncheckedCreateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.string(), + chip_id: z.string() +}).strict(); + +export const Report_to_chipCreateOrConnectWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_chipCreateManyReportInputEnvelopeSchema: z.ZodType = z.object({ + data: z.lazy(() => Report_to_chipCreateManyReportInputSchema).array(), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const Report_to_clauseCreateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.string(), + clause: z.lazy(() => ClauseCreateNestedOneWithoutReport_to_clauseInputSchema) +}).strict(); + +export const Report_to_clauseUncheckedCreateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.string(), + clause_id: z.string() +}).strict(); + +export const Report_to_clauseCreateOrConnectWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_clauseCreateManyReportInputEnvelopeSchema: z.ZodType = z.object({ + data: z.lazy(() => Report_to_clauseCreateManyReportInputSchema).array(), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const Report_to_chipUpsertWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateWithoutReportInputSchema) ]), + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_chipUpdateWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + data: z.union([ z.lazy(() => Report_to_chipUpdateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_chipUpdateManyWithWhereWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipScalarWhereInputSchema), + data: z.union([ z.lazy(() => Report_to_chipUpdateManyMutationInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateManyWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutReportInputSchema) ]), + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + data: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseScalarWhereInputSchema), + data: z.union([ z.lazy(() => Report_to_clauseUpdateManyMutationInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const ChipCreateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ChipUncheckedCreateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ChipCreateOrConnectWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => ChipWhereUniqueInputSchema), + create: z.union([ z.lazy(() => ChipCreateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedCreateWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const ReportCreateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_clause: z.lazy(() => Report_to_clauseCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportUncheckedCreateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportCreateOrConnectWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => ReportWhereUniqueInputSchema), + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const ChipUpsertWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => ChipUpdateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedUpdateWithoutReport_to_chipInputSchema) ]), + create: z.union([ z.lazy(() => ChipCreateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedCreateWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const ChipUpdateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ChipUncheckedUpdateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ReportUpsertWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => ReportUpdateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutReport_to_chipInputSchema) ]), + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const ReportUpdateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_clause: z.lazy(() => Report_to_clauseUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const ReportUncheckedUpdateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const ClauseCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ClauseUncheckedCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ClauseCreateOrConnectWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => ClauseWhereUniqueInputSchema), + create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const ReportCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportUncheckedCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportCreateOrConnectWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => ReportWhereUniqueInputSchema), + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const ClauseUpsertWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => ClauseUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedUpdateWithoutReport_to_clauseInputSchema) ]), + create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const ClauseUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ClauseUncheckedUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ReportUpsertWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => ReportUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutReport_to_clauseInputSchema) ]), + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const ReportUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const ReportUncheckedUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const Report_to_chipCreateManyChipInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string() +}).strict(); + +export const Report_to_chipUpdateWithoutChipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report: z.lazy(() => ReportUpdateOneRequiredWithoutReport_to_chipNestedInputSchema).optional() +}).strict(); + +export const Report_to_chipUncheckedUpdateWithoutChipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedUpdateManyWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseCreateManyClauseInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string() +}).strict(); + +export const Report_to_clauseUpdateWithoutClauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report: z.lazy(() => ReportUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional() +}).strict(); + +export const Report_to_clauseUncheckedUpdateWithoutClauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_chipCreateManyReportInputSchema: z.ZodType = z.object({ + id: z.string(), + chip_id: z.string() +}).strict(); + +export const Report_to_clauseCreateManyReportInputSchema: z.ZodType = z.object({ + id: z.string(), + clause_id: z.string() +}).strict(); + +export const Report_to_chipUpdateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + chip: z.lazy(() => ChipUpdateOneRequiredWithoutReport_to_chipNestedInputSchema).optional() +}).strict(); + +export const Report_to_chipUncheckedUpdateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + chip_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseUpdateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + clause: z.lazy(() => ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional() +}).strict(); + +export const Report_to_clauseUncheckedUpdateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + clause_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +///////////////////////////////////////// +// ARGS +///////////////////////////////////////// + +export const ChipFindFirstArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereInputSchema.optional(), + orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), + cursor: ChipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ChipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ChipFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereInputSchema.optional(), + orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), + cursor: ChipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ChipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ChipFindManyArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereInputSchema.optional(), + orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), + cursor: ChipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ChipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ChipAggregateArgsSchema: z.ZodType = z.object({ + where: ChipWhereInputSchema.optional(), + orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), + cursor: ChipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ChipGroupByArgsSchema: z.ZodType = z.object({ + where: ChipWhereInputSchema.optional(), + orderBy: z.union([ ChipOrderByWithAggregationInputSchema.array(),ChipOrderByWithAggregationInputSchema ]).optional(), + by: ChipScalarFieldEnumSchema.array(), + having: ChipScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ChipFindUniqueArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ChipFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ClauseFindFirstArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereInputSchema.optional(), + orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), + cursor: ClauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ClauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ClauseFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereInputSchema.optional(), + orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), + cursor: ClauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ClauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ClauseFindManyArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereInputSchema.optional(), + orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), + cursor: ClauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ClauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ClauseAggregateArgsSchema: z.ZodType = z.object({ + where: ClauseWhereInputSchema.optional(), + orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), + cursor: ClauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ClauseGroupByArgsSchema: z.ZodType = z.object({ + where: ClauseWhereInputSchema.optional(), + orderBy: z.union([ ClauseOrderByWithAggregationInputSchema.array(),ClauseOrderByWithAggregationInputSchema ]).optional(), + by: ClauseScalarFieldEnumSchema.array(), + having: ClauseScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ClauseFindUniqueArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ClauseFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ReportFindFirstArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereInputSchema.optional(), + orderBy: z.union([ ReportOrderByWithRelationInputSchema.array(),ReportOrderByWithRelationInputSchema ]).optional(), + cursor: ReportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ReportScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ReportFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereInputSchema.optional(), + orderBy: z.union([ ReportOrderByWithRelationInputSchema.array(),ReportOrderByWithRelationInputSchema ]).optional(), + cursor: ReportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ReportScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ReportFindManyArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereInputSchema.optional(), + orderBy: z.union([ ReportOrderByWithRelationInputSchema.array(),ReportOrderByWithRelationInputSchema ]).optional(), + cursor: ReportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ReportScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ReportAggregateArgsSchema: z.ZodType = z.object({ + where: ReportWhereInputSchema.optional(), + orderBy: z.union([ ReportOrderByWithRelationInputSchema.array(),ReportOrderByWithRelationInputSchema ]).optional(), + cursor: ReportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ReportGroupByArgsSchema: z.ZodType = z.object({ + where: ReportWhereInputSchema.optional(), + orderBy: z.union([ ReportOrderByWithAggregationInputSchema.array(),ReportOrderByWithAggregationInputSchema ]).optional(), + by: ReportScalarFieldEnumSchema.array(), + having: ReportScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ReportFindUniqueArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ReportFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_chipFindFirstArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereInputSchema.optional(), + orderBy: z.union([ Report_to_chipOrderByWithRelationInputSchema.array(),Report_to_chipOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_chipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_chipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_chipFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereInputSchema.optional(), + orderBy: z.union([ Report_to_chipOrderByWithRelationInputSchema.array(),Report_to_chipOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_chipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_chipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_chipFindManyArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereInputSchema.optional(), + orderBy: z.union([ Report_to_chipOrderByWithRelationInputSchema.array(),Report_to_chipOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_chipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_chipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_chipAggregateArgsSchema: z.ZodType = z.object({ + where: Report_to_chipWhereInputSchema.optional(), + orderBy: z.union([ Report_to_chipOrderByWithRelationInputSchema.array(),Report_to_chipOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_chipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const Report_to_chipGroupByArgsSchema: z.ZodType = z.object({ + where: Report_to_chipWhereInputSchema.optional(), + orderBy: z.union([ Report_to_chipOrderByWithAggregationInputSchema.array(),Report_to_chipOrderByWithAggregationInputSchema ]).optional(), + by: Report_to_chipScalarFieldEnumSchema.array(), + having: Report_to_chipScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const Report_to_chipFindUniqueArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_chipFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_clauseFindFirstArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereInputSchema.optional(), + orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_clauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_clauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereInputSchema.optional(), + orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_clauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_clauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseFindManyArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereInputSchema.optional(), + orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_clauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_clauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseAggregateArgsSchema: z.ZodType = z.object({ + where: Report_to_clauseWhereInputSchema.optional(), + orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_clauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseGroupByArgsSchema: z.ZodType = z.object({ + where: Report_to_clauseWhereInputSchema.optional(), + orderBy: z.union([ Report_to_clauseOrderByWithAggregationInputSchema.array(),Report_to_clauseOrderByWithAggregationInputSchema ]).optional(), + by: Report_to_clauseScalarFieldEnumSchema.array(), + having: Report_to_clauseScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseFindUniqueArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_clauseFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ChipCreateArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + data: z.union([ ChipCreateInputSchema,ChipUncheckedCreateInputSchema ]), +}).strict() as z.ZodType + +export const ChipUpsertArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereUniqueInputSchema, + create: z.union([ ChipCreateInputSchema,ChipUncheckedCreateInputSchema ]), + update: z.union([ ChipUpdateInputSchema,ChipUncheckedUpdateInputSchema ]), +}).strict() as z.ZodType + +export const ChipCreateManyArgsSchema: z.ZodType = z.object({ + data: ChipCreateManyInputSchema.array(), + skipDuplicates: z.boolean().optional(), +}).strict() as z.ZodType + +export const ChipDeleteArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ChipUpdateArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + data: z.union([ ChipUpdateInputSchema,ChipUncheckedUpdateInputSchema ]), + where: ChipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ChipUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ ChipUpdateManyMutationInputSchema,ChipUncheckedUpdateManyInputSchema ]), + where: ChipWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const ChipDeleteManyArgsSchema: z.ZodType = z.object({ + where: ChipWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const ClauseCreateArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + data: z.union([ ClauseCreateInputSchema,ClauseUncheckedCreateInputSchema ]), +}).strict() as z.ZodType + +export const ClauseUpsertArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereUniqueInputSchema, + create: z.union([ ClauseCreateInputSchema,ClauseUncheckedCreateInputSchema ]), + update: z.union([ ClauseUpdateInputSchema,ClauseUncheckedUpdateInputSchema ]), +}).strict() as z.ZodType + +export const ClauseCreateManyArgsSchema: z.ZodType = z.object({ + data: ClauseCreateManyInputSchema.array(), + skipDuplicates: z.boolean().optional(), +}).strict() as z.ZodType + +export const ClauseDeleteArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ClauseUpdateArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + data: z.union([ ClauseUpdateInputSchema,ClauseUncheckedUpdateInputSchema ]), + where: ClauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ClauseUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ ClauseUpdateManyMutationInputSchema,ClauseUncheckedUpdateManyInputSchema ]), + where: ClauseWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const ClauseDeleteManyArgsSchema: z.ZodType = z.object({ + where: ClauseWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const ReportCreateArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + data: z.union([ ReportCreateInputSchema,ReportUncheckedCreateInputSchema ]), +}).strict() as z.ZodType + +export const ReportUpsertArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereUniqueInputSchema, + create: z.union([ ReportCreateInputSchema,ReportUncheckedCreateInputSchema ]), + update: z.union([ ReportUpdateInputSchema,ReportUncheckedUpdateInputSchema ]), +}).strict() as z.ZodType + +export const ReportCreateManyArgsSchema: z.ZodType = z.object({ + data: ReportCreateManyInputSchema.array(), + skipDuplicates: z.boolean().optional(), +}).strict() as z.ZodType + +export const ReportDeleteArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ReportUpdateArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + data: z.union([ ReportUpdateInputSchema,ReportUncheckedUpdateInputSchema ]), + where: ReportWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ReportUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ ReportUpdateManyMutationInputSchema,ReportUncheckedUpdateManyInputSchema ]), + where: ReportWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const ReportDeleteManyArgsSchema: z.ZodType = z.object({ + where: ReportWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const Report_to_chipCreateArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + data: z.union([ Report_to_chipCreateInputSchema,Report_to_chipUncheckedCreateInputSchema ]), +}).strict() as z.ZodType + +export const Report_to_chipUpsertArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereUniqueInputSchema, + create: z.union([ Report_to_chipCreateInputSchema,Report_to_chipUncheckedCreateInputSchema ]), + update: z.union([ Report_to_chipUpdateInputSchema,Report_to_chipUncheckedUpdateInputSchema ]), +}).strict() as z.ZodType + +export const Report_to_chipCreateManyArgsSchema: z.ZodType = z.object({ + data: Report_to_chipCreateManyInputSchema.array(), + skipDuplicates: z.boolean().optional(), +}).strict() as z.ZodType + +export const Report_to_chipDeleteArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_chipUpdateArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + data: z.union([ Report_to_chipUpdateInputSchema,Report_to_chipUncheckedUpdateInputSchema ]), + where: Report_to_chipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_chipUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ Report_to_chipUpdateManyMutationInputSchema,Report_to_chipUncheckedUpdateManyInputSchema ]), + where: Report_to_chipWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const Report_to_chipDeleteManyArgsSchema: z.ZodType = z.object({ + where: Report_to_chipWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const Report_to_clauseCreateArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + data: z.union([ Report_to_clauseCreateInputSchema,Report_to_clauseUncheckedCreateInputSchema ]), +}).strict() as z.ZodType + +export const Report_to_clauseUpsertArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereUniqueInputSchema, + create: z.union([ Report_to_clauseCreateInputSchema,Report_to_clauseUncheckedCreateInputSchema ]), + update: z.union([ Report_to_clauseUpdateInputSchema,Report_to_clauseUncheckedUpdateInputSchema ]), +}).strict() as z.ZodType + +export const Report_to_clauseCreateManyArgsSchema: z.ZodType = z.object({ + data: Report_to_clauseCreateManyInputSchema.array(), + skipDuplicates: z.boolean().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseDeleteArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_clauseUpdateArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + data: z.union([ Report_to_clauseUpdateInputSchema,Report_to_clauseUncheckedUpdateInputSchema ]), + where: Report_to_clauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_clauseUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ Report_to_clauseUpdateManyMutationInputSchema,Report_to_clauseUncheckedUpdateManyInputSchema ]), + where: Report_to_clauseWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const Report_to_clauseDeleteManyArgsSchema: z.ZodType = z.object({ + where: Report_to_clauseWhereInputSchema.optional(), +}).strict() as z.ZodType + +interface ChipGetPayload extends HKT { + readonly _A?: boolean | null | undefined | Prisma.ChipArgs + readonly type: Omit, "Please either choose `select` or `include`"> +} + +interface ClauseGetPayload extends HKT { + readonly _A?: boolean | null | undefined | Prisma.ClauseArgs + readonly type: Omit, "Please either choose `select` or `include`"> +} + +interface ReportGetPayload extends HKT { + readonly _A?: boolean | null | undefined | Prisma.ReportArgs + readonly type: Omit, "Please either choose `select` or `include`"> +} + +interface Report_to_chipGetPayload extends HKT { + readonly _A?: boolean | null | undefined | Prisma.Report_to_chipArgs + readonly type: Omit, "Please either choose `select` or `include`"> +} + +interface Report_to_clauseGetPayload extends HKT { + readonly _A?: boolean | null | undefined | Prisma.Report_to_clauseArgs + readonly type: Omit, "Please either choose `select` or `include`"> +} + +export const tableSchemas = { + chip: { + fields: new Map([ + [ + "id", + "TEXT" + ], + [ + "label", + "TEXT" + ], + [ + "value", + "TEXT" + ] + ]), + relations: [ + new Relation("report_to_chip", "", "", "report_to_chip", "ChipToReport_to_chip", "many"), + ], + modelSchema: (ChipCreateInputSchema as any) + .partial() + .or((ChipUncheckedCreateInputSchema as any).partial()), + createSchema: ChipCreateArgsSchema, + createManySchema: ChipCreateManyArgsSchema, + findUniqueSchema: ChipFindUniqueArgsSchema, + findSchema: ChipFindFirstArgsSchema, + updateSchema: ChipUpdateArgsSchema, + updateManySchema: ChipUpdateManyArgsSchema, + upsertSchema: ChipUpsertArgsSchema, + deleteSchema: ChipDeleteArgsSchema, + deleteManySchema: ChipDeleteManyArgsSchema + } as TableSchema< + z.infer, + Prisma.ChipCreateArgs['data'], + Prisma.ChipUpdateArgs['data'], + Prisma.ChipFindFirstArgs['select'], + Prisma.ChipFindFirstArgs['where'], + Prisma.ChipFindUniqueArgs['where'], + Omit, + Prisma.ChipFindFirstArgs['orderBy'], + Prisma.ChipScalarFieldEnum, + ChipGetPayload + >, + clause: { + fields: new Map([ + [ + "id", + "TEXT" + ], + [ + "label", + "TEXT" + ], + [ + "value", + "TEXT" + ] + ]), + relations: [ + new Relation("report_to_clause", "", "", "report_to_clause", "ClauseToReport_to_clause", "many"), + ], + modelSchema: (ClauseCreateInputSchema as any) + .partial() + .or((ClauseUncheckedCreateInputSchema as any).partial()), + createSchema: ClauseCreateArgsSchema, + createManySchema: ClauseCreateManyArgsSchema, + findUniqueSchema: ClauseFindUniqueArgsSchema, + findSchema: ClauseFindFirstArgsSchema, + updateSchema: ClauseUpdateArgsSchema, + updateManySchema: ClauseUpdateManyArgsSchema, + upsertSchema: ClauseUpsertArgsSchema, + deleteSchema: ClauseDeleteArgsSchema, + deleteManySchema: ClauseDeleteManyArgsSchema + } as TableSchema< + z.infer, + Prisma.ClauseCreateArgs['data'], + Prisma.ClauseUpdateArgs['data'], + Prisma.ClauseFindFirstArgs['select'], + Prisma.ClauseFindFirstArgs['where'], + Prisma.ClauseFindUniqueArgs['where'], + Omit, + Prisma.ClauseFindFirstArgs['orderBy'], + Prisma.ClauseScalarFieldEnum, + ClauseGetPayload + >, + report: { + fields: new Map([ + [ + "id", + "TEXT" + ], + [ + "title", + "TEXT" + ], + [ + "project_description", + "TEXT" + ], + [ + "redacted_by", + "TEXT" + ], + [ + "meet_date", + "TIMESTAMP" + ], + [ + "applicant_name", + "TEXT" + ], + [ + "applicant_address", + "TEXT" + ], + [ + "project_cadastral_ref", + "TEXT" + ], + [ + "project_space_type", + "TEXT" + ], + [ + "decision", + "TEXT" + ], + [ + "precisions", + "TEXT" + ], + [ + "contacts", + "TEXT" + ], + [ + "further_information", + "TEXT" + ], + [ + "created_by_id", + "TEXT" + ], + [ + "created_by_username", + "TEXT" + ], + [ + "created_at", + "TIMESTAMP" + ], + [ + "service_instructeur", + "TEXT" + ] + ]), + relations: [ + new Relation("report_to_chip", "", "", "report_to_chip", "ReportToReport_to_chip", "many"), + new Relation("report_to_clause", "", "", "report_to_clause", "ReportToReport_to_clause", "many"), + ], + modelSchema: (ReportCreateInputSchema as any) + .partial() + .or((ReportUncheckedCreateInputSchema as any).partial()), + createSchema: ReportCreateArgsSchema, + createManySchema: ReportCreateManyArgsSchema, + findUniqueSchema: ReportFindUniqueArgsSchema, + findSchema: ReportFindFirstArgsSchema, + updateSchema: ReportUpdateArgsSchema, + updateManySchema: ReportUpdateManyArgsSchema, + upsertSchema: ReportUpsertArgsSchema, + deleteSchema: ReportDeleteArgsSchema, + deleteManySchema: ReportDeleteManyArgsSchema + } as TableSchema< + z.infer, + Prisma.ReportCreateArgs['data'], + Prisma.ReportUpdateArgs['data'], + Prisma.ReportFindFirstArgs['select'], + Prisma.ReportFindFirstArgs['where'], + Prisma.ReportFindUniqueArgs['where'], + Omit, + Prisma.ReportFindFirstArgs['orderBy'], + Prisma.ReportScalarFieldEnum, + ReportGetPayload + >, + report_to_chip: { + fields: new Map([ + [ + "id", + "TEXT" + ], + [ + "report_id", + "TEXT" + ], + [ + "chip_id", + "TEXT" + ] + ]), + relations: [ + new Relation("chip", "chip_id", "id", "chip", "ChipToReport_to_chip", "one"), + new Relation("report", "report_id", "id", "report", "ReportToReport_to_chip", "one"), + ], + modelSchema: (Report_to_chipCreateInputSchema as any) + .partial() + .or((Report_to_chipUncheckedCreateInputSchema as any).partial()), + createSchema: Report_to_chipCreateArgsSchema, + createManySchema: Report_to_chipCreateManyArgsSchema, + findUniqueSchema: Report_to_chipFindUniqueArgsSchema, + findSchema: Report_to_chipFindFirstArgsSchema, + updateSchema: Report_to_chipUpdateArgsSchema, + updateManySchema: Report_to_chipUpdateManyArgsSchema, + upsertSchema: Report_to_chipUpsertArgsSchema, + deleteSchema: Report_to_chipDeleteArgsSchema, + deleteManySchema: Report_to_chipDeleteManyArgsSchema + } as TableSchema< + z.infer, + Prisma.Report_to_chipCreateArgs['data'], + Prisma.Report_to_chipUpdateArgs['data'], + Prisma.Report_to_chipFindFirstArgs['select'], + Prisma.Report_to_chipFindFirstArgs['where'], + Prisma.Report_to_chipFindUniqueArgs['where'], + Omit, + Prisma.Report_to_chipFindFirstArgs['orderBy'], + Prisma.Report_to_chipScalarFieldEnum, + Report_to_chipGetPayload + >, + report_to_clause: { + fields: new Map([ + [ + "id", + "TEXT" + ], + [ + "report_id", + "TEXT" + ], + [ + "clause_id", + "TEXT" + ] + ]), + relations: [ + new Relation("clause", "clause_id", "id", "clause", "ClauseToReport_to_clause", "one"), + new Relation("report", "report_id", "id", "report", "ReportToReport_to_clause", "one"), + ], + modelSchema: (Report_to_clauseCreateInputSchema as any) + .partial() + .or((Report_to_clauseUncheckedCreateInputSchema as any).partial()), + createSchema: Report_to_clauseCreateArgsSchema, + createManySchema: Report_to_clauseCreateManyArgsSchema, + findUniqueSchema: Report_to_clauseFindUniqueArgsSchema, + findSchema: Report_to_clauseFindFirstArgsSchema, + updateSchema: Report_to_clauseUpdateArgsSchema, + updateManySchema: Report_to_clauseUpdateManyArgsSchema, + upsertSchema: Report_to_clauseUpsertArgsSchema, + deleteSchema: Report_to_clauseDeleteArgsSchema, + deleteManySchema: Report_to_clauseDeleteManyArgsSchema + } as TableSchema< + z.infer, + Prisma.Report_to_clauseCreateArgs['data'], + Prisma.Report_to_clauseUpdateArgs['data'], + Prisma.Report_to_clauseFindFirstArgs['select'], + Prisma.Report_to_clauseFindFirstArgs['where'], + Prisma.Report_to_clauseFindUniqueArgs['where'], + Omit, + Prisma.Report_to_clauseFindFirstArgs['orderBy'], + Prisma.Report_to_clauseScalarFieldEnum, + Report_to_clauseGetPayload + >, +} + +export const schema = new DbSchema(tableSchemas, migrations) +export type Electric = ElectricClient diff --git a/packages/electric-client/src/generated/client/migrations.ts b/packages/electric-client/src/generated/client/migrations.ts new file mode 100644 index 00000000..d41f0c04 --- /dev/null +++ b/packages/electric-client/src/generated/client/migrations.ts @@ -0,0 +1,93 @@ +export default [ + { + "statements": [ + "CREATE TABLE \"report\" (\n \"id\" TEXT NOT NULL,\n \"title\" TEXT,\n \"project_description\" TEXT,\n \"redacted_by\" TEXT,\n \"meet_date\" TEXT,\n \"applicant_name\" TEXT,\n \"applicant_address\" TEXT,\n \"project_cadastral_ref\" TEXT,\n \"project_space_type\" TEXT,\n \"decision\" TEXT,\n \"precisions\" TEXT,\n \"contacts\" TEXT,\n \"further_information\" TEXT,\n \"created_by_id\" TEXT NOT NULL,\n \"created_by_username\" TEXT NOT NULL,\n \"created_at\" TEXT NOT NULL,\n CONSTRAINT \"report_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", + "CREATE TABLE \"report_to_clause\" (\n \"id\" TEXT NOT NULL,\n \"report_id\" TEXT NOT NULL,\n \"clause_id\" TEXT NOT NULL,\n CONSTRAINT \"report_to_clause_clause_id_fkey\" FOREIGN KEY (\"clause_id\") REFERENCES \"clause\" (\"id\") ON DELETE CASCADE,\n CONSTRAINT \"report_to_clause_report_id_fkey\" FOREIGN KEY (\"report_id\") REFERENCES \"report\" (\"id\") ON DELETE CASCADE,\n CONSTRAINT \"report_to_clause_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", + "CREATE TABLE \"clause\" (\n \"id\" TEXT NOT NULL,\n \"label\" TEXT NOT NULL,\n \"value\" TEXT NOT NULL,\n CONSTRAINT \"clause_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", + "INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('main.report', 1);", + "DROP TRIGGER IF EXISTS update_ensure_main_report_primarykey;", + "CREATE TRIGGER update_ensure_main_report_primarykey\n BEFORE UPDATE ON \"main\".\"report\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"id\" != new.\"id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column id as it belongs to the primary key')\n END;\nEND;", + "DROP TRIGGER IF EXISTS insert_main_report_into_oplog;", + "CREATE TRIGGER insert_main_report_into_oplog\n AFTER INSERT ON \"main\".\"report\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'INSERT', json_object('id', new.\"id\"), json_object('applicant_address', new.\"applicant_address\", 'applicant_name', new.\"applicant_name\", 'contacts', new.\"contacts\", 'created_at', new.\"created_at\", 'created_by_id', new.\"created_by_id\", 'created_by_username', new.\"created_by_username\", 'decision', new.\"decision\", 'further_information', new.\"further_information\", 'id', new.\"id\", 'meet_date', new.\"meet_date\", 'precisions', new.\"precisions\", 'project_cadastral_ref', new.\"project_cadastral_ref\", 'project_description', new.\"project_description\", 'project_space_type', new.\"project_space_type\", 'redacted_by', new.\"redacted_by\", 'title', new.\"title\"), NULL, NULL);\nEND;", + "DROP TRIGGER IF EXISTS update_main_report_into_oplog;", + "CREATE TRIGGER update_main_report_into_oplog\n AFTER UPDATE ON \"main\".\"report\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'UPDATE', json_object('id', new.\"id\"), json_object('applicant_address', new.\"applicant_address\", 'applicant_name', new.\"applicant_name\", 'contacts', new.\"contacts\", 'created_at', new.\"created_at\", 'created_by_id', new.\"created_by_id\", 'created_by_username', new.\"created_by_username\", 'decision', new.\"decision\", 'further_information', new.\"further_information\", 'id', new.\"id\", 'meet_date', new.\"meet_date\", 'precisions', new.\"precisions\", 'project_cadastral_ref', new.\"project_cadastral_ref\", 'project_description', new.\"project_description\", 'project_space_type', new.\"project_space_type\", 'redacted_by', new.\"redacted_by\", 'title', new.\"title\"), json_object('applicant_address', old.\"applicant_address\", 'applicant_name', old.\"applicant_name\", 'contacts', old.\"contacts\", 'created_at', old.\"created_at\", 'created_by_id', old.\"created_by_id\", 'created_by_username', old.\"created_by_username\", 'decision', old.\"decision\", 'further_information', old.\"further_information\", 'id', old.\"id\", 'meet_date', old.\"meet_date\", 'precisions', old.\"precisions\", 'project_cadastral_ref', old.\"project_cadastral_ref\", 'project_description', old.\"project_description\", 'project_space_type', old.\"project_space_type\", 'redacted_by', old.\"redacted_by\", 'title', old.\"title\"), NULL);\nEND;", + "DROP TRIGGER IF EXISTS delete_main_report_into_oplog;", + "CREATE TRIGGER delete_main_report_into_oplog\n AFTER DELETE ON \"main\".\"report\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'DELETE', json_object('id', old.\"id\"), NULL, json_object('applicant_address', old.\"applicant_address\", 'applicant_name', old.\"applicant_name\", 'contacts', old.\"contacts\", 'created_at', old.\"created_at\", 'created_by_id', old.\"created_by_id\", 'created_by_username', old.\"created_by_username\", 'decision', old.\"decision\", 'further_information', old.\"further_information\", 'id', old.\"id\", 'meet_date', old.\"meet_date\", 'precisions', old.\"precisions\", 'project_cadastral_ref', old.\"project_cadastral_ref\", 'project_description', old.\"project_description\", 'project_space_type', old.\"project_space_type\", 'redacted_by', old.\"redacted_by\", 'title', old.\"title\"), NULL);\nEND;", + "INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('main.report_to_clause', 1);", + "DROP TRIGGER IF EXISTS update_ensure_main_report_to_clause_primarykey;", + "CREATE TRIGGER update_ensure_main_report_to_clause_primarykey\n BEFORE UPDATE ON \"main\".\"report_to_clause\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"id\" != new.\"id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column id as it belongs to the primary key')\n END;\nEND;", + "DROP TRIGGER IF EXISTS insert_main_report_to_clause_into_oplog;", + "CREATE TRIGGER insert_main_report_to_clause_into_oplog\n AFTER INSERT ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report_to_clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report_to_clause', 'INSERT', json_object('id', new.\"id\"), json_object('clause_id', new.\"clause_id\", 'id', new.\"id\", 'report_id', new.\"report_id\"), NULL, NULL);\nEND;", + "DROP TRIGGER IF EXISTS update_main_report_to_clause_into_oplog;", + "CREATE TRIGGER update_main_report_to_clause_into_oplog\n AFTER UPDATE ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report_to_clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report_to_clause', 'UPDATE', json_object('id', new.\"id\"), json_object('clause_id', new.\"clause_id\", 'id', new.\"id\", 'report_id', new.\"report_id\"), json_object('clause_id', old.\"clause_id\", 'id', old.\"id\", 'report_id', old.\"report_id\"), NULL);\nEND;", + "DROP TRIGGER IF EXISTS delete_main_report_to_clause_into_oplog;", + "CREATE TRIGGER delete_main_report_to_clause_into_oplog\n AFTER DELETE ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report_to_clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report_to_clause', 'DELETE', json_object('id', old.\"id\"), NULL, json_object('clause_id', old.\"clause_id\", 'id', old.\"id\", 'report_id', old.\"report_id\"), NULL);\nEND;", + "DROP TRIGGER IF EXISTS compensation_insert_main_report_to_clause_clause_id_into_oplog;", + "CREATE TRIGGER compensation_insert_main_report_to_clause_clause_id_into_oplog\n AFTER INSERT ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.clause') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'clause', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"clause\" WHERE \"id\" = new.\"clause_id\";\nEND;", + "DROP TRIGGER IF EXISTS compensation_update_main_report_to_clause_clause_id_into_oplog;", + "CREATE TRIGGER compensation_update_main_report_to_clause_clause_id_into_oplog\n AFTER UPDATE ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.clause') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'clause', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"clause\" WHERE \"id\" = new.\"clause_id\";\nEND;", + "DROP TRIGGER IF EXISTS compensation_insert_main_report_to_clause_report_id_into_oplog;", + "CREATE TRIGGER compensation_insert_main_report_to_clause_report_id_into_oplog\n AFTER INSERT ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'report', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"report_id\";\nEND;", + "DROP TRIGGER IF EXISTS compensation_update_main_report_to_clause_report_id_into_oplog;", + "CREATE TRIGGER compensation_update_main_report_to_clause_report_id_into_oplog\n AFTER UPDATE ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'report', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"report_id\";\nEND;", + "INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('main.clause', 1);", + "DROP TRIGGER IF EXISTS update_ensure_main_clause_primarykey;", + "CREATE TRIGGER update_ensure_main_clause_primarykey\n BEFORE UPDATE ON \"main\".\"clause\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"id\" != new.\"id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column id as it belongs to the primary key')\n END;\nEND;", + "DROP TRIGGER IF EXISTS insert_main_clause_into_oplog;", + "CREATE TRIGGER insert_main_clause_into_oplog\n AFTER INSERT ON \"main\".\"clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'INSERT', json_object('id', new.\"id\"), json_object('id', new.\"id\", 'label', new.\"label\", 'value', new.\"value\"), NULL, NULL);\nEND;", + "DROP TRIGGER IF EXISTS update_main_clause_into_oplog;", + "CREATE TRIGGER update_main_clause_into_oplog\n AFTER UPDATE ON \"main\".\"clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'UPDATE', json_object('id', new.\"id\"), json_object('id', new.\"id\", 'label', new.\"label\", 'value', new.\"value\"), json_object('id', old.\"id\", 'label', old.\"label\", 'value', old.\"value\"), NULL);\nEND;", + "DROP TRIGGER IF EXISTS delete_main_clause_into_oplog;", + "CREATE TRIGGER delete_main_clause_into_oplog\n AFTER DELETE ON \"main\".\"clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'DELETE', json_object('id', old.\"id\"), NULL, json_object('id', old.\"id\", 'label', old.\"label\", 'value', old.\"value\"), NULL);\nEND;" + ], + "version": "1" + }, + { + "statements": [ + "ALTER TABLE \"report\" ADD COLUMN \"service_instructeur\" TEXT;\n", + "INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('main.report', 1);", + "DROP TRIGGER IF EXISTS update_ensure_main_report_primarykey;", + "CREATE TRIGGER update_ensure_main_report_primarykey\n BEFORE UPDATE ON \"main\".\"report\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"id\" != new.\"id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column id as it belongs to the primary key')\n END;\nEND;", + "DROP TRIGGER IF EXISTS insert_main_report_into_oplog;", + "CREATE TRIGGER insert_main_report_into_oplog\n AFTER INSERT ON \"main\".\"report\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'INSERT', json_object('id', new.\"id\"), json_object('applicant_address', new.\"applicant_address\", 'applicant_name', new.\"applicant_name\", 'contacts', new.\"contacts\", 'created_at', new.\"created_at\", 'created_by_id', new.\"created_by_id\", 'created_by_username', new.\"created_by_username\", 'decision', new.\"decision\", 'further_information', new.\"further_information\", 'id', new.\"id\", 'meet_date', new.\"meet_date\", 'precisions', new.\"precisions\", 'project_cadastral_ref', new.\"project_cadastral_ref\", 'project_description', new.\"project_description\", 'project_space_type', new.\"project_space_type\", 'redacted_by', new.\"redacted_by\", 'service_instructeur', new.\"service_instructeur\", 'title', new.\"title\"), NULL, NULL);\nEND;", + "DROP TRIGGER IF EXISTS update_main_report_into_oplog;", + "CREATE TRIGGER update_main_report_into_oplog\n AFTER UPDATE ON \"main\".\"report\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'UPDATE', json_object('id', new.\"id\"), json_object('applicant_address', new.\"applicant_address\", 'applicant_name', new.\"applicant_name\", 'contacts', new.\"contacts\", 'created_at', new.\"created_at\", 'created_by_id', new.\"created_by_id\", 'created_by_username', new.\"created_by_username\", 'decision', new.\"decision\", 'further_information', new.\"further_information\", 'id', new.\"id\", 'meet_date', new.\"meet_date\", 'precisions', new.\"precisions\", 'project_cadastral_ref', new.\"project_cadastral_ref\", 'project_description', new.\"project_description\", 'project_space_type', new.\"project_space_type\", 'redacted_by', new.\"redacted_by\", 'service_instructeur', new.\"service_instructeur\", 'title', new.\"title\"), json_object('applicant_address', old.\"applicant_address\", 'applicant_name', old.\"applicant_name\", 'contacts', old.\"contacts\", 'created_at', old.\"created_at\", 'created_by_id', old.\"created_by_id\", 'created_by_username', old.\"created_by_username\", 'decision', old.\"decision\", 'further_information', old.\"further_information\", 'id', old.\"id\", 'meet_date', old.\"meet_date\", 'precisions', old.\"precisions\", 'project_cadastral_ref', old.\"project_cadastral_ref\", 'project_description', old.\"project_description\", 'project_space_type', old.\"project_space_type\", 'redacted_by', old.\"redacted_by\", 'service_instructeur', old.\"service_instructeur\", 'title', old.\"title\"), NULL);\nEND;", + "DROP TRIGGER IF EXISTS delete_main_report_into_oplog;", + "CREATE TRIGGER delete_main_report_into_oplog\n AFTER DELETE ON \"main\".\"report\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'DELETE', json_object('id', old.\"id\"), NULL, json_object('applicant_address', old.\"applicant_address\", 'applicant_name', old.\"applicant_name\", 'contacts', old.\"contacts\", 'created_at', old.\"created_at\", 'created_by_id', old.\"created_by_id\", 'created_by_username', old.\"created_by_username\", 'decision', old.\"decision\", 'further_information', old.\"further_information\", 'id', old.\"id\", 'meet_date', old.\"meet_date\", 'precisions', old.\"precisions\", 'project_cadastral_ref', old.\"project_cadastral_ref\", 'project_description', old.\"project_description\", 'project_space_type', old.\"project_space_type\", 'redacted_by', old.\"redacted_by\", 'service_instructeur', old.\"service_instructeur\", 'title', old.\"title\"), NULL);\nEND;" + ], + "version": "2" + }, + { + "statements": [ + "CREATE TABLE \"chip\" (\n \"id\" TEXT NOT NULL,\n \"label\" TEXT NOT NULL,\n \"value\" TEXT NOT NULL,\n CONSTRAINT \"chip_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", + "CREATE TABLE \"report_to_chip\" (\n \"id\" TEXT NOT NULL,\n \"report_id\" TEXT NOT NULL,\n \"chip_id\" TEXT NOT NULL,\n CONSTRAINT \"report_to_chip_chip_id_fkey\" FOREIGN KEY (\"chip_id\") REFERENCES \"chip\" (\"id\") ON DELETE CASCADE,\n CONSTRAINT \"report_to_chip_report_id_fkey\" FOREIGN KEY (\"report_id\") REFERENCES \"report\" (\"id\") ON DELETE CASCADE,\n CONSTRAINT \"report_to_chip_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", + "INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('main.chip', 1);", + "DROP TRIGGER IF EXISTS update_ensure_main_chip_primarykey;", + "CREATE TRIGGER update_ensure_main_chip_primarykey\n BEFORE UPDATE ON \"main\".\"chip\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"id\" != new.\"id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column id as it belongs to the primary key')\n END;\nEND;", + "DROP TRIGGER IF EXISTS insert_main_chip_into_oplog;", + "CREATE TRIGGER insert_main_chip_into_oplog\n AFTER INSERT ON \"main\".\"chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.chip')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'chip', 'INSERT', json_object('id', new.\"id\"), json_object('id', new.\"id\", 'label', new.\"label\", 'value', new.\"value\"), NULL, NULL);\nEND;", + "DROP TRIGGER IF EXISTS update_main_chip_into_oplog;", + "CREATE TRIGGER update_main_chip_into_oplog\n AFTER UPDATE ON \"main\".\"chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.chip')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'chip', 'UPDATE', json_object('id', new.\"id\"), json_object('id', new.\"id\", 'label', new.\"label\", 'value', new.\"value\"), json_object('id', old.\"id\", 'label', old.\"label\", 'value', old.\"value\"), NULL);\nEND;", + "DROP TRIGGER IF EXISTS delete_main_chip_into_oplog;", + "CREATE TRIGGER delete_main_chip_into_oplog\n AFTER DELETE ON \"main\".\"chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.chip')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'chip', 'DELETE', json_object('id', old.\"id\"), NULL, json_object('id', old.\"id\", 'label', old.\"label\", 'value', old.\"value\"), NULL);\nEND;", + "INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('main.report_to_chip', 1);", + "DROP TRIGGER IF EXISTS update_ensure_main_report_to_chip_primarykey;", + "CREATE TRIGGER update_ensure_main_report_to_chip_primarykey\n BEFORE UPDATE ON \"main\".\"report_to_chip\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"id\" != new.\"id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column id as it belongs to the primary key')\n END;\nEND;", + "DROP TRIGGER IF EXISTS insert_main_report_to_chip_into_oplog;", + "CREATE TRIGGER insert_main_report_to_chip_into_oplog\n AFTER INSERT ON \"main\".\"report_to_chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report_to_chip')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report_to_chip', 'INSERT', json_object('id', new.\"id\"), json_object('chip_id', new.\"chip_id\", 'id', new.\"id\", 'report_id', new.\"report_id\"), NULL, NULL);\nEND;", + "DROP TRIGGER IF EXISTS update_main_report_to_chip_into_oplog;", + "CREATE TRIGGER update_main_report_to_chip_into_oplog\n AFTER UPDATE ON \"main\".\"report_to_chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report_to_chip')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report_to_chip', 'UPDATE', json_object('id', new.\"id\"), json_object('chip_id', new.\"chip_id\", 'id', new.\"id\", 'report_id', new.\"report_id\"), json_object('chip_id', old.\"chip_id\", 'id', old.\"id\", 'report_id', old.\"report_id\"), NULL);\nEND;", + "DROP TRIGGER IF EXISTS delete_main_report_to_chip_into_oplog;", + "CREATE TRIGGER delete_main_report_to_chip_into_oplog\n AFTER DELETE ON \"main\".\"report_to_chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report_to_chip')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report_to_chip', 'DELETE', json_object('id', old.\"id\"), NULL, json_object('chip_id', old.\"chip_id\", 'id', old.\"id\", 'report_id', old.\"report_id\"), NULL);\nEND;", + "DROP TRIGGER IF EXISTS compensation_insert_main_report_to_chip_chip_id_into_oplog;", + "CREATE TRIGGER compensation_insert_main_report_to_chip_chip_id_into_oplog\n AFTER INSERT ON \"main\".\"report_to_chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.chip') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'chip', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"chip\" WHERE \"id\" = new.\"chip_id\";\nEND;", + "DROP TRIGGER IF EXISTS compensation_update_main_report_to_chip_chip_id_into_oplog;", + "CREATE TRIGGER compensation_update_main_report_to_chip_chip_id_into_oplog\n AFTER UPDATE ON \"main\".\"report_to_chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.chip') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'chip', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"chip\" WHERE \"id\" = new.\"chip_id\";\nEND;", + "DROP TRIGGER IF EXISTS compensation_insert_main_report_to_chip_report_id_into_oplog;", + "CREATE TRIGGER compensation_insert_main_report_to_chip_report_id_into_oplog\n AFTER INSERT ON \"main\".\"report_to_chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'report', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"report_id\";\nEND;", + "DROP TRIGGER IF EXISTS compensation_update_main_report_to_chip_report_id_into_oplog;", + "CREATE TRIGGER compensation_update_main_report_to_chip_report_id_into_oplog\n AFTER UPDATE ON \"main\".\"report_to_chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'report', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"report_id\";\nEND;" + ], + "version": "3" + } +] \ No newline at end of file diff --git a/packages/electric-client/src/generated/client/prismaClient.d.ts b/packages/electric-client/src/generated/client/prismaClient.d.ts new file mode 100644 index 00000000..2bd1c0bb --- /dev/null +++ b/packages/electric-client/src/generated/client/prismaClient.d.ts @@ -0,0 +1,8028 @@ + +/** + * Client +**/ + +import * as runtime from './runtime/library'; +import $Types = runtime.Types // general types +import $Public = runtime.Types.Public +import $Utils = runtime.Types.Utils +import $Extensions = runtime.Types.Extensions + +export type PrismaPromise = $Public.PrismaPromise + + +export type ChipPayload = { + name: "Chip" + objects: { + report_to_chip: Report_to_chipPayload[] + } + scalars: $Extensions.GetResult<{ + id: string + label: string + value: string + }, ExtArgs["result"]["chip"]> + composites: {} +} + +/** + * Model Chip + * + */ +export type Chip = runtime.Types.DefaultSelection +export type ClausePayload = { + name: "Clause" + objects: { + report_to_clause: Report_to_clausePayload[] + } + scalars: $Extensions.GetResult<{ + id: string + label: string + value: string + }, ExtArgs["result"]["clause"]> + composites: {} +} + +/** + * Model Clause + * + */ +export type Clause = runtime.Types.DefaultSelection +export type ReportPayload = { + name: "Report" + objects: { + report_to_chip: Report_to_chipPayload[] + report_to_clause: Report_to_clausePayload[] + } + scalars: $Extensions.GetResult<{ + id: string + title: string | null + project_description: string | null + redacted_by: string | null + meet_date: Date | null + applicant_name: string | null + applicant_address: string | null + project_cadastral_ref: string | null + project_space_type: string | null + decision: string | null + precisions: string | null + contacts: string | null + further_information: string | null + created_by_id: string + created_by_username: string + created_at: Date + service_instructeur: string | null + }, ExtArgs["result"]["report"]> + composites: {} +} + +/** + * Model Report + * + */ +export type Report = runtime.Types.DefaultSelection +export type Report_to_chipPayload = { + name: "Report_to_chip" + objects: { + chip: ChipPayload + report: ReportPayload + } + scalars: $Extensions.GetResult<{ + id: string + report_id: string + chip_id: string + }, ExtArgs["result"]["report_to_chip"]> + composites: {} +} + +/** + * Model Report_to_chip + * + */ +export type Report_to_chip = runtime.Types.DefaultSelection +export type Report_to_clausePayload = { + name: "Report_to_clause" + objects: { + clause: ClausePayload + report: ReportPayload + } + scalars: $Extensions.GetResult<{ + id: string + report_id: string + clause_id: string + }, ExtArgs["result"]["report_to_clause"]> + composites: {} +} + +/** + * Model Report_to_clause + * + */ +export type Report_to_clause = runtime.Types.DefaultSelection + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Chips + * const chips = await prisma.chip.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ +export class PrismaClient< + T extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, + GlobalReject extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined = 'rejectOnNotFound' extends keyof T + ? T['rejectOnNotFound'] + : false, + ExtArgs extends $Extensions.Args = $Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + /** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Chips + * const chips = await prisma.chip.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ + + constructor(optionsArg ?: Prisma.Subset); + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : V extends 'beforeExit' ? () => Promise : Prisma.LogEvent) => void): void; + + /** + * Connect with the database + */ + $connect(): Promise; + + /** + * Disconnect from the database + */ + $disconnect(): Promise; + + /** + * Add a middleware + * @deprecated since 4.16.0. For new code, prefer client extensions instead. + * @see https://pris.ly/d/extensions + */ + $use(cb: Prisma.Middleware): void + +/** + * Executes a prepared raw query and returns the number of affected rows. + * @example + * ``` + * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a prepared raw query and returns the `SELECT` data. + * @example + * ``` + * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the `SELECT` data. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + * @example + * ``` + * const [george, bob, alice] = await prisma.$transaction([ + * prisma.user.create({ data: { name: 'George' } }), + * prisma.user.create({ data: { name: 'Bob' } }), + * prisma.user.create({ data: { name: 'Alice' } }), + * ]) + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). + */ + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): Promise> + + $transaction(fn: (prisma: Omit) => Promise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): Promise + + + $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> + + /** + * `prisma.chip`: Exposes CRUD operations for the **Chip** model. + * Example usage: + * ```ts + * // Fetch zero or more Chips + * const chips = await prisma.chip.findMany() + * ``` + */ + get chip(): Prisma.ChipDelegate; + + /** + * `prisma.clause`: Exposes CRUD operations for the **Clause** model. + * Example usage: + * ```ts + * // Fetch zero or more Clauses + * const clauses = await prisma.clause.findMany() + * ``` + */ + get clause(): Prisma.ClauseDelegate; + + /** + * `prisma.report`: Exposes CRUD operations for the **Report** model. + * Example usage: + * ```ts + * // Fetch zero or more Reports + * const reports = await prisma.report.findMany() + * ``` + */ + get report(): Prisma.ReportDelegate; + + /** + * `prisma.report_to_chip`: Exposes CRUD operations for the **Report_to_chip** model. + * Example usage: + * ```ts + * // Fetch zero or more Report_to_chips + * const report_to_chips = await prisma.report_to_chip.findMany() + * ``` + */ + get report_to_chip(): Prisma.Report_to_chipDelegate; + + /** + * `prisma.report_to_clause`: Exposes CRUD operations for the **Report_to_clause** model. + * Example usage: + * ```ts + * // Fetch zero or more Report_to_clauses + * const report_to_clauses = await prisma.report_to_clause.findMany() + * ``` + */ + get report_to_clause(): Prisma.Report_to_clauseDelegate; +} + +export namespace Prisma { + export import DMMF = runtime.DMMF + + export type PrismaPromise = $Public.PrismaPromise + + /** + * Validator + */ + export import validator = runtime.Public.validator + + /** + * Prisma Errors + */ + export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + export import PrismaClientInitializationError = runtime.PrismaClientInitializationError + export import PrismaClientValidationError = runtime.PrismaClientValidationError + export import NotFoundError = runtime.NotFoundError + + /** + * Re-export of sql-template-tag + */ + export import sql = runtime.sqltag + export import empty = runtime.empty + export import join = runtime.join + export import raw = runtime.raw + export import Sql = runtime.Sql + + /** + * Decimal.js + */ + export import Decimal = runtime.Decimal + + export type DecimalJsLike = runtime.DecimalJsLike + + /** + * Metrics + */ + export type Metrics = runtime.Metrics + export type Metric = runtime.Metric + export type MetricHistogram = runtime.MetricHistogram + export type MetricHistogramBucket = runtime.MetricHistogramBucket + + /** + * Extensions + */ + export type Extension = $Extensions.UserArgs + export import getExtensionContext = runtime.Extensions.getExtensionContext + export type Args = $Public.Args + export type Payload = $Public.Payload + export type Result = $Public.Result + export type Exact = $Public.Exact + + /** + * Prisma Client JS version: 4.16.2 + * Query Engine version: d6e67a83f971b175a593ccc12e15c4a757f93ffe + */ + export type PrismaVersion = { + client: string + } + + export const prismaVersion: PrismaVersion + + /** + * Utility Types + */ + + /** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON object. + * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. + */ + export type JsonObject = {[Key in string]?: JsonValue} + + /** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON array. + */ + export interface JsonArray extends Array {} + + /** + * From https://github.com/sindresorhus/type-fest/ + * Matches any valid JSON value. + */ + export type JsonValue = string | number | boolean | JsonObject | JsonArray | null + + /** + * Matches a JSON object. + * Unlike `JsonObject`, this type allows undefined and read-only properties. + */ + export type InputJsonObject = {readonly [Key in string]?: InputJsonValue | null} + + /** + * Matches a JSON array. + * Unlike `JsonArray`, readonly arrays are assignable to this type. + */ + export interface InputJsonArray extends ReadonlyArray {} + + /** + * Matches any valid value that can be used as an input for operations like + * create and update as the value of a JSON field. Unlike `JsonValue`, this + * type allows read-only arrays and read-only object properties and disallows + * `null` at the top level. + * + * `null` cannot be used as the value of a JSON field because its meaning + * would be ambiguous. Use `Prisma.JsonNull` to store the JSON null value or + * `Prisma.DbNull` to clear the JSON value and set the field to the database + * NULL value instead. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values + */ +export type InputJsonValue = null | string | number | boolean | InputJsonObject | InputJsonArray + + /** + * Types of the values used to represent different kinds of `null` values when working with JSON fields. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + namespace NullTypes { + /** + * Type of `Prisma.DbNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class DbNull { + private DbNull: never + private constructor() + } + + /** + * Type of `Prisma.JsonNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class JsonNull { + private JsonNull: never + private constructor() + } + + /** + * Type of `Prisma.AnyNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class AnyNull { + private AnyNull: never + private constructor() + } + } + + /** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const DbNull: NullTypes.DbNull + + /** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const JsonNull: NullTypes.JsonNull + + /** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const AnyNull: NullTypes.AnyNull + + type SelectAndInclude = { + select: any + include: any + } + type HasSelect = { + select: any + } + type HasInclude = { + include: any + } + type CheckSelect = T extends SelectAndInclude + ? 'Please either choose `select` or `include`' + : T extends HasSelect + ? U + : T extends HasInclude + ? U + : S + + /** + * Get the type of the value, that the Promise holds. + */ + export type PromiseType> = T extends PromiseLike ? U : T; + + /** + * Get the return type of a function which returns a Promise. + */ + export type PromiseReturnType Promise> = PromiseType> + + /** + * From T, pick a set of properties whose keys are in the union K + */ + type Prisma__Pick = { + [P in K]: T[P]; + }; + + + export type Enumerable = T | Array; + + export type RequiredKeys = { + [K in keyof T]-?: {} extends Prisma__Pick ? never : K + }[keyof T] + + export type TruthyKeys = keyof { + [K in keyof T as T[K] extends false | undefined | null ? never : K]: K + } + + export type TrueKeys = TruthyKeys>> + + /** + * Subset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection + */ + export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; + }; + + /** + * SelectSubset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ + export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : {}) + + /** + * Subset + Intersection + * @desc From `T` pick properties that exist in `U` and intersect `K` + */ + export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + K + + type Without = { [P in Exclude]?: never }; + + /** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ + type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + + /** + * Is T a Record? + */ + type IsObject = T extends Array + ? False + : T extends Date + ? False + : T extends Uint8Array + ? False + : T extends BigInt + ? False + : T extends object + ? True + : False + + + /** + * If it's T[], return T + */ + export type UnEnumerate = T extends Array ? U : T + + /** + * From ts-toolbelt + */ + + type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + + type EitherStrict = Strict<__Either> + + type EitherLoose = ComputeRaw<__Either> + + type _Either< + O extends object, + K extends Key, + strict extends Boolean + > = { + 1: EitherStrict + 0: EitherLoose + }[strict] + + type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 + > = O extends unknown ? _Either : never + + export type Union = any + + type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] + } & {} + + /** Helper Types for "Merge" **/ + export type IntersectOf = ( + U extends unknown ? (k: U) => void : never + ) extends (k: infer I) => void + ? I + : never + + export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; + } & {}; + + type _Merge = IntersectOf; + }>>; + + type Key = string | number | symbol; + type AtBasic = K extends keyof O ? O[K] : never; + type AtStrict = O[K & keyof O]; + type AtLoose = O extends unknown ? AtStrict : never; + export type At = { + 1: AtStrict; + 0: AtLoose; + }[strict]; + + export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; + } & {}; + + export type OptionalFlat = { + [K in keyof O]?: O[K]; + } & {}; + + type _Record = { + [P in K]: T; + }; + + // cause typescript not to expand types and preserve names + type NoExpand = T extends unknown ? T : never; + + // this type assumes the passed object is entirely optional + type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O + : never>; + + type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + + export type Strict = ComputeRaw<_Strict>; + /** End Helper Types for "Merge" **/ + + export type Merge = ComputeRaw<_Merge>>; + + /** + A [[Boolean]] + */ + export type Boolean = True | False + + // /** + // 1 + // */ + export type True = 1 + + /** + 0 + */ + export type False = 0 + + export type Not = { + 0: 1 + 1: 0 + }[B] + + export type Extends = [A1] extends [never] + ? 0 // anything `never` is false + : A1 extends A2 + ? 1 + : 0 + + export type Has = Not< + Extends, U1> + > + + export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } + }[B1][B2] + + export type Keys = U extends unknown ? keyof U : never + + type Cast = A extends B ? A : B; + + export const type: unique symbol; + + + + /** + * Used by group by + */ + + export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never + } : never + + type FieldPaths< + T, + U = Omit + > = IsObject extends True ? U : T + + type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K + }[keyof T] + + /** + * Convert tuple to union + */ + type _TupleToUnion = T extends (infer E)[] ? E : never + type TupleToUnion = _TupleToUnion + type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + + /** + * Like `Pick`, but with an array + */ + type PickArray> = Prisma__Pick> + + /** + * Exclude all keys with underscores + */ + type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + + export type FieldRef = runtime.FieldRef + + type FieldRefInputType = Model extends never ? never : FieldRef + + + export const ModelName: { + Chip: 'Chip', + Clause: 'Clause', + Report: 'Report', + Report_to_chip: 'Report_to_chip', + Report_to_clause: 'Report_to_clause' + }; + + export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + export type Datasources = { + db?: Datasource + } + + + interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.Args}, $Utils.Record> { + returns: Prisma.TypeMap + } + + export type TypeMap = { + meta: { + modelProps: 'chip' | 'clause' | 'report' | 'report_to_chip' | 'report_to_clause' + txIsolationLevel: Prisma.TransactionIsolationLevel + }, + model: { + Chip: { + payload: ChipPayload + operations: { + findUnique: { + args: Prisma.ChipFindUniqueArgs, + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChipFindUniqueOrThrowArgs, + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChipFindFirstArgs, + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChipFindFirstOrThrowArgs, + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChipFindManyArgs, + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChipCreateArgs, + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChipCreateManyArgs, + result: Prisma.BatchPayload + } + delete: { + args: Prisma.ChipDeleteArgs, + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChipUpdateArgs, + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChipDeleteManyArgs, + result: Prisma.BatchPayload + } + updateMany: { + args: Prisma.ChipUpdateManyArgs, + result: Prisma.BatchPayload + } + upsert: { + args: Prisma.ChipUpsertArgs, + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChipAggregateArgs, + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChipGroupByArgs, + result: $Utils.Optional[] + } + count: { + args: Prisma.ChipCountArgs, + result: $Utils.Optional | number + } + } + } + Clause: { + payload: ClausePayload + operations: { + findUnique: { + args: Prisma.ClauseFindUniqueArgs, + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ClauseFindUniqueOrThrowArgs, + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ClauseFindFirstArgs, + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ClauseFindFirstOrThrowArgs, + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ClauseFindManyArgs, + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ClauseCreateArgs, + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ClauseCreateManyArgs, + result: Prisma.BatchPayload + } + delete: { + args: Prisma.ClauseDeleteArgs, + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ClauseUpdateArgs, + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ClauseDeleteManyArgs, + result: Prisma.BatchPayload + } + updateMany: { + args: Prisma.ClauseUpdateManyArgs, + result: Prisma.BatchPayload + } + upsert: { + args: Prisma.ClauseUpsertArgs, + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ClauseAggregateArgs, + result: $Utils.Optional + } + groupBy: { + args: Prisma.ClauseGroupByArgs, + result: $Utils.Optional[] + } + count: { + args: Prisma.ClauseCountArgs, + result: $Utils.Optional | number + } + } + } + Report: { + payload: ReportPayload + operations: { + findUnique: { + args: Prisma.ReportFindUniqueArgs, + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ReportFindUniqueOrThrowArgs, + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ReportFindFirstArgs, + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ReportFindFirstOrThrowArgs, + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ReportFindManyArgs, + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ReportCreateArgs, + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ReportCreateManyArgs, + result: Prisma.BatchPayload + } + delete: { + args: Prisma.ReportDeleteArgs, + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ReportUpdateArgs, + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ReportDeleteManyArgs, + result: Prisma.BatchPayload + } + updateMany: { + args: Prisma.ReportUpdateManyArgs, + result: Prisma.BatchPayload + } + upsert: { + args: Prisma.ReportUpsertArgs, + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ReportAggregateArgs, + result: $Utils.Optional + } + groupBy: { + args: Prisma.ReportGroupByArgs, + result: $Utils.Optional[] + } + count: { + args: Prisma.ReportCountArgs, + result: $Utils.Optional | number + } + } + } + Report_to_chip: { + payload: Report_to_chipPayload + operations: { + findUnique: { + args: Prisma.Report_to_chipFindUniqueArgs, + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.Report_to_chipFindUniqueOrThrowArgs, + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.Report_to_chipFindFirstArgs, + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.Report_to_chipFindFirstOrThrowArgs, + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.Report_to_chipFindManyArgs, + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.Report_to_chipCreateArgs, + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.Report_to_chipCreateManyArgs, + result: Prisma.BatchPayload + } + delete: { + args: Prisma.Report_to_chipDeleteArgs, + result: $Utils.PayloadToResult + } + update: { + args: Prisma.Report_to_chipUpdateArgs, + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.Report_to_chipDeleteManyArgs, + result: Prisma.BatchPayload + } + updateMany: { + args: Prisma.Report_to_chipUpdateManyArgs, + result: Prisma.BatchPayload + } + upsert: { + args: Prisma.Report_to_chipUpsertArgs, + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.Report_to_chipAggregateArgs, + result: $Utils.Optional + } + groupBy: { + args: Prisma.Report_to_chipGroupByArgs, + result: $Utils.Optional[] + } + count: { + args: Prisma.Report_to_chipCountArgs, + result: $Utils.Optional | number + } + } + } + Report_to_clause: { + payload: Report_to_clausePayload + operations: { + findUnique: { + args: Prisma.Report_to_clauseFindUniqueArgs, + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.Report_to_clauseFindUniqueOrThrowArgs, + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.Report_to_clauseFindFirstArgs, + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.Report_to_clauseFindFirstOrThrowArgs, + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.Report_to_clauseFindManyArgs, + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.Report_to_clauseCreateArgs, + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.Report_to_clauseCreateManyArgs, + result: Prisma.BatchPayload + } + delete: { + args: Prisma.Report_to_clauseDeleteArgs, + result: $Utils.PayloadToResult + } + update: { + args: Prisma.Report_to_clauseUpdateArgs, + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.Report_to_clauseDeleteManyArgs, + result: Prisma.BatchPayload + } + updateMany: { + args: Prisma.Report_to_clauseUpdateManyArgs, + result: Prisma.BatchPayload + } + upsert: { + args: Prisma.Report_to_clauseUpsertArgs, + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.Report_to_clauseAggregateArgs, + result: $Utils.Optional + } + groupBy: { + args: Prisma.Report_to_clauseGroupByArgs, + result: $Utils.Optional[] + } + count: { + args: Prisma.Report_to_clauseCountArgs, + result: $Utils.Optional | number + } + } + } + } + } & { + other: { + payload: any + operations: { + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $executeRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + } + } + } + export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs> + export type DefaultPrismaClient = PrismaClient + export type RejectOnNotFound = boolean | ((error: Error) => Error) + export type RejectPerModel = { [P in ModelName]?: RejectOnNotFound } + export type RejectPerOperation = { [P in "findUnique" | "findFirst"]?: RejectPerModel | RejectOnNotFound } + type IsReject = T extends true ? True : T extends (err: Error) => Error ? True : False + export type HasReject< + GlobalRejectSettings extends Prisma.PrismaClientOptions['rejectOnNotFound'], + LocalRejectSettings, + Action extends PrismaAction, + Model extends ModelName + > = LocalRejectSettings extends RejectOnNotFound + ? IsReject + : GlobalRejectSettings extends RejectPerOperation + ? Action extends keyof GlobalRejectSettings + ? GlobalRejectSettings[Action] extends RejectOnNotFound + ? IsReject + : GlobalRejectSettings[Action] extends RejectPerModel + ? Model extends keyof GlobalRejectSettings[Action] + ? IsReject + : False + : False + : False + : IsReject + export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' + + export interface PrismaClientOptions { + /** + * Configure findUnique/findFirst to throw an error if the query returns null. + * @deprecated since 4.0.0. Use `findUniqueOrThrow`/`findFirstOrThrow` methods instead. + * @example + * ``` + * // Reject on both findUnique/findFirst + * rejectOnNotFound: true + * // Reject only on findFirst with a custom error + * rejectOnNotFound: { findFirst: (err) => new Error("Custom Error")} + * // Reject on user.findUnique with a custom error + * rejectOnNotFound: { findUnique: {User: (err) => new Error("User not found")}} + * ``` + */ + rejectOnNotFound?: RejectOnNotFound | RejectPerOperation + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources + + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + + /** + * @example + * ``` + * // Defaults to stdout + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events + * log: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * ] + * ``` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: Array + } + + /* Types for Logging */ + export type LogLevel = 'info' | 'query' | 'warn' | 'error' + export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' + } + + export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never + export type GetEvents = T extends Array ? + GetLogType | GetLogType | GetLogType | GetLogType + : never + + export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string + } + + export type LogEvent = { + timestamp: Date + message: string + target: string + } + /* End Types for Logging */ + + + export type PrismaAction = + | 'findUnique' + | 'findMany' + | 'findFirst' + | 'create' + | 'createMany' + | 'update' + | 'updateMany' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + + /** + * These options are being passed into the middleware as "params" + */ + export type MiddlewareParams = { + model?: ModelName + action: PrismaAction + args: any + dataPath: string[] + runInTransaction: boolean + } + + /** + * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation + */ + export type Middleware = ( + params: MiddlewareParams, + next: (params: MiddlewareParams) => Promise, + ) => Promise + + // tested in getLogLevel.test.ts + export function getLogLevel(log: Array): LogLevel | undefined; + + /** + * `PrismaClient` proxy available in interactive transactions. + */ + export type TransactionClient = Omit + + export type Datasource = { + url?: string + } + + /** + * Count Types + */ + + + /** + * Count Type ChipCountOutputType + */ + + + export type ChipCountOutputType = { + report_to_chip: number + } + + export type ChipCountOutputTypeSelect = { + report_to_chip?: boolean | ChipCountOutputTypeCountReport_to_chipArgs + } + + // Custom InputTypes + + /** + * ChipCountOutputType without action + */ + export type ChipCountOutputTypeArgs = { + /** + * Select specific fields to fetch from the ChipCountOutputType + */ + select?: ChipCountOutputTypeSelect | null + } + + + /** + * ChipCountOutputType without action + */ + export type ChipCountOutputTypeCountReport_to_chipArgs = { + where?: Report_to_chipWhereInput + } + + + + /** + * Count Type ClauseCountOutputType + */ + + + export type ClauseCountOutputType = { + report_to_clause: number + } + + export type ClauseCountOutputTypeSelect = { + report_to_clause?: boolean | ClauseCountOutputTypeCountReport_to_clauseArgs + } + + // Custom InputTypes + + /** + * ClauseCountOutputType without action + */ + export type ClauseCountOutputTypeArgs = { + /** + * Select specific fields to fetch from the ClauseCountOutputType + */ + select?: ClauseCountOutputTypeSelect | null + } + + + /** + * ClauseCountOutputType without action + */ + export type ClauseCountOutputTypeCountReport_to_clauseArgs = { + where?: Report_to_clauseWhereInput + } + + + + /** + * Count Type ReportCountOutputType + */ + + + export type ReportCountOutputType = { + report_to_chip: number + report_to_clause: number + } + + export type ReportCountOutputTypeSelect = { + report_to_chip?: boolean | ReportCountOutputTypeCountReport_to_chipArgs + report_to_clause?: boolean | ReportCountOutputTypeCountReport_to_clauseArgs + } + + // Custom InputTypes + + /** + * ReportCountOutputType without action + */ + export type ReportCountOutputTypeArgs = { + /** + * Select specific fields to fetch from the ReportCountOutputType + */ + select?: ReportCountOutputTypeSelect | null + } + + + /** + * ReportCountOutputType without action + */ + export type ReportCountOutputTypeCountReport_to_chipArgs = { + where?: Report_to_chipWhereInput + } + + + /** + * ReportCountOutputType without action + */ + export type ReportCountOutputTypeCountReport_to_clauseArgs = { + where?: Report_to_clauseWhereInput + } + + + + /** + * Models + */ + + /** + * Model Chip + */ + + + export type AggregateChip = { + _count: ChipCountAggregateOutputType | null + _min: ChipMinAggregateOutputType | null + _max: ChipMaxAggregateOutputType | null + } + + export type ChipMinAggregateOutputType = { + id: string | null + label: string | null + value: string | null + } + + export type ChipMaxAggregateOutputType = { + id: string | null + label: string | null + value: string | null + } + + export type ChipCountAggregateOutputType = { + id: number + label: number + value: number + _all: number + } + + + export type ChipMinAggregateInputType = { + id?: true + label?: true + value?: true + } + + export type ChipMaxAggregateInputType = { + id?: true + label?: true + value?: true + } + + export type ChipCountAggregateInputType = { + id?: true + label?: true + value?: true + _all?: true + } + + export type ChipAggregateArgs = { + /** + * Filter which Chip to aggregate. + */ + where?: ChipWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Chips to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChipWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Chips from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Chips. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Chips + **/ + _count?: true | ChipCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChipMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChipMaxAggregateInputType + } + + export type GetChipAggregateType = { + [P in keyof T & keyof AggregateChip]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChipGroupByArgs = { + where?: ChipWhereInput + orderBy?: Enumerable + by: ChipScalarFieldEnum[] + having?: ChipScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChipCountAggregateInputType | true + _min?: ChipMinAggregateInputType + _max?: ChipMaxAggregateInputType + } + + + export type ChipGroupByOutputType = { + id: string + label: string + value: string + _count: ChipCountAggregateOutputType | null + _min: ChipMinAggregateOutputType | null + _max: ChipMaxAggregateOutputType | null + } + + type GetChipGroupByPayload = Prisma.PrismaPromise< + Array< + PickArray & + { + [P in ((keyof T) & (keyof ChipGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChipSelect = $Extensions.GetSelect<{ + id?: boolean + label?: boolean + value?: boolean + report_to_chip?: boolean | Chip$report_to_chipArgs + _count?: boolean | ChipCountOutputTypeArgs + }, ExtArgs["result"]["chip"]> + + export type ChipSelectScalar = { + id?: boolean + label?: boolean + value?: boolean + } + + export type ChipInclude = { + report_to_chip?: boolean | Chip$report_to_chipArgs + _count?: boolean | ChipCountOutputTypeArgs + } + + + type ChipGetPayload = $Types.GetResult + + type ChipCountArgs = + Omit & { + select?: ChipCountAggregateInputType | true + } + + export interface ChipDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Chip'], meta: { name: 'Chip' } } + /** + * Find zero or one Chip that matches the filter. + * @param {ChipFindUniqueArgs} args - Arguments to find a Chip + * @example + * // Get one Chip + * const chip = await prisma.chip.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__ChipClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__ChipClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + + /** + * Find one Chip that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChipFindUniqueOrThrowArgs} args - Arguments to find a Chip + * @example + * // Get one Chip + * const chip = await prisma.chip.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__ChipClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + + /** + * Find the first Chip that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChipFindFirstArgs} args - Arguments to find a Chip + * @example + * // Get one Chip + * const chip = await prisma.chip.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__ChipClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__ChipClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + + /** + * Find the first Chip that matches the filter or + * throw `NotFoundError` if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChipFindFirstOrThrowArgs} args - Arguments to find a Chip + * @example + * // Get one Chip + * const chip = await prisma.chip.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__ChipClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + + /** + * Find zero or more Chips that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChipFindManyArgs=} args - Arguments to filter and select certain fields only. + * @example + * // Get all Chips + * const chips = await prisma.chip.findMany() + * + * // Get first 10 Chips + * const chips = await prisma.chip.findMany({ take: 10 }) + * + * // Only select the `id` + * const chipWithIdOnly = await prisma.chip.findMany({ select: { id: true } }) + * + **/ + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + + /** + * Create a Chip. + * @param {ChipCreateArgs} args - Arguments to create a Chip. + * @example + * // Create one Chip + * const Chip = await prisma.chip.create({ + * data: { + * // ... data to create a Chip + * } + * }) + * + **/ + create>( + args: SelectSubset> + ): Prisma__ChipClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + + /** + * Create many Chips. + * @param {ChipCreateManyArgs} args - Arguments to create many Chips. + * @example + * // Create many Chips + * const chip = await prisma.chip.createMany({ + * data: { + * // ... provide data here + * } + * }) + * + **/ + createMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Delete a Chip. + * @param {ChipDeleteArgs} args - Arguments to delete one Chip. + * @example + * // Delete one Chip + * const Chip = await prisma.chip.delete({ + * where: { + * // ... filter to delete one Chip + * } + * }) + * + **/ + delete>( + args: SelectSubset> + ): Prisma__ChipClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + + /** + * Update one Chip. + * @param {ChipUpdateArgs} args - Arguments to update one Chip. + * @example + * // Update one Chip + * const chip = await prisma.chip.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + update>( + args: SelectSubset> + ): Prisma__ChipClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + + /** + * Delete zero or more Chips. + * @param {ChipDeleteManyArgs} args - Arguments to filter Chips to delete. + * @example + * // Delete a few Chips + * const { count } = await prisma.chip.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + **/ + deleteMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Update zero or more Chips. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChipUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Chips + * const chip = await prisma.chip.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + updateMany>( + args: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Create or update one Chip. + * @param {ChipUpsertArgs} args - Arguments to update or create a Chip. + * @example + * // Update or create a Chip + * const chip = await prisma.chip.upsert({ + * create: { + * // ... data to create a Chip + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Chip we want to update + * } + * }) + **/ + upsert>( + args: SelectSubset> + ): Prisma__ChipClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + + /** + * Count the number of Chips. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChipCountArgs} args - Arguments to filter Chips to count. + * @example + * // Count the number of Chips + * const count = await prisma.chip.count({ + * where: { + * // ... the filter for the Chips we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Chip. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChipAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Chip. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChipGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChipGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChipGroupByArgs['orderBy'] } + : { orderBy?: ChipGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends TupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChipGroupByPayload : Prisma.PrismaPromise + + } + + /** + * The delegate class that acts as a "Promise-like" for Chip. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export class Prisma__ChipClient implements Prisma.PrismaPromise { + private readonly _dmmf; + private readonly _queryType; + private readonly _rootField; + private readonly _clientMethod; + private readonly _args; + private readonly _dataPath; + private readonly _errorFormat; + private readonly _measurePerformance?; + private _isList; + private _callsite; + private _requestPromise?; + readonly [Symbol.toStringTag]: 'PrismaPromise'; + constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); + + report_to_chip = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + + private get _document(); + /** + * 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): Promise; + /** + * 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): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; + } + + + + // Custom InputTypes + + /** + * Chip base type for findUnique actions + */ + export type ChipFindUniqueArgsBase = { + /** + * Select specific fields to fetch from the Chip + */ + select?: ChipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ChipInclude | null + /** + * Filter, which Chip to fetch. + */ + where: ChipWhereUniqueInput + } + + /** + * Chip findUnique + */ + export interface ChipFindUniqueArgs extends ChipFindUniqueArgsBase { + /** + * Throw an Error if query returns no results + * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead + */ + rejectOnNotFound?: RejectOnNotFound + } + + + /** + * Chip findUniqueOrThrow + */ + export type ChipFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Chip + */ + select?: ChipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ChipInclude | null + /** + * Filter, which Chip to fetch. + */ + where: ChipWhereUniqueInput + } + + + /** + * Chip base type for findFirst actions + */ + export type ChipFindFirstArgsBase = { + /** + * Select specific fields to fetch from the Chip + */ + select?: ChipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ChipInclude | null + /** + * Filter, which Chip to fetch. + */ + where?: ChipWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Chips to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Chips. + */ + cursor?: ChipWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Chips from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Chips. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Chips. + */ + distinct?: Enumerable + } + + /** + * Chip findFirst + */ + export interface ChipFindFirstArgs extends ChipFindFirstArgsBase { + /** + * Throw an Error if query returns no results + * @deprecated since 4.0.0: use `findFirstOrThrow` method instead + */ + rejectOnNotFound?: RejectOnNotFound + } + + + /** + * Chip findFirstOrThrow + */ + export type ChipFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Chip + */ + select?: ChipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ChipInclude | null + /** + * Filter, which Chip to fetch. + */ + where?: ChipWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Chips to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Chips. + */ + cursor?: ChipWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Chips from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Chips. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Chips. + */ + distinct?: Enumerable + } + + + /** + * Chip findMany + */ + export type ChipFindManyArgs = { + /** + * Select specific fields to fetch from the Chip + */ + select?: ChipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ChipInclude | null + /** + * Filter, which Chips to fetch. + */ + where?: ChipWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Chips to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Chips. + */ + cursor?: ChipWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Chips from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Chips. + */ + skip?: number + distinct?: Enumerable + } + + + /** + * Chip create + */ + export type ChipCreateArgs = { + /** + * Select specific fields to fetch from the Chip + */ + select?: ChipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ChipInclude | null + /** + * The data needed to create a Chip. + */ + data: XOR + } + + + /** + * Chip createMany + */ + export type ChipCreateManyArgs = { + /** + * The data used to create many Chips. + */ + data: Enumerable + skipDuplicates?: boolean + } + + + /** + * Chip update + */ + export type ChipUpdateArgs = { + /** + * Select specific fields to fetch from the Chip + */ + select?: ChipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ChipInclude | null + /** + * The data needed to update a Chip. + */ + data: XOR + /** + * Choose, which Chip to update. + */ + where: ChipWhereUniqueInput + } + + + /** + * Chip updateMany + */ + export type ChipUpdateManyArgs = { + /** + * The data used to update Chips. + */ + data: XOR + /** + * Filter which Chips to update + */ + where?: ChipWhereInput + } + + + /** + * Chip upsert + */ + export type ChipUpsertArgs = { + /** + * Select specific fields to fetch from the Chip + */ + select?: ChipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ChipInclude | null + /** + * The filter to search for the Chip to update in case it exists. + */ + where: ChipWhereUniqueInput + /** + * In case the Chip found by the `where` argument doesn't exist, create a new Chip with this data. + */ + create: XOR + /** + * In case the Chip was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + + /** + * Chip delete + */ + export type ChipDeleteArgs = { + /** + * Select specific fields to fetch from the Chip + */ + select?: ChipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ChipInclude | null + /** + * Filter which Chip to delete. + */ + where: ChipWhereUniqueInput + } + + + /** + * Chip deleteMany + */ + export type ChipDeleteManyArgs = { + /** + * Filter which Chips to delete + */ + where?: ChipWhereInput + } + + + /** + * Chip.report_to_chip + */ + export type Chip$report_to_chipArgs = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + where?: Report_to_chipWhereInput + orderBy?: Enumerable + cursor?: Report_to_chipWhereUniqueInput + take?: number + skip?: number + distinct?: Enumerable + } + + + /** + * Chip without action + */ + export type ChipArgs = { + /** + * Select specific fields to fetch from the Chip + */ + select?: ChipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ChipInclude | null + } + + + + /** + * Model Clause + */ + + + export type AggregateClause = { + _count: ClauseCountAggregateOutputType | null + _min: ClauseMinAggregateOutputType | null + _max: ClauseMaxAggregateOutputType | null + } + + export type ClauseMinAggregateOutputType = { + id: string | null + label: string | null + value: string | null + } + + export type ClauseMaxAggregateOutputType = { + id: string | null + label: string | null + value: string | null + } + + export type ClauseCountAggregateOutputType = { + id: number + label: number + value: number + _all: number + } + + + export type ClauseMinAggregateInputType = { + id?: true + label?: true + value?: true + } + + export type ClauseMaxAggregateInputType = { + id?: true + label?: true + value?: true + } + + export type ClauseCountAggregateInputType = { + id?: true + label?: true + value?: true + _all?: true + } + + export type ClauseAggregateArgs = { + /** + * Filter which Clause to aggregate. + */ + where?: ClauseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Clauses to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ClauseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Clauses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Clauses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Clauses + **/ + _count?: true | ClauseCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ClauseMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ClauseMaxAggregateInputType + } + + export type GetClauseAggregateType = { + [P in keyof T & keyof AggregateClause]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ClauseGroupByArgs = { + where?: ClauseWhereInput + orderBy?: Enumerable + by: ClauseScalarFieldEnum[] + having?: ClauseScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ClauseCountAggregateInputType | true + _min?: ClauseMinAggregateInputType + _max?: ClauseMaxAggregateInputType + } + + + export type ClauseGroupByOutputType = { + id: string + label: string + value: string + _count: ClauseCountAggregateOutputType | null + _min: ClauseMinAggregateOutputType | null + _max: ClauseMaxAggregateOutputType | null + } + + type GetClauseGroupByPayload = Prisma.PrismaPromise< + Array< + PickArray & + { + [P in ((keyof T) & (keyof ClauseGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ClauseSelect = $Extensions.GetSelect<{ + id?: boolean + label?: boolean + value?: boolean + report_to_clause?: boolean | Clause$report_to_clauseArgs + _count?: boolean | ClauseCountOutputTypeArgs + }, ExtArgs["result"]["clause"]> + + export type ClauseSelectScalar = { + id?: boolean + label?: boolean + value?: boolean + } + + export type ClauseInclude = { + report_to_clause?: boolean | Clause$report_to_clauseArgs + _count?: boolean | ClauseCountOutputTypeArgs + } + + + type ClauseGetPayload = $Types.GetResult + + type ClauseCountArgs = + Omit & { + select?: ClauseCountAggregateInputType | true + } + + export interface ClauseDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Clause'], meta: { name: 'Clause' } } + /** + * Find zero or one Clause that matches the filter. + * @param {ClauseFindUniqueArgs} args - Arguments to find a Clause + * @example + * // Get one Clause + * const clause = await prisma.clause.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__ClauseClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__ClauseClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + + /** + * Find one Clause that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ClauseFindUniqueOrThrowArgs} args - Arguments to find a Clause + * @example + * // Get one Clause + * const clause = await prisma.clause.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + + /** + * Find the first Clause that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ClauseFindFirstArgs} args - Arguments to find a Clause + * @example + * // Get one Clause + * const clause = await prisma.clause.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__ClauseClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__ClauseClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + + /** + * Find the first Clause that matches the filter or + * throw `NotFoundError` if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ClauseFindFirstOrThrowArgs} args - Arguments to find a Clause + * @example + * // Get one Clause + * const clause = await prisma.clause.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + + /** + * Find zero or more Clauses that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ClauseFindManyArgs=} args - Arguments to filter and select certain fields only. + * @example + * // Get all Clauses + * const clauses = await prisma.clause.findMany() + * + * // Get first 10 Clauses + * const clauses = await prisma.clause.findMany({ take: 10 }) + * + * // Only select the `id` + * const clauseWithIdOnly = await prisma.clause.findMany({ select: { id: true } }) + * + **/ + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + + /** + * Create a Clause. + * @param {ClauseCreateArgs} args - Arguments to create a Clause. + * @example + * // Create one Clause + * const Clause = await prisma.clause.create({ + * data: { + * // ... data to create a Clause + * } + * }) + * + **/ + create>( + args: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + + /** + * Create many Clauses. + * @param {ClauseCreateManyArgs} args - Arguments to create many Clauses. + * @example + * // Create many Clauses + * const clause = await prisma.clause.createMany({ + * data: { + * // ... provide data here + * } + * }) + * + **/ + createMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Delete a Clause. + * @param {ClauseDeleteArgs} args - Arguments to delete one Clause. + * @example + * // Delete one Clause + * const Clause = await prisma.clause.delete({ + * where: { + * // ... filter to delete one Clause + * } + * }) + * + **/ + delete>( + args: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + + /** + * Update one Clause. + * @param {ClauseUpdateArgs} args - Arguments to update one Clause. + * @example + * // Update one Clause + * const clause = await prisma.clause.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + update>( + args: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + + /** + * Delete zero or more Clauses. + * @param {ClauseDeleteManyArgs} args - Arguments to filter Clauses to delete. + * @example + * // Delete a few Clauses + * const { count } = await prisma.clause.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + **/ + deleteMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Update zero or more Clauses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ClauseUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Clauses + * const clause = await prisma.clause.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + updateMany>( + args: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Create or update one Clause. + * @param {ClauseUpsertArgs} args - Arguments to update or create a Clause. + * @example + * // Update or create a Clause + * const clause = await prisma.clause.upsert({ + * create: { + * // ... data to create a Clause + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Clause we want to update + * } + * }) + **/ + upsert>( + args: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + + /** + * Count the number of Clauses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ClauseCountArgs} args - Arguments to filter Clauses to count. + * @example + * // Count the number of Clauses + * const count = await prisma.clause.count({ + * where: { + * // ... the filter for the Clauses we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Clause. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ClauseAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Clause. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ClauseGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ClauseGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ClauseGroupByArgs['orderBy'] } + : { orderBy?: ClauseGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends TupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetClauseGroupByPayload : Prisma.PrismaPromise + + } + + /** + * The delegate class that acts as a "Promise-like" for Clause. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export class Prisma__ClauseClient implements Prisma.PrismaPromise { + private readonly _dmmf; + private readonly _queryType; + private readonly _rootField; + private readonly _clientMethod; + private readonly _args; + private readonly _dataPath; + private readonly _errorFormat; + private readonly _measurePerformance?; + private _isList; + private _callsite; + private _requestPromise?; + readonly [Symbol.toStringTag]: 'PrismaPromise'; + constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); + + report_to_clause = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + + private get _document(); + /** + * 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): Promise; + /** + * 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): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; + } + + + + // Custom InputTypes + + /** + * Clause base type for findUnique actions + */ + export type ClauseFindUniqueArgsBase = { + /** + * Select specific fields to fetch from the Clause + */ + select?: ClauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ClauseInclude | null + /** + * Filter, which Clause to fetch. + */ + where: ClauseWhereUniqueInput + } + + /** + * Clause findUnique + */ + export interface ClauseFindUniqueArgs extends ClauseFindUniqueArgsBase { + /** + * Throw an Error if query returns no results + * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead + */ + rejectOnNotFound?: RejectOnNotFound + } + + + /** + * Clause findUniqueOrThrow + */ + export type ClauseFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Clause + */ + select?: ClauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ClauseInclude | null + /** + * Filter, which Clause to fetch. + */ + where: ClauseWhereUniqueInput + } + + + /** + * Clause base type for findFirst actions + */ + export type ClauseFindFirstArgsBase = { + /** + * Select specific fields to fetch from the Clause + */ + select?: ClauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ClauseInclude | null + /** + * Filter, which Clause to fetch. + */ + where?: ClauseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Clauses to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Clauses. + */ + cursor?: ClauseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Clauses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Clauses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Clauses. + */ + distinct?: Enumerable + } + + /** + * Clause findFirst + */ + export interface ClauseFindFirstArgs extends ClauseFindFirstArgsBase { + /** + * Throw an Error if query returns no results + * @deprecated since 4.0.0: use `findFirstOrThrow` method instead + */ + rejectOnNotFound?: RejectOnNotFound + } + + + /** + * Clause findFirstOrThrow + */ + export type ClauseFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Clause + */ + select?: ClauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ClauseInclude | null + /** + * Filter, which Clause to fetch. + */ + where?: ClauseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Clauses to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Clauses. + */ + cursor?: ClauseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Clauses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Clauses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Clauses. + */ + distinct?: Enumerable + } + + + /** + * Clause findMany + */ + export type ClauseFindManyArgs = { + /** + * Select specific fields to fetch from the Clause + */ + select?: ClauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ClauseInclude | null + /** + * Filter, which Clauses to fetch. + */ + where?: ClauseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Clauses to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Clauses. + */ + cursor?: ClauseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Clauses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Clauses. + */ + skip?: number + distinct?: Enumerable + } + + + /** + * Clause create + */ + export type ClauseCreateArgs = { + /** + * Select specific fields to fetch from the Clause + */ + select?: ClauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ClauseInclude | null + /** + * The data needed to create a Clause. + */ + data: XOR + } + + + /** + * Clause createMany + */ + export type ClauseCreateManyArgs = { + /** + * The data used to create many Clauses. + */ + data: Enumerable + skipDuplicates?: boolean + } + + + /** + * Clause update + */ + export type ClauseUpdateArgs = { + /** + * Select specific fields to fetch from the Clause + */ + select?: ClauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ClauseInclude | null + /** + * The data needed to update a Clause. + */ + data: XOR + /** + * Choose, which Clause to update. + */ + where: ClauseWhereUniqueInput + } + + + /** + * Clause updateMany + */ + export type ClauseUpdateManyArgs = { + /** + * The data used to update Clauses. + */ + data: XOR + /** + * Filter which Clauses to update + */ + where?: ClauseWhereInput + } + + + /** + * Clause upsert + */ + export type ClauseUpsertArgs = { + /** + * Select specific fields to fetch from the Clause + */ + select?: ClauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ClauseInclude | null + /** + * The filter to search for the Clause to update in case it exists. + */ + where: ClauseWhereUniqueInput + /** + * In case the Clause found by the `where` argument doesn't exist, create a new Clause with this data. + */ + create: XOR + /** + * In case the Clause was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + + /** + * Clause delete + */ + export type ClauseDeleteArgs = { + /** + * Select specific fields to fetch from the Clause + */ + select?: ClauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ClauseInclude | null + /** + * Filter which Clause to delete. + */ + where: ClauseWhereUniqueInput + } + + + /** + * Clause deleteMany + */ + export type ClauseDeleteManyArgs = { + /** + * Filter which Clauses to delete + */ + where?: ClauseWhereInput + } + + + /** + * Clause.report_to_clause + */ + export type Clause$report_to_clauseArgs = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + where?: Report_to_clauseWhereInput + orderBy?: Enumerable + cursor?: Report_to_clauseWhereUniqueInput + take?: number + skip?: number + distinct?: Enumerable + } + + + /** + * Clause without action + */ + export type ClauseArgs = { + /** + * Select specific fields to fetch from the Clause + */ + select?: ClauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ClauseInclude | null + } + + + + /** + * Model Report + */ + + + export type AggregateReport = { + _count: ReportCountAggregateOutputType | null + _min: ReportMinAggregateOutputType | null + _max: ReportMaxAggregateOutputType | null + } + + export type ReportMinAggregateOutputType = { + id: string | null + title: string | null + project_description: string | null + redacted_by: string | null + meet_date: Date | null + applicant_name: string | null + applicant_address: string | null + project_cadastral_ref: string | null + project_space_type: string | null + decision: string | null + precisions: string | null + contacts: string | null + further_information: string | null + created_by_id: string | null + created_by_username: string | null + created_at: Date | null + service_instructeur: string | null + } + + export type ReportMaxAggregateOutputType = { + id: string | null + title: string | null + project_description: string | null + redacted_by: string | null + meet_date: Date | null + applicant_name: string | null + applicant_address: string | null + project_cadastral_ref: string | null + project_space_type: string | null + decision: string | null + precisions: string | null + contacts: string | null + further_information: string | null + created_by_id: string | null + created_by_username: string | null + created_at: Date | null + service_instructeur: string | null + } + + export type ReportCountAggregateOutputType = { + id: number + title: number + project_description: number + redacted_by: number + meet_date: number + applicant_name: number + applicant_address: number + project_cadastral_ref: number + project_space_type: number + decision: number + precisions: number + contacts: number + further_information: number + created_by_id: number + created_by_username: number + created_at: number + service_instructeur: number + _all: number + } + + + export type ReportMinAggregateInputType = { + id?: true + title?: true + project_description?: true + redacted_by?: true + meet_date?: true + applicant_name?: true + applicant_address?: true + project_cadastral_ref?: true + project_space_type?: true + decision?: true + precisions?: true + contacts?: true + further_information?: true + created_by_id?: true + created_by_username?: true + created_at?: true + service_instructeur?: true + } + + export type ReportMaxAggregateInputType = { + id?: true + title?: true + project_description?: true + redacted_by?: true + meet_date?: true + applicant_name?: true + applicant_address?: true + project_cadastral_ref?: true + project_space_type?: true + decision?: true + precisions?: true + contacts?: true + further_information?: true + created_by_id?: true + created_by_username?: true + created_at?: true + service_instructeur?: true + } + + export type ReportCountAggregateInputType = { + id?: true + title?: true + project_description?: true + redacted_by?: true + meet_date?: true + applicant_name?: true + applicant_address?: true + project_cadastral_ref?: true + project_space_type?: true + decision?: true + precisions?: true + contacts?: true + further_information?: true + created_by_id?: true + created_by_username?: true + created_at?: true + service_instructeur?: true + _all?: true + } + + export type ReportAggregateArgs = { + /** + * Filter which Report to aggregate. + */ + where?: ReportWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Reports to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ReportWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Reports from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Reports. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Reports + **/ + _count?: true | ReportCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ReportMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ReportMaxAggregateInputType + } + + export type GetReportAggregateType = { + [P in keyof T & keyof AggregateReport]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ReportGroupByArgs = { + where?: ReportWhereInput + orderBy?: Enumerable + by: ReportScalarFieldEnum[] + having?: ReportScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ReportCountAggregateInputType | true + _min?: ReportMinAggregateInputType + _max?: ReportMaxAggregateInputType + } + + + export type ReportGroupByOutputType = { + id: string + title: string | null + project_description: string | null + redacted_by: string | null + meet_date: Date | null + applicant_name: string | null + applicant_address: string | null + project_cadastral_ref: string | null + project_space_type: string | null + decision: string | null + precisions: string | null + contacts: string | null + further_information: string | null + created_by_id: string + created_by_username: string + created_at: Date + service_instructeur: string | null + _count: ReportCountAggregateOutputType | null + _min: ReportMinAggregateOutputType | null + _max: ReportMaxAggregateOutputType | null + } + + type GetReportGroupByPayload = Prisma.PrismaPromise< + Array< + PickArray & + { + [P in ((keyof T) & (keyof ReportGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ReportSelect = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + project_description?: boolean + redacted_by?: boolean + meet_date?: boolean + applicant_name?: boolean + applicant_address?: boolean + project_cadastral_ref?: boolean + project_space_type?: boolean + decision?: boolean + precisions?: boolean + contacts?: boolean + further_information?: boolean + created_by_id?: boolean + created_by_username?: boolean + created_at?: boolean + service_instructeur?: boolean + report_to_chip?: boolean | Report$report_to_chipArgs + report_to_clause?: boolean | Report$report_to_clauseArgs + _count?: boolean | ReportCountOutputTypeArgs + }, ExtArgs["result"]["report"]> + + export type ReportSelectScalar = { + id?: boolean + title?: boolean + project_description?: boolean + redacted_by?: boolean + meet_date?: boolean + applicant_name?: boolean + applicant_address?: boolean + project_cadastral_ref?: boolean + project_space_type?: boolean + decision?: boolean + precisions?: boolean + contacts?: boolean + further_information?: boolean + created_by_id?: boolean + created_by_username?: boolean + created_at?: boolean + service_instructeur?: boolean + } + + export type ReportInclude = { + report_to_chip?: boolean | Report$report_to_chipArgs + report_to_clause?: boolean | Report$report_to_clauseArgs + _count?: boolean | ReportCountOutputTypeArgs + } + + + type ReportGetPayload = $Types.GetResult + + type ReportCountArgs = + Omit & { + select?: ReportCountAggregateInputType | true + } + + export interface ReportDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Report'], meta: { name: 'Report' } } + /** + * Find zero or one Report that matches the filter. + * @param {ReportFindUniqueArgs} args - Arguments to find a Report + * @example + * // Get one Report + * const report = await prisma.report.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__ReportClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__ReportClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + + /** + * Find one Report that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ReportFindUniqueOrThrowArgs} args - Arguments to find a Report + * @example + * // Get one Report + * const report = await prisma.report.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + + /** + * Find the first Report that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ReportFindFirstArgs} args - Arguments to find a Report + * @example + * // Get one Report + * const report = await prisma.report.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__ReportClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__ReportClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + + /** + * Find the first Report that matches the filter or + * throw `NotFoundError` if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ReportFindFirstOrThrowArgs} args - Arguments to find a Report + * @example + * // Get one Report + * const report = await prisma.report.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + + /** + * Find zero or more Reports that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ReportFindManyArgs=} args - Arguments to filter and select certain fields only. + * @example + * // Get all Reports + * const reports = await prisma.report.findMany() + * + * // Get first 10 Reports + * const reports = await prisma.report.findMany({ take: 10 }) + * + * // Only select the `id` + * const reportWithIdOnly = await prisma.report.findMany({ select: { id: true } }) + * + **/ + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + + /** + * Create a Report. + * @param {ReportCreateArgs} args - Arguments to create a Report. + * @example + * // Create one Report + * const Report = await prisma.report.create({ + * data: { + * // ... data to create a Report + * } + * }) + * + **/ + create>( + args: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + + /** + * Create many Reports. + * @param {ReportCreateManyArgs} args - Arguments to create many Reports. + * @example + * // Create many Reports + * const report = await prisma.report.createMany({ + * data: { + * // ... provide data here + * } + * }) + * + **/ + createMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Delete a Report. + * @param {ReportDeleteArgs} args - Arguments to delete one Report. + * @example + * // Delete one Report + * const Report = await prisma.report.delete({ + * where: { + * // ... filter to delete one Report + * } + * }) + * + **/ + delete>( + args: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + + /** + * Update one Report. + * @param {ReportUpdateArgs} args - Arguments to update one Report. + * @example + * // Update one Report + * const report = await prisma.report.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + update>( + args: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + + /** + * Delete zero or more Reports. + * @param {ReportDeleteManyArgs} args - Arguments to filter Reports to delete. + * @example + * // Delete a few Reports + * const { count } = await prisma.report.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + **/ + deleteMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Update zero or more Reports. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ReportUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Reports + * const report = await prisma.report.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + updateMany>( + args: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Create or update one Report. + * @param {ReportUpsertArgs} args - Arguments to update or create a Report. + * @example + * // Update or create a Report + * const report = await prisma.report.upsert({ + * create: { + * // ... data to create a Report + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Report we want to update + * } + * }) + **/ + upsert>( + args: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + + /** + * Count the number of Reports. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ReportCountArgs} args - Arguments to filter Reports to count. + * @example + * // Count the number of Reports + * const count = await prisma.report.count({ + * where: { + * // ... the filter for the Reports we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Report. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ReportAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Report. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ReportGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ReportGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ReportGroupByArgs['orderBy'] } + : { orderBy?: ReportGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends TupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetReportGroupByPayload : Prisma.PrismaPromise + + } + + /** + * The delegate class that acts as a "Promise-like" for Report. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export class Prisma__ReportClient implements Prisma.PrismaPromise { + private readonly _dmmf; + private readonly _queryType; + private readonly _rootField; + private readonly _clientMethod; + private readonly _args; + private readonly _dataPath; + private readonly _errorFormat; + private readonly _measurePerformance?; + private _isList; + private _callsite; + private _requestPromise?; + readonly [Symbol.toStringTag]: 'PrismaPromise'; + constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); + + report_to_chip = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + + report_to_clause = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + + private get _document(); + /** + * 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): Promise; + /** + * 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): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; + } + + + + // Custom InputTypes + + /** + * Report base type for findUnique actions + */ + export type ReportFindUniqueArgsBase = { + /** + * Select specific fields to fetch from the Report + */ + select?: ReportSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ReportInclude | null + /** + * Filter, which Report to fetch. + */ + where: ReportWhereUniqueInput + } + + /** + * Report findUnique + */ + export interface ReportFindUniqueArgs extends ReportFindUniqueArgsBase { + /** + * Throw an Error if query returns no results + * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead + */ + rejectOnNotFound?: RejectOnNotFound + } + + + /** + * Report findUniqueOrThrow + */ + export type ReportFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Report + */ + select?: ReportSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ReportInclude | null + /** + * Filter, which Report to fetch. + */ + where: ReportWhereUniqueInput + } + + + /** + * Report base type for findFirst actions + */ + export type ReportFindFirstArgsBase = { + /** + * Select specific fields to fetch from the Report + */ + select?: ReportSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ReportInclude | null + /** + * Filter, which Report to fetch. + */ + where?: ReportWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Reports to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Reports. + */ + cursor?: ReportWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Reports from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Reports. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Reports. + */ + distinct?: Enumerable + } + + /** + * Report findFirst + */ + export interface ReportFindFirstArgs extends ReportFindFirstArgsBase { + /** + * Throw an Error if query returns no results + * @deprecated since 4.0.0: use `findFirstOrThrow` method instead + */ + rejectOnNotFound?: RejectOnNotFound + } + + + /** + * Report findFirstOrThrow + */ + export type ReportFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Report + */ + select?: ReportSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ReportInclude | null + /** + * Filter, which Report to fetch. + */ + where?: ReportWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Reports to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Reports. + */ + cursor?: ReportWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Reports from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Reports. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Reports. + */ + distinct?: Enumerable + } + + + /** + * Report findMany + */ + export type ReportFindManyArgs = { + /** + * Select specific fields to fetch from the Report + */ + select?: ReportSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ReportInclude | null + /** + * Filter, which Reports to fetch. + */ + where?: ReportWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Reports to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Reports. + */ + cursor?: ReportWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Reports from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Reports. + */ + skip?: number + distinct?: Enumerable + } + + + /** + * Report create + */ + export type ReportCreateArgs = { + /** + * Select specific fields to fetch from the Report + */ + select?: ReportSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ReportInclude | null + /** + * The data needed to create a Report. + */ + data: XOR + } + + + /** + * Report createMany + */ + export type ReportCreateManyArgs = { + /** + * The data used to create many Reports. + */ + data: Enumerable + skipDuplicates?: boolean + } + + + /** + * Report update + */ + export type ReportUpdateArgs = { + /** + * Select specific fields to fetch from the Report + */ + select?: ReportSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ReportInclude | null + /** + * The data needed to update a Report. + */ + data: XOR + /** + * Choose, which Report to update. + */ + where: ReportWhereUniqueInput + } + + + /** + * Report updateMany + */ + export type ReportUpdateManyArgs = { + /** + * The data used to update Reports. + */ + data: XOR + /** + * Filter which Reports to update + */ + where?: ReportWhereInput + } + + + /** + * Report upsert + */ + export type ReportUpsertArgs = { + /** + * Select specific fields to fetch from the Report + */ + select?: ReportSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ReportInclude | null + /** + * The filter to search for the Report to update in case it exists. + */ + where: ReportWhereUniqueInput + /** + * In case the Report found by the `where` argument doesn't exist, create a new Report with this data. + */ + create: XOR + /** + * In case the Report was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + + /** + * Report delete + */ + export type ReportDeleteArgs = { + /** + * Select specific fields to fetch from the Report + */ + select?: ReportSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ReportInclude | null + /** + * Filter which Report to delete. + */ + where: ReportWhereUniqueInput + } + + + /** + * Report deleteMany + */ + export type ReportDeleteManyArgs = { + /** + * Filter which Reports to delete + */ + where?: ReportWhereInput + } + + + /** + * Report.report_to_chip + */ + export type Report$report_to_chipArgs = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + where?: Report_to_chipWhereInput + orderBy?: Enumerable + cursor?: Report_to_chipWhereUniqueInput + take?: number + skip?: number + distinct?: Enumerable + } + + + /** + * Report.report_to_clause + */ + export type Report$report_to_clauseArgs = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + where?: Report_to_clauseWhereInput + orderBy?: Enumerable + cursor?: Report_to_clauseWhereUniqueInput + take?: number + skip?: number + distinct?: Enumerable + } + + + /** + * Report without action + */ + export type ReportArgs = { + /** + * Select specific fields to fetch from the Report + */ + select?: ReportSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: ReportInclude | null + } + + + + /** + * Model Report_to_chip + */ + + + export type AggregateReport_to_chip = { + _count: Report_to_chipCountAggregateOutputType | null + _min: Report_to_chipMinAggregateOutputType | null + _max: Report_to_chipMaxAggregateOutputType | null + } + + export type Report_to_chipMinAggregateOutputType = { + id: string | null + report_id: string | null + chip_id: string | null + } + + export type Report_to_chipMaxAggregateOutputType = { + id: string | null + report_id: string | null + chip_id: string | null + } + + export type Report_to_chipCountAggregateOutputType = { + id: number + report_id: number + chip_id: number + _all: number + } + + + export type Report_to_chipMinAggregateInputType = { + id?: true + report_id?: true + chip_id?: true + } + + export type Report_to_chipMaxAggregateInputType = { + id?: true + report_id?: true + chip_id?: true + } + + export type Report_to_chipCountAggregateInputType = { + id?: true + report_id?: true + chip_id?: true + _all?: true + } + + export type Report_to_chipAggregateArgs = { + /** + * Filter which Report_to_chip to aggregate. + */ + where?: Report_to_chipWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Report_to_chips to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Report_to_chipWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Report_to_chips from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Report_to_chips. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Report_to_chips + **/ + _count?: true | Report_to_chipCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: Report_to_chipMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: Report_to_chipMaxAggregateInputType + } + + export type GetReport_to_chipAggregateType = { + [P in keyof T & keyof AggregateReport_to_chip]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type Report_to_chipGroupByArgs = { + where?: Report_to_chipWhereInput + orderBy?: Enumerable + by: Report_to_chipScalarFieldEnum[] + having?: Report_to_chipScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: Report_to_chipCountAggregateInputType | true + _min?: Report_to_chipMinAggregateInputType + _max?: Report_to_chipMaxAggregateInputType + } + + + export type Report_to_chipGroupByOutputType = { + id: string + report_id: string + chip_id: string + _count: Report_to_chipCountAggregateOutputType | null + _min: Report_to_chipMinAggregateOutputType | null + _max: Report_to_chipMaxAggregateOutputType | null + } + + type GetReport_to_chipGroupByPayload = Prisma.PrismaPromise< + Array< + PickArray & + { + [P in ((keyof T) & (keyof Report_to_chipGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type Report_to_chipSelect = $Extensions.GetSelect<{ + id?: boolean + report_id?: boolean + chip_id?: boolean + chip?: boolean | ChipArgs + report?: boolean | ReportArgs + }, ExtArgs["result"]["report_to_chip"]> + + export type Report_to_chipSelectScalar = { + id?: boolean + report_id?: boolean + chip_id?: boolean + } + + export type Report_to_chipInclude = { + chip?: boolean | ChipArgs + report?: boolean | ReportArgs + } + + + type Report_to_chipGetPayload = $Types.GetResult + + type Report_to_chipCountArgs = + Omit & { + select?: Report_to_chipCountAggregateInputType | true + } + + export interface Report_to_chipDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Report_to_chip'], meta: { name: 'Report_to_chip' } } + /** + * Find zero or one Report_to_chip that matches the filter. + * @param {Report_to_chipFindUniqueArgs} args - Arguments to find a Report_to_chip + * @example + * // Get one Report_to_chip + * const report_to_chip = await prisma.report_to_chip.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__Report_to_chipClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__Report_to_chipClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + + /** + * Find one Report_to_chip that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {Report_to_chipFindUniqueOrThrowArgs} args - Arguments to find a Report_to_chip + * @example + * // Get one Report_to_chip + * const report_to_chip = await prisma.report_to_chip.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__Report_to_chipClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + + /** + * Find the first Report_to_chip that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_chipFindFirstArgs} args - Arguments to find a Report_to_chip + * @example + * // Get one Report_to_chip + * const report_to_chip = await prisma.report_to_chip.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__Report_to_chipClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__Report_to_chipClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + + /** + * Find the first Report_to_chip that matches the filter or + * throw `NotFoundError` if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_chipFindFirstOrThrowArgs} args - Arguments to find a Report_to_chip + * @example + * // Get one Report_to_chip + * const report_to_chip = await prisma.report_to_chip.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__Report_to_chipClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + + /** + * Find zero or more Report_to_chips that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_chipFindManyArgs=} args - Arguments to filter and select certain fields only. + * @example + * // Get all Report_to_chips + * const report_to_chips = await prisma.report_to_chip.findMany() + * + * // Get first 10 Report_to_chips + * const report_to_chips = await prisma.report_to_chip.findMany({ take: 10 }) + * + * // Only select the `id` + * const report_to_chipWithIdOnly = await prisma.report_to_chip.findMany({ select: { id: true } }) + * + **/ + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + + /** + * Create a Report_to_chip. + * @param {Report_to_chipCreateArgs} args - Arguments to create a Report_to_chip. + * @example + * // Create one Report_to_chip + * const Report_to_chip = await prisma.report_to_chip.create({ + * data: { + * // ... data to create a Report_to_chip + * } + * }) + * + **/ + create>( + args: SelectSubset> + ): Prisma__Report_to_chipClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + + /** + * Create many Report_to_chips. + * @param {Report_to_chipCreateManyArgs} args - Arguments to create many Report_to_chips. + * @example + * // Create many Report_to_chips + * const report_to_chip = await prisma.report_to_chip.createMany({ + * data: { + * // ... provide data here + * } + * }) + * + **/ + createMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Delete a Report_to_chip. + * @param {Report_to_chipDeleteArgs} args - Arguments to delete one Report_to_chip. + * @example + * // Delete one Report_to_chip + * const Report_to_chip = await prisma.report_to_chip.delete({ + * where: { + * // ... filter to delete one Report_to_chip + * } + * }) + * + **/ + delete>( + args: SelectSubset> + ): Prisma__Report_to_chipClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + + /** + * Update one Report_to_chip. + * @param {Report_to_chipUpdateArgs} args - Arguments to update one Report_to_chip. + * @example + * // Update one Report_to_chip + * const report_to_chip = await prisma.report_to_chip.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + update>( + args: SelectSubset> + ): Prisma__Report_to_chipClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + + /** + * Delete zero or more Report_to_chips. + * @param {Report_to_chipDeleteManyArgs} args - Arguments to filter Report_to_chips to delete. + * @example + * // Delete a few Report_to_chips + * const { count } = await prisma.report_to_chip.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + **/ + deleteMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Update zero or more Report_to_chips. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_chipUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Report_to_chips + * const report_to_chip = await prisma.report_to_chip.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + updateMany>( + args: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Create or update one Report_to_chip. + * @param {Report_to_chipUpsertArgs} args - Arguments to update or create a Report_to_chip. + * @example + * // Update or create a Report_to_chip + * const report_to_chip = await prisma.report_to_chip.upsert({ + * create: { + * // ... data to create a Report_to_chip + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Report_to_chip we want to update + * } + * }) + **/ + upsert>( + args: SelectSubset> + ): Prisma__Report_to_chipClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + + /** + * Count the number of Report_to_chips. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_chipCountArgs} args - Arguments to filter Report_to_chips to count. + * @example + * // Count the number of Report_to_chips + * const count = await prisma.report_to_chip.count({ + * where: { + * // ... the filter for the Report_to_chips we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Report_to_chip. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_chipAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Report_to_chip. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_chipGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends Report_to_chipGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: Report_to_chipGroupByArgs['orderBy'] } + : { orderBy?: Report_to_chipGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends TupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetReport_to_chipGroupByPayload : Prisma.PrismaPromise + + } + + /** + * The delegate class that acts as a "Promise-like" for Report_to_chip. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export class Prisma__Report_to_chipClient implements Prisma.PrismaPromise { + private readonly _dmmf; + private readonly _queryType; + private readonly _rootField; + private readonly _clientMethod; + private readonly _args; + private readonly _dataPath; + private readonly _errorFormat; + private readonly _measurePerformance?; + private _isList; + private _callsite; + private _requestPromise?; + readonly [Symbol.toStringTag]: 'PrismaPromise'; + constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); + + chip = {}>(args?: Subset>): Prisma__ChipClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + + report = {}>(args?: Subset>): Prisma__ReportClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + + private get _document(); + /** + * 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): Promise; + /** + * 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): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; + } + + + + // Custom InputTypes + + /** + * Report_to_chip base type for findUnique actions + */ + export type Report_to_chipFindUniqueArgsBase = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + /** + * Filter, which Report_to_chip to fetch. + */ + where: Report_to_chipWhereUniqueInput + } + + /** + * Report_to_chip findUnique + */ + export interface Report_to_chipFindUniqueArgs extends Report_to_chipFindUniqueArgsBase { + /** + * Throw an Error if query returns no results + * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead + */ + rejectOnNotFound?: RejectOnNotFound + } + + + /** + * Report_to_chip findUniqueOrThrow + */ + export type Report_to_chipFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + /** + * Filter, which Report_to_chip to fetch. + */ + where: Report_to_chipWhereUniqueInput + } + + + /** + * Report_to_chip base type for findFirst actions + */ + export type Report_to_chipFindFirstArgsBase = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + /** + * Filter, which Report_to_chip to fetch. + */ + where?: Report_to_chipWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Report_to_chips to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Report_to_chips. + */ + cursor?: Report_to_chipWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Report_to_chips from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Report_to_chips. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Report_to_chips. + */ + distinct?: Enumerable + } + + /** + * Report_to_chip findFirst + */ + export interface Report_to_chipFindFirstArgs extends Report_to_chipFindFirstArgsBase { + /** + * Throw an Error if query returns no results + * @deprecated since 4.0.0: use `findFirstOrThrow` method instead + */ + rejectOnNotFound?: RejectOnNotFound + } + + + /** + * Report_to_chip findFirstOrThrow + */ + export type Report_to_chipFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + /** + * Filter, which Report_to_chip to fetch. + */ + where?: Report_to_chipWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Report_to_chips to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Report_to_chips. + */ + cursor?: Report_to_chipWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Report_to_chips from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Report_to_chips. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Report_to_chips. + */ + distinct?: Enumerable + } + + + /** + * Report_to_chip findMany + */ + export type Report_to_chipFindManyArgs = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + /** + * Filter, which Report_to_chips to fetch. + */ + where?: Report_to_chipWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Report_to_chips to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Report_to_chips. + */ + cursor?: Report_to_chipWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Report_to_chips from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Report_to_chips. + */ + skip?: number + distinct?: Enumerable + } + + + /** + * Report_to_chip create + */ + export type Report_to_chipCreateArgs = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + /** + * The data needed to create a Report_to_chip. + */ + data: XOR + } + + + /** + * Report_to_chip createMany + */ + export type Report_to_chipCreateManyArgs = { + /** + * The data used to create many Report_to_chips. + */ + data: Enumerable + skipDuplicates?: boolean + } + + + /** + * Report_to_chip update + */ + export type Report_to_chipUpdateArgs = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + /** + * The data needed to update a Report_to_chip. + */ + data: XOR + /** + * Choose, which Report_to_chip to update. + */ + where: Report_to_chipWhereUniqueInput + } + + + /** + * Report_to_chip updateMany + */ + export type Report_to_chipUpdateManyArgs = { + /** + * The data used to update Report_to_chips. + */ + data: XOR + /** + * Filter which Report_to_chips to update + */ + where?: Report_to_chipWhereInput + } + + + /** + * Report_to_chip upsert + */ + export type Report_to_chipUpsertArgs = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + /** + * The filter to search for the Report_to_chip to update in case it exists. + */ + where: Report_to_chipWhereUniqueInput + /** + * In case the Report_to_chip found by the `where` argument doesn't exist, create a new Report_to_chip with this data. + */ + create: XOR + /** + * In case the Report_to_chip was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + + /** + * Report_to_chip delete + */ + export type Report_to_chipDeleteArgs = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + /** + * Filter which Report_to_chip to delete. + */ + where: Report_to_chipWhereUniqueInput + } + + + /** + * Report_to_chip deleteMany + */ + export type Report_to_chipDeleteManyArgs = { + /** + * Filter which Report_to_chips to delete + */ + where?: Report_to_chipWhereInput + } + + + /** + * Report_to_chip without action + */ + export type Report_to_chipArgs = { + /** + * Select specific fields to fetch from the Report_to_chip + */ + select?: Report_to_chipSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_chipInclude | null + } + + + + /** + * Model Report_to_clause + */ + + + export type AggregateReport_to_clause = { + _count: Report_to_clauseCountAggregateOutputType | null + _min: Report_to_clauseMinAggregateOutputType | null + _max: Report_to_clauseMaxAggregateOutputType | null + } + + export type Report_to_clauseMinAggregateOutputType = { + id: string | null + report_id: string | null + clause_id: string | null + } + + export type Report_to_clauseMaxAggregateOutputType = { + id: string | null + report_id: string | null + clause_id: string | null + } + + export type Report_to_clauseCountAggregateOutputType = { + id: number + report_id: number + clause_id: number + _all: number + } + + + export type Report_to_clauseMinAggregateInputType = { + id?: true + report_id?: true + clause_id?: true + } + + export type Report_to_clauseMaxAggregateInputType = { + id?: true + report_id?: true + clause_id?: true + } + + export type Report_to_clauseCountAggregateInputType = { + id?: true + report_id?: true + clause_id?: true + _all?: true + } + + export type Report_to_clauseAggregateArgs = { + /** + * Filter which Report_to_clause to aggregate. + */ + where?: Report_to_clauseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Report_to_clauses to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Report_to_clauseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Report_to_clauses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Report_to_clauses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Report_to_clauses + **/ + _count?: true | Report_to_clauseCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: Report_to_clauseMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: Report_to_clauseMaxAggregateInputType + } + + export type GetReport_to_clauseAggregateType = { + [P in keyof T & keyof AggregateReport_to_clause]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type Report_to_clauseGroupByArgs = { + where?: Report_to_clauseWhereInput + orderBy?: Enumerable + by: Report_to_clauseScalarFieldEnum[] + having?: Report_to_clauseScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: Report_to_clauseCountAggregateInputType | true + _min?: Report_to_clauseMinAggregateInputType + _max?: Report_to_clauseMaxAggregateInputType + } + + + export type Report_to_clauseGroupByOutputType = { + id: string + report_id: string + clause_id: string + _count: Report_to_clauseCountAggregateOutputType | null + _min: Report_to_clauseMinAggregateOutputType | null + _max: Report_to_clauseMaxAggregateOutputType | null + } + + type GetReport_to_clauseGroupByPayload = Prisma.PrismaPromise< + Array< + PickArray & + { + [P in ((keyof T) & (keyof Report_to_clauseGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type Report_to_clauseSelect = $Extensions.GetSelect<{ + id?: boolean + report_id?: boolean + clause_id?: boolean + clause?: boolean | ClauseArgs + report?: boolean | ReportArgs + }, ExtArgs["result"]["report_to_clause"]> + + export type Report_to_clauseSelectScalar = { + id?: boolean + report_id?: boolean + clause_id?: boolean + } + + export type Report_to_clauseInclude = { + clause?: boolean | ClauseArgs + report?: boolean | ReportArgs + } + + + type Report_to_clauseGetPayload = $Types.GetResult + + type Report_to_clauseCountArgs = + Omit & { + select?: Report_to_clauseCountAggregateInputType | true + } + + export interface Report_to_clauseDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Report_to_clause'], meta: { name: 'Report_to_clause' } } + /** + * Find zero or one Report_to_clause that matches the filter. + * @param {Report_to_clauseFindUniqueArgs} args - Arguments to find a Report_to_clause + * @example + * // Get one Report_to_clause + * const report_to_clause = await prisma.report_to_clause.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__Report_to_clauseClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__Report_to_clauseClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + + /** + * Find one Report_to_clause that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {Report_to_clauseFindUniqueOrThrowArgs} args - Arguments to find a Report_to_clause + * @example + * // Get one Report_to_clause + * const report_to_clause = await prisma.report_to_clause.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + + /** + * Find the first Report_to_clause that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_clauseFindFirstArgs} args - Arguments to find a Report_to_clause + * @example + * // Get one Report_to_clause + * const report_to_clause = await prisma.report_to_clause.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__Report_to_clauseClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__Report_to_clauseClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + + /** + * Find the first Report_to_clause that matches the filter or + * throw `NotFoundError` if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_clauseFindFirstOrThrowArgs} args - Arguments to find a Report_to_clause + * @example + * // Get one Report_to_clause + * const report_to_clause = await prisma.report_to_clause.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + **/ + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + + /** + * Find zero or more Report_to_clauses that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_clauseFindManyArgs=} args - Arguments to filter and select certain fields only. + * @example + * // Get all Report_to_clauses + * const report_to_clauses = await prisma.report_to_clause.findMany() + * + * // Get first 10 Report_to_clauses + * const report_to_clauses = await prisma.report_to_clause.findMany({ take: 10 }) + * + * // Only select the `id` + * const report_to_clauseWithIdOnly = await prisma.report_to_clause.findMany({ select: { id: true } }) + * + **/ + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + + /** + * Create a Report_to_clause. + * @param {Report_to_clauseCreateArgs} args - Arguments to create a Report_to_clause. + * @example + * // Create one Report_to_clause + * const Report_to_clause = await prisma.report_to_clause.create({ + * data: { + * // ... data to create a Report_to_clause + * } + * }) + * + **/ + create>( + args: SelectSubset> + ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + + /** + * Create many Report_to_clauses. + * @param {Report_to_clauseCreateManyArgs} args - Arguments to create many Report_to_clauses. + * @example + * // Create many Report_to_clauses + * const report_to_clause = await prisma.report_to_clause.createMany({ + * data: { + * // ... provide data here + * } + * }) + * + **/ + createMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Delete a Report_to_clause. + * @param {Report_to_clauseDeleteArgs} args - Arguments to delete one Report_to_clause. + * @example + * // Delete one Report_to_clause + * const Report_to_clause = await prisma.report_to_clause.delete({ + * where: { + * // ... filter to delete one Report_to_clause + * } + * }) + * + **/ + delete>( + args: SelectSubset> + ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + + /** + * Update one Report_to_clause. + * @param {Report_to_clauseUpdateArgs} args - Arguments to update one Report_to_clause. + * @example + * // Update one Report_to_clause + * const report_to_clause = await prisma.report_to_clause.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + update>( + args: SelectSubset> + ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + + /** + * Delete zero or more Report_to_clauses. + * @param {Report_to_clauseDeleteManyArgs} args - Arguments to filter Report_to_clauses to delete. + * @example + * // Delete a few Report_to_clauses + * const { count } = await prisma.report_to_clause.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + **/ + deleteMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Update zero or more Report_to_clauses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_clauseUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Report_to_clauses + * const report_to_clause = await prisma.report_to_clause.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + **/ + updateMany>( + args: SelectSubset> + ): Prisma.PrismaPromise + + /** + * Create or update one Report_to_clause. + * @param {Report_to_clauseUpsertArgs} args - Arguments to update or create a Report_to_clause. + * @example + * // Update or create a Report_to_clause + * const report_to_clause = await prisma.report_to_clause.upsert({ + * create: { + * // ... data to create a Report_to_clause + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Report_to_clause we want to update + * } + * }) + **/ + upsert>( + args: SelectSubset> + ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + + /** + * Count the number of Report_to_clauses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_clauseCountArgs} args - Arguments to filter Report_to_clauses to count. + * @example + * // Count the number of Report_to_clauses + * const count = await prisma.report_to_clause.count({ + * where: { + * // ... the filter for the Report_to_clauses we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Report_to_clause. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_clauseAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Report_to_clause. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Report_to_clauseGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends Report_to_clauseGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: Report_to_clauseGroupByArgs['orderBy'] } + : { orderBy?: Report_to_clauseGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends TupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetReport_to_clauseGroupByPayload : Prisma.PrismaPromise + + } + + /** + * The delegate class that acts as a "Promise-like" for Report_to_clause. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export class Prisma__Report_to_clauseClient implements Prisma.PrismaPromise { + private readonly _dmmf; + private readonly _queryType; + private readonly _rootField; + private readonly _clientMethod; + private readonly _args; + private readonly _dataPath; + private readonly _errorFormat; + private readonly _measurePerformance?; + private _isList; + private _callsite; + private _requestPromise?; + readonly [Symbol.toStringTag]: 'PrismaPromise'; + constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); + + clause = {}>(args?: Subset>): Prisma__ClauseClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + + report = {}>(args?: Subset>): Prisma__ReportClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + + private get _document(); + /** + * 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): Promise; + /** + * 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): Promise; + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): Promise; + } + + + + // Custom InputTypes + + /** + * Report_to_clause base type for findUnique actions + */ + export type Report_to_clauseFindUniqueArgsBase = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + /** + * Filter, which Report_to_clause to fetch. + */ + where: Report_to_clauseWhereUniqueInput + } + + /** + * Report_to_clause findUnique + */ + export interface Report_to_clauseFindUniqueArgs extends Report_to_clauseFindUniqueArgsBase { + /** + * Throw an Error if query returns no results + * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead + */ + rejectOnNotFound?: RejectOnNotFound + } + + + /** + * Report_to_clause findUniqueOrThrow + */ + export type Report_to_clauseFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + /** + * Filter, which Report_to_clause to fetch. + */ + where: Report_to_clauseWhereUniqueInput + } + + + /** + * Report_to_clause base type for findFirst actions + */ + export type Report_to_clauseFindFirstArgsBase = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + /** + * Filter, which Report_to_clause to fetch. + */ + where?: Report_to_clauseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Report_to_clauses to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Report_to_clauses. + */ + cursor?: Report_to_clauseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Report_to_clauses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Report_to_clauses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Report_to_clauses. + */ + distinct?: Enumerable + } + + /** + * Report_to_clause findFirst + */ + export interface Report_to_clauseFindFirstArgs extends Report_to_clauseFindFirstArgsBase { + /** + * Throw an Error if query returns no results + * @deprecated since 4.0.0: use `findFirstOrThrow` method instead + */ + rejectOnNotFound?: RejectOnNotFound + } + + + /** + * Report_to_clause findFirstOrThrow + */ + export type Report_to_clauseFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + /** + * Filter, which Report_to_clause to fetch. + */ + where?: Report_to_clauseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Report_to_clauses to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Report_to_clauses. + */ + cursor?: Report_to_clauseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Report_to_clauses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Report_to_clauses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Report_to_clauses. + */ + distinct?: Enumerable + } + + + /** + * Report_to_clause findMany + */ + export type Report_to_clauseFindManyArgs = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + /** + * Filter, which Report_to_clauses to fetch. + */ + where?: Report_to_clauseWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Report_to_clauses to fetch. + */ + orderBy?: Enumerable + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Report_to_clauses. + */ + cursor?: Report_to_clauseWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Report_to_clauses from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Report_to_clauses. + */ + skip?: number + distinct?: Enumerable + } + + + /** + * Report_to_clause create + */ + export type Report_to_clauseCreateArgs = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + /** + * The data needed to create a Report_to_clause. + */ + data: XOR + } + + + /** + * Report_to_clause createMany + */ + export type Report_to_clauseCreateManyArgs = { + /** + * The data used to create many Report_to_clauses. + */ + data: Enumerable + skipDuplicates?: boolean + } + + + /** + * Report_to_clause update + */ + export type Report_to_clauseUpdateArgs = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + /** + * The data needed to update a Report_to_clause. + */ + data: XOR + /** + * Choose, which Report_to_clause to update. + */ + where: Report_to_clauseWhereUniqueInput + } + + + /** + * Report_to_clause updateMany + */ + export type Report_to_clauseUpdateManyArgs = { + /** + * The data used to update Report_to_clauses. + */ + data: XOR + /** + * Filter which Report_to_clauses to update + */ + where?: Report_to_clauseWhereInput + } + + + /** + * Report_to_clause upsert + */ + export type Report_to_clauseUpsertArgs = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + /** + * The filter to search for the Report_to_clause to update in case it exists. + */ + where: Report_to_clauseWhereUniqueInput + /** + * In case the Report_to_clause found by the `where` argument doesn't exist, create a new Report_to_clause with this data. + */ + create: XOR + /** + * In case the Report_to_clause was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + + /** + * Report_to_clause delete + */ + export type Report_to_clauseDeleteArgs = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + /** + * Filter which Report_to_clause to delete. + */ + where: Report_to_clauseWhereUniqueInput + } + + + /** + * Report_to_clause deleteMany + */ + export type Report_to_clauseDeleteManyArgs = { + /** + * Filter which Report_to_clauses to delete + */ + where?: Report_to_clauseWhereInput + } + + + /** + * Report_to_clause without action + */ + export type Report_to_clauseArgs = { + /** + * Select specific fields to fetch from the Report_to_clause + */ + select?: Report_to_clauseSelect | null + /** + * Choose, which related nodes to fetch as well. + */ + include?: Report_to_clauseInclude | null + } + + + + /** + * Enums + */ + + export const TransactionIsolationLevel: { + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' + }; + + export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + + export const ChipScalarFieldEnum: { + id: 'id', + label: 'label', + value: 'value' + }; + + export type ChipScalarFieldEnum = (typeof ChipScalarFieldEnum)[keyof typeof ChipScalarFieldEnum] + + + export const ClauseScalarFieldEnum: { + id: 'id', + label: 'label', + value: 'value' + }; + + export type ClauseScalarFieldEnum = (typeof ClauseScalarFieldEnum)[keyof typeof ClauseScalarFieldEnum] + + + export const ReportScalarFieldEnum: { + id: 'id', + title: 'title', + project_description: 'project_description', + redacted_by: 'redacted_by', + meet_date: 'meet_date', + applicant_name: 'applicant_name', + applicant_address: 'applicant_address', + project_cadastral_ref: 'project_cadastral_ref', + project_space_type: 'project_space_type', + decision: 'decision', + precisions: 'precisions', + contacts: 'contacts', + further_information: 'further_information', + created_by_id: 'created_by_id', + created_by_username: 'created_by_username', + created_at: 'created_at', + service_instructeur: 'service_instructeur' + }; + + export type ReportScalarFieldEnum = (typeof ReportScalarFieldEnum)[keyof typeof ReportScalarFieldEnum] + + + export const Report_to_chipScalarFieldEnum: { + id: 'id', + report_id: 'report_id', + chip_id: 'chip_id' + }; + + export type Report_to_chipScalarFieldEnum = (typeof Report_to_chipScalarFieldEnum)[keyof typeof Report_to_chipScalarFieldEnum] + + + export const Report_to_clauseScalarFieldEnum: { + id: 'id', + report_id: 'report_id', + clause_id: 'clause_id' + }; + + export type Report_to_clauseScalarFieldEnum = (typeof Report_to_clauseScalarFieldEnum)[keyof typeof Report_to_clauseScalarFieldEnum] + + + export const SortOrder: { + asc: 'asc', + desc: 'desc' + }; + + export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' + }; + + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + + export const NullsOrder: { + first: 'first', + last: 'last' + }; + + export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + /** + * Deep Input Types + */ + + + export type ChipWhereInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringFilter | string + label?: StringFilter | string + value?: StringFilter | string + report_to_chip?: Report_to_chipListRelationFilter + } + + export type ChipOrderByWithRelationInput = { + id?: SortOrder + label?: SortOrder + value?: SortOrder + report_to_chip?: Report_to_chipOrderByRelationAggregateInput + } + + export type ChipWhereUniqueInput = { + id?: string + } + + export type ChipOrderByWithAggregationInput = { + id?: SortOrder + label?: SortOrder + value?: SortOrder + _count?: ChipCountOrderByAggregateInput + _max?: ChipMaxOrderByAggregateInput + _min?: ChipMinOrderByAggregateInput + } + + export type ChipScalarWhereWithAggregatesInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringWithAggregatesFilter | string + label?: StringWithAggregatesFilter | string + value?: StringWithAggregatesFilter | string + } + + export type ClauseWhereInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringFilter | string + label?: StringFilter | string + value?: StringFilter | string + report_to_clause?: Report_to_clauseListRelationFilter + } + + export type ClauseOrderByWithRelationInput = { + id?: SortOrder + label?: SortOrder + value?: SortOrder + report_to_clause?: Report_to_clauseOrderByRelationAggregateInput + } + + export type ClauseWhereUniqueInput = { + id?: string + } + + export type ClauseOrderByWithAggregationInput = { + id?: SortOrder + label?: SortOrder + value?: SortOrder + _count?: ClauseCountOrderByAggregateInput + _max?: ClauseMaxOrderByAggregateInput + _min?: ClauseMinOrderByAggregateInput + } + + export type ClauseScalarWhereWithAggregatesInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringWithAggregatesFilter | string + label?: StringWithAggregatesFilter | string + value?: StringWithAggregatesFilter | string + } + + export type ReportWhereInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringFilter | string + title?: StringNullableFilter | string | null + project_description?: StringNullableFilter | string | null + redacted_by?: StringNullableFilter | string | null + meet_date?: DateTimeNullableFilter | Date | string | null + applicant_name?: StringNullableFilter | string | null + applicant_address?: StringNullableFilter | string | null + project_cadastral_ref?: StringNullableFilter | string | null + project_space_type?: StringNullableFilter | string | null + decision?: StringNullableFilter | string | null + precisions?: StringNullableFilter | string | null + contacts?: StringNullableFilter | string | null + further_information?: StringNullableFilter | string | null + created_by_id?: StringFilter | string + created_by_username?: StringFilter | string + created_at?: DateTimeFilter | Date | string + service_instructeur?: StringNullableFilter | string | null + report_to_chip?: Report_to_chipListRelationFilter + report_to_clause?: Report_to_clauseListRelationFilter + } + + export type ReportOrderByWithRelationInput = { + id?: SortOrder + title?: SortOrderInput | SortOrder + project_description?: SortOrderInput | SortOrder + redacted_by?: SortOrderInput | SortOrder + meet_date?: SortOrderInput | SortOrder + applicant_name?: SortOrderInput | SortOrder + applicant_address?: SortOrderInput | SortOrder + project_cadastral_ref?: SortOrderInput | SortOrder + project_space_type?: SortOrderInput | SortOrder + decision?: SortOrderInput | SortOrder + precisions?: SortOrderInput | SortOrder + contacts?: SortOrderInput | SortOrder + further_information?: SortOrderInput | SortOrder + created_by_id?: SortOrder + created_by_username?: SortOrder + created_at?: SortOrder + service_instructeur?: SortOrderInput | SortOrder + report_to_chip?: Report_to_chipOrderByRelationAggregateInput + report_to_clause?: Report_to_clauseOrderByRelationAggregateInput + } + + export type ReportWhereUniqueInput = { + id?: string + } + + export type ReportOrderByWithAggregationInput = { + id?: SortOrder + title?: SortOrderInput | SortOrder + project_description?: SortOrderInput | SortOrder + redacted_by?: SortOrderInput | SortOrder + meet_date?: SortOrderInput | SortOrder + applicant_name?: SortOrderInput | SortOrder + applicant_address?: SortOrderInput | SortOrder + project_cadastral_ref?: SortOrderInput | SortOrder + project_space_type?: SortOrderInput | SortOrder + decision?: SortOrderInput | SortOrder + precisions?: SortOrderInput | SortOrder + contacts?: SortOrderInput | SortOrder + further_information?: SortOrderInput | SortOrder + created_by_id?: SortOrder + created_by_username?: SortOrder + created_at?: SortOrder + service_instructeur?: SortOrderInput | SortOrder + _count?: ReportCountOrderByAggregateInput + _max?: ReportMaxOrderByAggregateInput + _min?: ReportMinOrderByAggregateInput + } + + export type ReportScalarWhereWithAggregatesInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringWithAggregatesFilter | string + title?: StringNullableWithAggregatesFilter | string | null + project_description?: StringNullableWithAggregatesFilter | string | null + redacted_by?: StringNullableWithAggregatesFilter | string | null + meet_date?: DateTimeNullableWithAggregatesFilter | Date | string | null + applicant_name?: StringNullableWithAggregatesFilter | string | null + applicant_address?: StringNullableWithAggregatesFilter | string | null + project_cadastral_ref?: StringNullableWithAggregatesFilter | string | null + project_space_type?: StringNullableWithAggregatesFilter | string | null + decision?: StringNullableWithAggregatesFilter | string | null + precisions?: StringNullableWithAggregatesFilter | string | null + contacts?: StringNullableWithAggregatesFilter | string | null + further_information?: StringNullableWithAggregatesFilter | string | null + created_by_id?: StringWithAggregatesFilter | string + created_by_username?: StringWithAggregatesFilter | string + created_at?: DateTimeWithAggregatesFilter | Date | string + service_instructeur?: StringNullableWithAggregatesFilter | string | null + } + + export type Report_to_chipWhereInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringFilter | string + report_id?: StringFilter | string + chip_id?: StringFilter | string + chip?: XOR + report?: XOR + } + + export type Report_to_chipOrderByWithRelationInput = { + id?: SortOrder + report_id?: SortOrder + chip_id?: SortOrder + chip?: ChipOrderByWithRelationInput + report?: ReportOrderByWithRelationInput + } + + export type Report_to_chipWhereUniqueInput = { + id?: string + } + + export type Report_to_chipOrderByWithAggregationInput = { + id?: SortOrder + report_id?: SortOrder + chip_id?: SortOrder + _count?: Report_to_chipCountOrderByAggregateInput + _max?: Report_to_chipMaxOrderByAggregateInput + _min?: Report_to_chipMinOrderByAggregateInput + } + + export type Report_to_chipScalarWhereWithAggregatesInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringWithAggregatesFilter | string + report_id?: StringWithAggregatesFilter | string + chip_id?: StringWithAggregatesFilter | string + } + + export type Report_to_clauseWhereInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringFilter | string + report_id?: StringFilter | string + clause_id?: StringFilter | string + clause?: XOR + report?: XOR + } + + export type Report_to_clauseOrderByWithRelationInput = { + id?: SortOrder + report_id?: SortOrder + clause_id?: SortOrder + clause?: ClauseOrderByWithRelationInput + report?: ReportOrderByWithRelationInput + } + + export type Report_to_clauseWhereUniqueInput = { + id?: string + } + + export type Report_to_clauseOrderByWithAggregationInput = { + id?: SortOrder + report_id?: SortOrder + clause_id?: SortOrder + _count?: Report_to_clauseCountOrderByAggregateInput + _max?: Report_to_clauseMaxOrderByAggregateInput + _min?: Report_to_clauseMinOrderByAggregateInput + } + + export type Report_to_clauseScalarWhereWithAggregatesInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringWithAggregatesFilter | string + report_id?: StringWithAggregatesFilter | string + clause_id?: StringWithAggregatesFilter | string + } + + export type ChipCreateInput = { + id: string + label: string + value: string + report_to_chip?: Report_to_chipCreateNestedManyWithoutChipInput + } + + export type ChipUncheckedCreateInput = { + id: string + label: string + value: string + report_to_chip?: Report_to_chipUncheckedCreateNestedManyWithoutChipInput + } + + export type ChipUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + report_to_chip?: Report_to_chipUpdateManyWithoutChipNestedInput + } + + export type ChipUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + report_to_chip?: Report_to_chipUncheckedUpdateManyWithoutChipNestedInput + } + + export type ChipCreateManyInput = { + id: string + label: string + value: string + } + + export type ChipUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + } + + export type ChipUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + } + + export type ClauseCreateInput = { + id: string + label: string + value: string + report_to_clause?: Report_to_clauseCreateNestedManyWithoutClauseInput + } + + export type ClauseUncheckedCreateInput = { + id: string + label: string + value: string + report_to_clause?: Report_to_clauseUncheckedCreateNestedManyWithoutClauseInput + } + + export type ClauseUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + report_to_clause?: Report_to_clauseUpdateManyWithoutClauseNestedInput + } + + export type ClauseUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + report_to_clause?: Report_to_clauseUncheckedUpdateManyWithoutClauseNestedInput + } + + export type ClauseCreateManyInput = { + id: string + label: string + value: string + } + + export type ClauseUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + } + + export type ClauseUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + } + + export type ReportCreateInput = { + id: string + title?: string | null + project_description?: string | null + redacted_by?: string | null + meet_date?: Date | string | null + applicant_name?: string | null + applicant_address?: string | null + project_cadastral_ref?: string | null + project_space_type?: string | null + decision?: string | null + precisions?: string | null + contacts?: string | null + further_information?: string | null + created_by_id: string + created_by_username: string + created_at: Date | string + service_instructeur?: string | null + report_to_chip?: Report_to_chipCreateNestedManyWithoutReportInput + report_to_clause?: Report_to_clauseCreateNestedManyWithoutReportInput + } + + export type ReportUncheckedCreateInput = { + id: string + title?: string | null + project_description?: string | null + redacted_by?: string | null + meet_date?: Date | string | null + applicant_name?: string | null + applicant_address?: string | null + project_cadastral_ref?: string | null + project_space_type?: string | null + decision?: string | null + precisions?: string | null + contacts?: string | null + further_information?: string | null + created_by_id: string + created_by_username: string + created_at: Date | string + service_instructeur?: string | null + report_to_chip?: Report_to_chipUncheckedCreateNestedManyWithoutReportInput + report_to_clause?: Report_to_clauseUncheckedCreateNestedManyWithoutReportInput + } + + export type ReportUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + project_description?: NullableStringFieldUpdateOperationsInput | string | null + redacted_by?: NullableStringFieldUpdateOperationsInput | string | null + meet_date?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + applicant_name?: NullableStringFieldUpdateOperationsInput | string | null + applicant_address?: NullableStringFieldUpdateOperationsInput | string | null + project_cadastral_ref?: NullableStringFieldUpdateOperationsInput | string | null + project_space_type?: NullableStringFieldUpdateOperationsInput | string | null + decision?: NullableStringFieldUpdateOperationsInput | string | null + precisions?: NullableStringFieldUpdateOperationsInput | string | null + contacts?: NullableStringFieldUpdateOperationsInput | string | null + further_information?: NullableStringFieldUpdateOperationsInput | string | null + created_by_id?: StringFieldUpdateOperationsInput | string + created_by_username?: StringFieldUpdateOperationsInput | string + created_at?: DateTimeFieldUpdateOperationsInput | Date | string + service_instructeur?: NullableStringFieldUpdateOperationsInput | string | null + report_to_chip?: Report_to_chipUpdateManyWithoutReportNestedInput + report_to_clause?: Report_to_clauseUpdateManyWithoutReportNestedInput + } + + export type ReportUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + project_description?: NullableStringFieldUpdateOperationsInput | string | null + redacted_by?: NullableStringFieldUpdateOperationsInput | string | null + meet_date?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + applicant_name?: NullableStringFieldUpdateOperationsInput | string | null + applicant_address?: NullableStringFieldUpdateOperationsInput | string | null + project_cadastral_ref?: NullableStringFieldUpdateOperationsInput | string | null + project_space_type?: NullableStringFieldUpdateOperationsInput | string | null + decision?: NullableStringFieldUpdateOperationsInput | string | null + precisions?: NullableStringFieldUpdateOperationsInput | string | null + contacts?: NullableStringFieldUpdateOperationsInput | string | null + further_information?: NullableStringFieldUpdateOperationsInput | string | null + created_by_id?: StringFieldUpdateOperationsInput | string + created_by_username?: StringFieldUpdateOperationsInput | string + created_at?: DateTimeFieldUpdateOperationsInput | Date | string + service_instructeur?: NullableStringFieldUpdateOperationsInput | string | null + report_to_chip?: Report_to_chipUncheckedUpdateManyWithoutReportNestedInput + report_to_clause?: Report_to_clauseUncheckedUpdateManyWithoutReportNestedInput + } + + export type ReportCreateManyInput = { + id: string + title?: string | null + project_description?: string | null + redacted_by?: string | null + meet_date?: Date | string | null + applicant_name?: string | null + applicant_address?: string | null + project_cadastral_ref?: string | null + project_space_type?: string | null + decision?: string | null + precisions?: string | null + contacts?: string | null + further_information?: string | null + created_by_id: string + created_by_username: string + created_at: Date | string + service_instructeur?: string | null + } + + export type ReportUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + project_description?: NullableStringFieldUpdateOperationsInput | string | null + redacted_by?: NullableStringFieldUpdateOperationsInput | string | null + meet_date?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + applicant_name?: NullableStringFieldUpdateOperationsInput | string | null + applicant_address?: NullableStringFieldUpdateOperationsInput | string | null + project_cadastral_ref?: NullableStringFieldUpdateOperationsInput | string | null + project_space_type?: NullableStringFieldUpdateOperationsInput | string | null + decision?: NullableStringFieldUpdateOperationsInput | string | null + precisions?: NullableStringFieldUpdateOperationsInput | string | null + contacts?: NullableStringFieldUpdateOperationsInput | string | null + further_information?: NullableStringFieldUpdateOperationsInput | string | null + created_by_id?: StringFieldUpdateOperationsInput | string + created_by_username?: StringFieldUpdateOperationsInput | string + created_at?: DateTimeFieldUpdateOperationsInput | Date | string + service_instructeur?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type ReportUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + project_description?: NullableStringFieldUpdateOperationsInput | string | null + redacted_by?: NullableStringFieldUpdateOperationsInput | string | null + meet_date?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + applicant_name?: NullableStringFieldUpdateOperationsInput | string | null + applicant_address?: NullableStringFieldUpdateOperationsInput | string | null + project_cadastral_ref?: NullableStringFieldUpdateOperationsInput | string | null + project_space_type?: NullableStringFieldUpdateOperationsInput | string | null + decision?: NullableStringFieldUpdateOperationsInput | string | null + precisions?: NullableStringFieldUpdateOperationsInput | string | null + contacts?: NullableStringFieldUpdateOperationsInput | string | null + further_information?: NullableStringFieldUpdateOperationsInput | string | null + created_by_id?: StringFieldUpdateOperationsInput | string + created_by_username?: StringFieldUpdateOperationsInput | string + created_at?: DateTimeFieldUpdateOperationsInput | Date | string + service_instructeur?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type Report_to_chipCreateInput = { + id: string + chip: ChipCreateNestedOneWithoutReport_to_chipInput + report: ReportCreateNestedOneWithoutReport_to_chipInput + } + + export type Report_to_chipUncheckedCreateInput = { + id: string + report_id: string + chip_id: string + } + + export type Report_to_chipUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + chip?: ChipUpdateOneRequiredWithoutReport_to_chipNestedInput + report?: ReportUpdateOneRequiredWithoutReport_to_chipNestedInput + } + + export type Report_to_chipUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + report_id?: StringFieldUpdateOperationsInput | string + chip_id?: StringFieldUpdateOperationsInput | string + } + + export type Report_to_chipCreateManyInput = { + id: string + report_id: string + chip_id: string + } + + export type Report_to_chipUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + } + + export type Report_to_chipUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + report_id?: StringFieldUpdateOperationsInput | string + chip_id?: StringFieldUpdateOperationsInput | string + } + + export type Report_to_clauseCreateInput = { + id: string + clause: ClauseCreateNestedOneWithoutReport_to_clauseInput + report: ReportCreateNestedOneWithoutReport_to_clauseInput + } + + export type Report_to_clauseUncheckedCreateInput = { + id: string + report_id: string + clause_id: string + } + + export type Report_to_clauseUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + clause?: ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInput + report?: ReportUpdateOneRequiredWithoutReport_to_clauseNestedInput + } + + export type Report_to_clauseUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + report_id?: StringFieldUpdateOperationsInput | string + clause_id?: StringFieldUpdateOperationsInput | string + } + + export type Report_to_clauseCreateManyInput = { + id: string + report_id: string + clause_id: string + } + + export type Report_to_clauseUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + } + + export type Report_to_clauseUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + report_id?: StringFieldUpdateOperationsInput | string + clause_id?: StringFieldUpdateOperationsInput | string + } + + export type StringFilter = { + equals?: string + in?: Enumerable | string + notIn?: Enumerable | string + lt?: string + lte?: string + gt?: string + gte?: string + contains?: string + startsWith?: string + endsWith?: string + mode?: QueryMode + not?: NestedStringFilter | string + } + + export type Report_to_chipListRelationFilter = { + every?: Report_to_chipWhereInput + some?: Report_to_chipWhereInput + none?: Report_to_chipWhereInput + } + + export type Report_to_chipOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChipCountOrderByAggregateInput = { + id?: SortOrder + label?: SortOrder + value?: SortOrder + } + + export type ChipMaxOrderByAggregateInput = { + id?: SortOrder + label?: SortOrder + value?: SortOrder + } + + export type ChipMinOrderByAggregateInput = { + id?: SortOrder + label?: SortOrder + value?: SortOrder + } + + export type StringWithAggregatesFilter = { + equals?: string + in?: Enumerable | string + notIn?: Enumerable | string + lt?: string + lte?: string + gt?: string + gte?: string + contains?: string + startsWith?: string + endsWith?: string + mode?: QueryMode + not?: NestedStringWithAggregatesFilter | string + _count?: NestedIntFilter + _min?: NestedStringFilter + _max?: NestedStringFilter + } + + export type Report_to_clauseListRelationFilter = { + every?: Report_to_clauseWhereInput + some?: Report_to_clauseWhereInput + none?: Report_to_clauseWhereInput + } + + export type Report_to_clauseOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ClauseCountOrderByAggregateInput = { + id?: SortOrder + label?: SortOrder + value?: SortOrder + } + + export type ClauseMaxOrderByAggregateInput = { + id?: SortOrder + label?: SortOrder + value?: SortOrder + } + + export type ClauseMinOrderByAggregateInput = { + id?: SortOrder + label?: SortOrder + value?: SortOrder + } + + export type StringNullableFilter = { + equals?: string | null + in?: Enumerable | string | null + notIn?: Enumerable | string | null + lt?: string + lte?: string + gt?: string + gte?: string + contains?: string + startsWith?: string + endsWith?: string + mode?: QueryMode + not?: NestedStringNullableFilter | string | null + } + + export type DateTimeNullableFilter = { + equals?: Date | string | null + in?: Enumerable | Enumerable | Date | string | null + notIn?: Enumerable | Enumerable | Date | string | null + lt?: Date | string + lte?: Date | string + gt?: Date | string + gte?: Date | string + not?: NestedDateTimeNullableFilter | Date | string | null + } + + export type DateTimeFilter = { + equals?: Date | string + in?: Enumerable | Enumerable | Date | string + notIn?: Enumerable | Enumerable | Date | string + lt?: Date | string + lte?: Date | string + gt?: Date | string + gte?: Date | string + not?: NestedDateTimeFilter | Date | string + } + + export type SortOrderInput = { + sort: SortOrder + nulls?: NullsOrder + } + + export type ReportCountOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + project_description?: SortOrder + redacted_by?: SortOrder + meet_date?: SortOrder + applicant_name?: SortOrder + applicant_address?: SortOrder + project_cadastral_ref?: SortOrder + project_space_type?: SortOrder + decision?: SortOrder + precisions?: SortOrder + contacts?: SortOrder + further_information?: SortOrder + created_by_id?: SortOrder + created_by_username?: SortOrder + created_at?: SortOrder + service_instructeur?: SortOrder + } + + export type ReportMaxOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + project_description?: SortOrder + redacted_by?: SortOrder + meet_date?: SortOrder + applicant_name?: SortOrder + applicant_address?: SortOrder + project_cadastral_ref?: SortOrder + project_space_type?: SortOrder + decision?: SortOrder + precisions?: SortOrder + contacts?: SortOrder + further_information?: SortOrder + created_by_id?: SortOrder + created_by_username?: SortOrder + created_at?: SortOrder + service_instructeur?: SortOrder + } + + export type ReportMinOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + project_description?: SortOrder + redacted_by?: SortOrder + meet_date?: SortOrder + applicant_name?: SortOrder + applicant_address?: SortOrder + project_cadastral_ref?: SortOrder + project_space_type?: SortOrder + decision?: SortOrder + precisions?: SortOrder + contacts?: SortOrder + further_information?: SortOrder + created_by_id?: SortOrder + created_by_username?: SortOrder + created_at?: SortOrder + service_instructeur?: SortOrder + } + + export type StringNullableWithAggregatesFilter = { + equals?: string | null + in?: Enumerable | string | null + notIn?: Enumerable | string | null + lt?: string + lte?: string + gt?: string + gte?: string + contains?: string + startsWith?: string + endsWith?: string + mode?: QueryMode + not?: NestedStringNullableWithAggregatesFilter | string | null + _count?: NestedIntNullableFilter + _min?: NestedStringNullableFilter + _max?: NestedStringNullableFilter + } + + export type DateTimeNullableWithAggregatesFilter = { + equals?: Date | string | null + in?: Enumerable | Enumerable | Date | string | null + notIn?: Enumerable | Enumerable | Date | string | null + lt?: Date | string + lte?: Date | string + gt?: Date | string + gte?: Date | string + not?: NestedDateTimeNullableWithAggregatesFilter | Date | string | null + _count?: NestedIntNullableFilter + _min?: NestedDateTimeNullableFilter + _max?: NestedDateTimeNullableFilter + } + + export type DateTimeWithAggregatesFilter = { + equals?: Date | string + in?: Enumerable | Enumerable | Date | string + notIn?: Enumerable | Enumerable | Date | string + lt?: Date | string + lte?: Date | string + gt?: Date | string + gte?: Date | string + not?: NestedDateTimeWithAggregatesFilter | Date | string + _count?: NestedIntFilter + _min?: NestedDateTimeFilter + _max?: NestedDateTimeFilter + } + + export type ChipRelationFilter = { + is?: ChipWhereInput | null + isNot?: ChipWhereInput | null + } + + export type ReportRelationFilter = { + is?: ReportWhereInput | null + isNot?: ReportWhereInput | null + } + + export type Report_to_chipCountOrderByAggregateInput = { + id?: SortOrder + report_id?: SortOrder + chip_id?: SortOrder + } + + export type Report_to_chipMaxOrderByAggregateInput = { + id?: SortOrder + report_id?: SortOrder + chip_id?: SortOrder + } + + export type Report_to_chipMinOrderByAggregateInput = { + id?: SortOrder + report_id?: SortOrder + chip_id?: SortOrder + } + + export type ClauseRelationFilter = { + is?: ClauseWhereInput | null + isNot?: ClauseWhereInput | null + } + + export type Report_to_clauseCountOrderByAggregateInput = { + id?: SortOrder + report_id?: SortOrder + clause_id?: SortOrder + } + + export type Report_to_clauseMaxOrderByAggregateInput = { + id?: SortOrder + report_id?: SortOrder + clause_id?: SortOrder + } + + export type Report_to_clauseMinOrderByAggregateInput = { + id?: SortOrder + report_id?: SortOrder + clause_id?: SortOrder + } + + export type Report_to_chipCreateNestedManyWithoutChipInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + createMany?: Report_to_chipCreateManyChipInputEnvelope + connect?: Enumerable + } + + export type Report_to_chipUncheckedCreateNestedManyWithoutChipInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + createMany?: Report_to_chipCreateManyChipInputEnvelope + connect?: Enumerable + } + + export type StringFieldUpdateOperationsInput = { + set?: string + } + + export type Report_to_chipUpdateManyWithoutChipNestedInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + upsert?: Enumerable + createMany?: Report_to_chipCreateManyChipInputEnvelope + set?: Enumerable + disconnect?: Enumerable + delete?: Enumerable + connect?: Enumerable + update?: Enumerable + updateMany?: Enumerable + deleteMany?: Enumerable + } + + export type Report_to_chipUncheckedUpdateManyWithoutChipNestedInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + upsert?: Enumerable + createMany?: Report_to_chipCreateManyChipInputEnvelope + set?: Enumerable + disconnect?: Enumerable + delete?: Enumerable + connect?: Enumerable + update?: Enumerable + updateMany?: Enumerable + deleteMany?: Enumerable + } + + export type Report_to_clauseCreateNestedManyWithoutClauseInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + createMany?: Report_to_clauseCreateManyClauseInputEnvelope + connect?: Enumerable + } + + export type Report_to_clauseUncheckedCreateNestedManyWithoutClauseInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + createMany?: Report_to_clauseCreateManyClauseInputEnvelope + connect?: Enumerable + } + + export type Report_to_clauseUpdateManyWithoutClauseNestedInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + upsert?: Enumerable + createMany?: Report_to_clauseCreateManyClauseInputEnvelope + set?: Enumerable + disconnect?: Enumerable + delete?: Enumerable + connect?: Enumerable + update?: Enumerable + updateMany?: Enumerable + deleteMany?: Enumerable + } + + export type Report_to_clauseUncheckedUpdateManyWithoutClauseNestedInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + upsert?: Enumerable + createMany?: Report_to_clauseCreateManyClauseInputEnvelope + set?: Enumerable + disconnect?: Enumerable + delete?: Enumerable + connect?: Enumerable + update?: Enumerable + updateMany?: Enumerable + deleteMany?: Enumerable + } + + export type Report_to_chipCreateNestedManyWithoutReportInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + createMany?: Report_to_chipCreateManyReportInputEnvelope + connect?: Enumerable + } + + export type Report_to_clauseCreateNestedManyWithoutReportInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + createMany?: Report_to_clauseCreateManyReportInputEnvelope + connect?: Enumerable + } + + export type Report_to_chipUncheckedCreateNestedManyWithoutReportInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + createMany?: Report_to_chipCreateManyReportInputEnvelope + connect?: Enumerable + } + + export type Report_to_clauseUncheckedCreateNestedManyWithoutReportInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + createMany?: Report_to_clauseCreateManyReportInputEnvelope + connect?: Enumerable + } + + export type NullableStringFieldUpdateOperationsInput = { + set?: string | null + } + + export type NullableDateTimeFieldUpdateOperationsInput = { + set?: Date | string | null + } + + export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string + } + + export type Report_to_chipUpdateManyWithoutReportNestedInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + upsert?: Enumerable + createMany?: Report_to_chipCreateManyReportInputEnvelope + set?: Enumerable + disconnect?: Enumerable + delete?: Enumerable + connect?: Enumerable + update?: Enumerable + updateMany?: Enumerable + deleteMany?: Enumerable + } + + export type Report_to_clauseUpdateManyWithoutReportNestedInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + upsert?: Enumerable + createMany?: Report_to_clauseCreateManyReportInputEnvelope + set?: Enumerable + disconnect?: Enumerable + delete?: Enumerable + connect?: Enumerable + update?: Enumerable + updateMany?: Enumerable + deleteMany?: Enumerable + } + + export type Report_to_chipUncheckedUpdateManyWithoutReportNestedInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + upsert?: Enumerable + createMany?: Report_to_chipCreateManyReportInputEnvelope + set?: Enumerable + disconnect?: Enumerable + delete?: Enumerable + connect?: Enumerable + update?: Enumerable + updateMany?: Enumerable + deleteMany?: Enumerable + } + + export type Report_to_clauseUncheckedUpdateManyWithoutReportNestedInput = { + create?: XOR, Enumerable> + connectOrCreate?: Enumerable + upsert?: Enumerable + createMany?: Report_to_clauseCreateManyReportInputEnvelope + set?: Enumerable + disconnect?: Enumerable + delete?: Enumerable + connect?: Enumerable + update?: Enumerable + updateMany?: Enumerable + deleteMany?: Enumerable + } + + export type ChipCreateNestedOneWithoutReport_to_chipInput = { + create?: XOR + connectOrCreate?: ChipCreateOrConnectWithoutReport_to_chipInput + connect?: ChipWhereUniqueInput + } + + export type ReportCreateNestedOneWithoutReport_to_chipInput = { + create?: XOR + connectOrCreate?: ReportCreateOrConnectWithoutReport_to_chipInput + connect?: ReportWhereUniqueInput + } + + export type ChipUpdateOneRequiredWithoutReport_to_chipNestedInput = { + create?: XOR + connectOrCreate?: ChipCreateOrConnectWithoutReport_to_chipInput + upsert?: ChipUpsertWithoutReport_to_chipInput + connect?: ChipWhereUniqueInput + update?: XOR + } + + export type ReportUpdateOneRequiredWithoutReport_to_chipNestedInput = { + create?: XOR + connectOrCreate?: ReportCreateOrConnectWithoutReport_to_chipInput + upsert?: ReportUpsertWithoutReport_to_chipInput + connect?: ReportWhereUniqueInput + update?: XOR + } + + export type ClauseCreateNestedOneWithoutReport_to_clauseInput = { + create?: XOR + connectOrCreate?: ClauseCreateOrConnectWithoutReport_to_clauseInput + connect?: ClauseWhereUniqueInput + } + + export type ReportCreateNestedOneWithoutReport_to_clauseInput = { + create?: XOR + connectOrCreate?: ReportCreateOrConnectWithoutReport_to_clauseInput + connect?: ReportWhereUniqueInput + } + + export type ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInput = { + create?: XOR + connectOrCreate?: ClauseCreateOrConnectWithoutReport_to_clauseInput + upsert?: ClauseUpsertWithoutReport_to_clauseInput + connect?: ClauseWhereUniqueInput + update?: XOR + } + + export type ReportUpdateOneRequiredWithoutReport_to_clauseNestedInput = { + create?: XOR + connectOrCreate?: ReportCreateOrConnectWithoutReport_to_clauseInput + upsert?: ReportUpsertWithoutReport_to_clauseInput + connect?: ReportWhereUniqueInput + update?: XOR + } + + export type NestedStringFilter = { + equals?: string + in?: Enumerable | string + notIn?: Enumerable | string + lt?: string + lte?: string + gt?: string + gte?: string + contains?: string + startsWith?: string + endsWith?: string + not?: NestedStringFilter | string + } + + export type NestedStringWithAggregatesFilter = { + equals?: string + in?: Enumerable | string + notIn?: Enumerable | string + lt?: string + lte?: string + gt?: string + gte?: string + contains?: string + startsWith?: string + endsWith?: string + not?: NestedStringWithAggregatesFilter | string + _count?: NestedIntFilter + _min?: NestedStringFilter + _max?: NestedStringFilter + } + + export type NestedIntFilter = { + equals?: number + in?: Enumerable | number + notIn?: Enumerable | number + lt?: number + lte?: number + gt?: number + gte?: number + not?: NestedIntFilter | number + } + + export type NestedStringNullableFilter = { + equals?: string | null + in?: Enumerable | string | null + notIn?: Enumerable | string | null + lt?: string + lte?: string + gt?: string + gte?: string + contains?: string + startsWith?: string + endsWith?: string + not?: NestedStringNullableFilter | string | null + } + + export type NestedDateTimeNullableFilter = { + equals?: Date | string | null + in?: Enumerable | Enumerable | Date | string | null + notIn?: Enumerable | Enumerable | Date | string | null + lt?: Date | string + lte?: Date | string + gt?: Date | string + gte?: Date | string + not?: NestedDateTimeNullableFilter | Date | string | null + } + + export type NestedDateTimeFilter = { + equals?: Date | string + in?: Enumerable | Enumerable | Date | string + notIn?: Enumerable | Enumerable | Date | string + lt?: Date | string + lte?: Date | string + gt?: Date | string + gte?: Date | string + not?: NestedDateTimeFilter | Date | string + } + + export type NestedStringNullableWithAggregatesFilter = { + equals?: string | null + in?: Enumerable | string | null + notIn?: Enumerable | string | null + lt?: string + lte?: string + gt?: string + gte?: string + contains?: string + startsWith?: string + endsWith?: string + not?: NestedStringNullableWithAggregatesFilter | string | null + _count?: NestedIntNullableFilter + _min?: NestedStringNullableFilter + _max?: NestedStringNullableFilter + } + + export type NestedIntNullableFilter = { + equals?: number | null + in?: Enumerable | number | null + notIn?: Enumerable | number | null + lt?: number + lte?: number + gt?: number + gte?: number + not?: NestedIntNullableFilter | number | null + } + + export type NestedDateTimeNullableWithAggregatesFilter = { + equals?: Date | string | null + in?: Enumerable | Enumerable | Date | string | null + notIn?: Enumerable | Enumerable | Date | string | null + lt?: Date | string + lte?: Date | string + gt?: Date | string + gte?: Date | string + not?: NestedDateTimeNullableWithAggregatesFilter | Date | string | null + _count?: NestedIntNullableFilter + _min?: NestedDateTimeNullableFilter + _max?: NestedDateTimeNullableFilter + } + + export type NestedDateTimeWithAggregatesFilter = { + equals?: Date | string + in?: Enumerable | Enumerable | Date | string + notIn?: Enumerable | Enumerable | Date | string + lt?: Date | string + lte?: Date | string + gt?: Date | string + gte?: Date | string + not?: NestedDateTimeWithAggregatesFilter | Date | string + _count?: NestedIntFilter + _min?: NestedDateTimeFilter + _max?: NestedDateTimeFilter + } + + export type Report_to_chipCreateWithoutChipInput = { + id: string + report: ReportCreateNestedOneWithoutReport_to_chipInput + } + + export type Report_to_chipUncheckedCreateWithoutChipInput = { + id: string + report_id: string + } + + export type Report_to_chipCreateOrConnectWithoutChipInput = { + where: Report_to_chipWhereUniqueInput + create: XOR + } + + export type Report_to_chipCreateManyChipInputEnvelope = { + data: Enumerable + skipDuplicates?: boolean + } + + export type Report_to_chipUpsertWithWhereUniqueWithoutChipInput = { + where: Report_to_chipWhereUniqueInput + update: XOR + create: XOR + } + + export type Report_to_chipUpdateWithWhereUniqueWithoutChipInput = { + where: Report_to_chipWhereUniqueInput + data: XOR + } + + export type Report_to_chipUpdateManyWithWhereWithoutChipInput = { + where: Report_to_chipScalarWhereInput + data: XOR + } + + export type Report_to_chipScalarWhereInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringFilter | string + report_id?: StringFilter | string + chip_id?: StringFilter | string + } + + export type Report_to_clauseCreateWithoutClauseInput = { + id: string + report: ReportCreateNestedOneWithoutReport_to_clauseInput + } + + export type Report_to_clauseUncheckedCreateWithoutClauseInput = { + id: string + report_id: string + } + + export type Report_to_clauseCreateOrConnectWithoutClauseInput = { + where: Report_to_clauseWhereUniqueInput + create: XOR + } + + export type Report_to_clauseCreateManyClauseInputEnvelope = { + data: Enumerable + skipDuplicates?: boolean + } + + export type Report_to_clauseUpsertWithWhereUniqueWithoutClauseInput = { + where: Report_to_clauseWhereUniqueInput + update: XOR + create: XOR + } + + export type Report_to_clauseUpdateWithWhereUniqueWithoutClauseInput = { + where: Report_to_clauseWhereUniqueInput + data: XOR + } + + export type Report_to_clauseUpdateManyWithWhereWithoutClauseInput = { + where: Report_to_clauseScalarWhereInput + data: XOR + } + + export type Report_to_clauseScalarWhereInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + id?: StringFilter | string + report_id?: StringFilter | string + clause_id?: StringFilter | string + } + + export type Report_to_chipCreateWithoutReportInput = { + id: string + chip: ChipCreateNestedOneWithoutReport_to_chipInput + } + + export type Report_to_chipUncheckedCreateWithoutReportInput = { + id: string + chip_id: string + } + + export type Report_to_chipCreateOrConnectWithoutReportInput = { + where: Report_to_chipWhereUniqueInput + create: XOR + } + + export type Report_to_chipCreateManyReportInputEnvelope = { + data: Enumerable + skipDuplicates?: boolean + } + + export type Report_to_clauseCreateWithoutReportInput = { + id: string + clause: ClauseCreateNestedOneWithoutReport_to_clauseInput + } + + export type Report_to_clauseUncheckedCreateWithoutReportInput = { + id: string + clause_id: string + } + + export type Report_to_clauseCreateOrConnectWithoutReportInput = { + where: Report_to_clauseWhereUniqueInput + create: XOR + } + + export type Report_to_clauseCreateManyReportInputEnvelope = { + data: Enumerable + skipDuplicates?: boolean + } + + export type Report_to_chipUpsertWithWhereUniqueWithoutReportInput = { + where: Report_to_chipWhereUniqueInput + update: XOR + create: XOR + } + + export type Report_to_chipUpdateWithWhereUniqueWithoutReportInput = { + where: Report_to_chipWhereUniqueInput + data: XOR + } + + export type Report_to_chipUpdateManyWithWhereWithoutReportInput = { + where: Report_to_chipScalarWhereInput + data: XOR + } + + export type Report_to_clauseUpsertWithWhereUniqueWithoutReportInput = { + where: Report_to_clauseWhereUniqueInput + update: XOR + create: XOR + } + + export type Report_to_clauseUpdateWithWhereUniqueWithoutReportInput = { + where: Report_to_clauseWhereUniqueInput + data: XOR + } + + export type Report_to_clauseUpdateManyWithWhereWithoutReportInput = { + where: Report_to_clauseScalarWhereInput + data: XOR + } + + export type ChipCreateWithoutReport_to_chipInput = { + id: string + label: string + value: string + } + + export type ChipUncheckedCreateWithoutReport_to_chipInput = { + id: string + label: string + value: string + } + + export type ChipCreateOrConnectWithoutReport_to_chipInput = { + where: ChipWhereUniqueInput + create: XOR + } + + export type ReportCreateWithoutReport_to_chipInput = { + id: string + title?: string | null + project_description?: string | null + redacted_by?: string | null + meet_date?: Date | string | null + applicant_name?: string | null + applicant_address?: string | null + project_cadastral_ref?: string | null + project_space_type?: string | null + decision?: string | null + precisions?: string | null + contacts?: string | null + further_information?: string | null + created_by_id: string + created_by_username: string + created_at: Date | string + service_instructeur?: string | null + report_to_clause?: Report_to_clauseCreateNestedManyWithoutReportInput + } + + export type ReportUncheckedCreateWithoutReport_to_chipInput = { + id: string + title?: string | null + project_description?: string | null + redacted_by?: string | null + meet_date?: Date | string | null + applicant_name?: string | null + applicant_address?: string | null + project_cadastral_ref?: string | null + project_space_type?: string | null + decision?: string | null + precisions?: string | null + contacts?: string | null + further_information?: string | null + created_by_id: string + created_by_username: string + created_at: Date | string + service_instructeur?: string | null + report_to_clause?: Report_to_clauseUncheckedCreateNestedManyWithoutReportInput + } + + export type ReportCreateOrConnectWithoutReport_to_chipInput = { + where: ReportWhereUniqueInput + create: XOR + } + + export type ChipUpsertWithoutReport_to_chipInput = { + update: XOR + create: XOR + } + + export type ChipUpdateWithoutReport_to_chipInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + } + + export type ChipUncheckedUpdateWithoutReport_to_chipInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + } + + export type ReportUpsertWithoutReport_to_chipInput = { + update: XOR + create: XOR + } + + export type ReportUpdateWithoutReport_to_chipInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + project_description?: NullableStringFieldUpdateOperationsInput | string | null + redacted_by?: NullableStringFieldUpdateOperationsInput | string | null + meet_date?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + applicant_name?: NullableStringFieldUpdateOperationsInput | string | null + applicant_address?: NullableStringFieldUpdateOperationsInput | string | null + project_cadastral_ref?: NullableStringFieldUpdateOperationsInput | string | null + project_space_type?: NullableStringFieldUpdateOperationsInput | string | null + decision?: NullableStringFieldUpdateOperationsInput | string | null + precisions?: NullableStringFieldUpdateOperationsInput | string | null + contacts?: NullableStringFieldUpdateOperationsInput | string | null + further_information?: NullableStringFieldUpdateOperationsInput | string | null + created_by_id?: StringFieldUpdateOperationsInput | string + created_by_username?: StringFieldUpdateOperationsInput | string + created_at?: DateTimeFieldUpdateOperationsInput | Date | string + service_instructeur?: NullableStringFieldUpdateOperationsInput | string | null + report_to_clause?: Report_to_clauseUpdateManyWithoutReportNestedInput + } + + export type ReportUncheckedUpdateWithoutReport_to_chipInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + project_description?: NullableStringFieldUpdateOperationsInput | string | null + redacted_by?: NullableStringFieldUpdateOperationsInput | string | null + meet_date?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + applicant_name?: NullableStringFieldUpdateOperationsInput | string | null + applicant_address?: NullableStringFieldUpdateOperationsInput | string | null + project_cadastral_ref?: NullableStringFieldUpdateOperationsInput | string | null + project_space_type?: NullableStringFieldUpdateOperationsInput | string | null + decision?: NullableStringFieldUpdateOperationsInput | string | null + precisions?: NullableStringFieldUpdateOperationsInput | string | null + contacts?: NullableStringFieldUpdateOperationsInput | string | null + further_information?: NullableStringFieldUpdateOperationsInput | string | null + created_by_id?: StringFieldUpdateOperationsInput | string + created_by_username?: StringFieldUpdateOperationsInput | string + created_at?: DateTimeFieldUpdateOperationsInput | Date | string + service_instructeur?: NullableStringFieldUpdateOperationsInput | string | null + report_to_clause?: Report_to_clauseUncheckedUpdateManyWithoutReportNestedInput + } + + export type ClauseCreateWithoutReport_to_clauseInput = { + id: string + label: string + value: string + } + + export type ClauseUncheckedCreateWithoutReport_to_clauseInput = { + id: string + label: string + value: string + } + + export type ClauseCreateOrConnectWithoutReport_to_clauseInput = { + where: ClauseWhereUniqueInput + create: XOR + } + + export type ReportCreateWithoutReport_to_clauseInput = { + id: string + title?: string | null + project_description?: string | null + redacted_by?: string | null + meet_date?: Date | string | null + applicant_name?: string | null + applicant_address?: string | null + project_cadastral_ref?: string | null + project_space_type?: string | null + decision?: string | null + precisions?: string | null + contacts?: string | null + further_information?: string | null + created_by_id: string + created_by_username: string + created_at: Date | string + service_instructeur?: string | null + report_to_chip?: Report_to_chipCreateNestedManyWithoutReportInput + } + + export type ReportUncheckedCreateWithoutReport_to_clauseInput = { + id: string + title?: string | null + project_description?: string | null + redacted_by?: string | null + meet_date?: Date | string | null + applicant_name?: string | null + applicant_address?: string | null + project_cadastral_ref?: string | null + project_space_type?: string | null + decision?: string | null + precisions?: string | null + contacts?: string | null + further_information?: string | null + created_by_id: string + created_by_username: string + created_at: Date | string + service_instructeur?: string | null + report_to_chip?: Report_to_chipUncheckedCreateNestedManyWithoutReportInput + } + + export type ReportCreateOrConnectWithoutReport_to_clauseInput = { + where: ReportWhereUniqueInput + create: XOR + } + + export type ClauseUpsertWithoutReport_to_clauseInput = { + update: XOR + create: XOR + } + + export type ClauseUpdateWithoutReport_to_clauseInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + } + + export type ClauseUncheckedUpdateWithoutReport_to_clauseInput = { + id?: StringFieldUpdateOperationsInput | string + label?: StringFieldUpdateOperationsInput | string + value?: StringFieldUpdateOperationsInput | string + } + + export type ReportUpsertWithoutReport_to_clauseInput = { + update: XOR + create: XOR + } + + export type ReportUpdateWithoutReport_to_clauseInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + project_description?: NullableStringFieldUpdateOperationsInput | string | null + redacted_by?: NullableStringFieldUpdateOperationsInput | string | null + meet_date?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + applicant_name?: NullableStringFieldUpdateOperationsInput | string | null + applicant_address?: NullableStringFieldUpdateOperationsInput | string | null + project_cadastral_ref?: NullableStringFieldUpdateOperationsInput | string | null + project_space_type?: NullableStringFieldUpdateOperationsInput | string | null + decision?: NullableStringFieldUpdateOperationsInput | string | null + precisions?: NullableStringFieldUpdateOperationsInput | string | null + contacts?: NullableStringFieldUpdateOperationsInput | string | null + further_information?: NullableStringFieldUpdateOperationsInput | string | null + created_by_id?: StringFieldUpdateOperationsInput | string + created_by_username?: StringFieldUpdateOperationsInput | string + created_at?: DateTimeFieldUpdateOperationsInput | Date | string + service_instructeur?: NullableStringFieldUpdateOperationsInput | string | null + report_to_chip?: Report_to_chipUpdateManyWithoutReportNestedInput + } + + export type ReportUncheckedUpdateWithoutReport_to_clauseInput = { + id?: StringFieldUpdateOperationsInput | string + title?: NullableStringFieldUpdateOperationsInput | string | null + project_description?: NullableStringFieldUpdateOperationsInput | string | null + redacted_by?: NullableStringFieldUpdateOperationsInput | string | null + meet_date?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + applicant_name?: NullableStringFieldUpdateOperationsInput | string | null + applicant_address?: NullableStringFieldUpdateOperationsInput | string | null + project_cadastral_ref?: NullableStringFieldUpdateOperationsInput | string | null + project_space_type?: NullableStringFieldUpdateOperationsInput | string | null + decision?: NullableStringFieldUpdateOperationsInput | string | null + precisions?: NullableStringFieldUpdateOperationsInput | string | null + contacts?: NullableStringFieldUpdateOperationsInput | string | null + further_information?: NullableStringFieldUpdateOperationsInput | string | null + created_by_id?: StringFieldUpdateOperationsInput | string + created_by_username?: StringFieldUpdateOperationsInput | string + created_at?: DateTimeFieldUpdateOperationsInput | Date | string + service_instructeur?: NullableStringFieldUpdateOperationsInput | string | null + report_to_chip?: Report_to_chipUncheckedUpdateManyWithoutReportNestedInput + } + + export type Report_to_chipCreateManyChipInput = { + id: string + report_id: string + } + + export type Report_to_chipUpdateWithoutChipInput = { + id?: StringFieldUpdateOperationsInput | string + report?: ReportUpdateOneRequiredWithoutReport_to_chipNestedInput + } + + export type Report_to_chipUncheckedUpdateWithoutChipInput = { + id?: StringFieldUpdateOperationsInput | string + report_id?: StringFieldUpdateOperationsInput | string + } + + export type Report_to_chipUncheckedUpdateManyWithoutReport_to_chipInput = { + id?: StringFieldUpdateOperationsInput | string + report_id?: StringFieldUpdateOperationsInput | string + } + + export type Report_to_clauseCreateManyClauseInput = { + id: string + report_id: string + } + + export type Report_to_clauseUpdateWithoutClauseInput = { + id?: StringFieldUpdateOperationsInput | string + report?: ReportUpdateOneRequiredWithoutReport_to_clauseNestedInput + } + + export type Report_to_clauseUncheckedUpdateWithoutClauseInput = { + id?: StringFieldUpdateOperationsInput | string + report_id?: StringFieldUpdateOperationsInput | string + } + + export type Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInput = { + id?: StringFieldUpdateOperationsInput | string + report_id?: StringFieldUpdateOperationsInput | string + } + + export type Report_to_chipCreateManyReportInput = { + id: string + chip_id: string + } + + export type Report_to_clauseCreateManyReportInput = { + id: string + clause_id: string + } + + export type Report_to_chipUpdateWithoutReportInput = { + id?: StringFieldUpdateOperationsInput | string + chip?: ChipUpdateOneRequiredWithoutReport_to_chipNestedInput + } + + export type Report_to_chipUncheckedUpdateWithoutReportInput = { + id?: StringFieldUpdateOperationsInput | string + chip_id?: StringFieldUpdateOperationsInput | string + } + + export type Report_to_clauseUpdateWithoutReportInput = { + id?: StringFieldUpdateOperationsInput | string + clause?: ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInput + } + + export type Report_to_clauseUncheckedUpdateWithoutReportInput = { + id?: StringFieldUpdateOperationsInput | string + clause_id?: StringFieldUpdateOperationsInput | string + } + + + + /** + * Batch Payload for updateMany & deleteMany & createMany + */ + + export type BatchPayload = { + count: number + } + + /** + * DMMF + */ + export const dmmf: runtime.BaseDMMF +} + +type Buffer = Omit diff --git a/packages/electric-client/src/generated/client/runtime/library.d.ts b/packages/electric-client/src/generated/client/runtime/library.d.ts new file mode 100644 index 00000000..10251fc4 --- /dev/null +++ b/packages/electric-client/src/generated/client/runtime/library.d.ts @@ -0,0 +1 @@ +export * from '@prisma/client/runtime'; \ No newline at end of file diff --git a/packages/electric-client/src/index.ts b/packages/electric-client/src/index.ts new file mode 100644 index 00000000..29841759 --- /dev/null +++ b/packages/electric-client/src/index.ts @@ -0,0 +1 @@ +export * from "./generated/client"; diff --git a/packages/electric-client/tsconfig.json b/packages/electric-client/tsconfig.json new file mode 100644 index 00000000..bda20ef6 --- /dev/null +++ b/packages/electric-client/tsconfig.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + /* Base Options: */ + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es2022", + "allowJs": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "resolveJsonModule": true, + "moduleDetection": "force", + "isolatedModules": true, + /* Strictness */ + "incremental": true, + "strict": true, + "noUncheckedIndexedAccess": true, + /* If transpiling with TypeScript: */ + "moduleResolution": "bundler", + "module": "ESNext", + "outDir": "dist", + "forceConsistentCasingInFileNames": false, + "sourceMap": true, + /* If your code doesn't run in the DOM: */ + "strictBindCallApply": false, + "lib": ["es2022"], + "types": ["node"] + }, + "include": ["src/**/*.ts"] +} diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 02f4abc1..e01a0394 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -31,8 +31,9 @@ "@tanstack/react-query": "^4.18.0", "@tanstack/react-router": "^1.22.2", "@tanstack/router-devtools": "^1.22.2", + "@cr-vif/electric-client": "workspace:*", "date-fns": "^3.6.0", - "electric-sql": "^0.10.0", + "electric-sql": "^0.10.1", "install": "^0.13.0", "npm": "^10.5.0", "ofetch": "^1.3.4", diff --git a/packages/frontend/src/db.ts b/packages/frontend/src/db.ts index cd23a2b3..59d9c167 100644 --- a/packages/frontend/src/db.ts +++ b/packages/frontend/src/db.ts @@ -1,7 +1,7 @@ import { electrify, ElectricDatabase } from "electric-sql/wa-sqlite"; -import { schema } from "./generated/client"; import type { ElectricConfig } from "electric-sql/config"; import { ENV } from "./envVars"; +import { schema } from "@cr-vif/electric-client/development"; const config = { url: ENV.VITE_ELECTRIC_URL, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ac3155cf..fd9ec92e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,8 +24,8 @@ importers: specifier: ^20.11.28 version: 20.12.3 electric-sql: - specifier: ^0.9.5 - version: 0.9.6(@tauri-apps/plugin-sql@2.0.0-alpha.5)(react-dom@18.2.0)(react@18.2.0) + specifier: ^0.10.1 + version: 0.10.1(@tauri-apps/plugin-sql@2.0.0-alpha.5)(react-dom@18.2.0)(react@18.2.0)(vue@2.7.16)(wa-sqlite@0.9.13) prettier: specifier: ^3.2.5 version: 3.2.5 @@ -136,6 +136,22 @@ importers: specifier: ^1.4.0 version: 1.4.0(@types/node@20.12.3) + packages/electric-client: + dependencies: + '@prisma/client': + specifier: ^4.8.1 + version: 4.16.2(prisma@4.8.1) + electric-sql: + specifier: ^0.10.1 + version: 0.10.1(@tauri-apps/plugin-sql@2.0.0-alpha.5)(react-dom@18.2.0)(react@18.2.0)(vue@2.7.16)(wa-sqlite@0.9.13) + devDependencies: + prisma: + specifier: ^4.8.1 + version: 4.8.1 + vite-node: + specifier: ^1.4.0 + version: 1.4.0(@types/node@20.12.3) + packages/frontend: dependencies: '@ark-ui/anatomy': @@ -147,6 +163,9 @@ importers: '@codegouvfr/react-dsfr': specifier: ^1.9.2 version: 1.9.6 + '@cr-vif/electric-client': + specifier: workspace:* + version: link:../electric-client '@emotion/react': specifier: ^11.11.4 version: 11.11.4(@types/react@18.2.74)(react@18.2.0) @@ -181,8 +200,8 @@ importers: specifier: ^3.6.0 version: 3.6.0 electric-sql: - specifier: ^0.10.0 - version: 0.10.0(@tauri-apps/plugin-sql@2.0.0-alpha.5)(react-dom@18.2.0)(react@18.2.0)(vue@2.7.16)(wa-sqlite@0.9.13) + specifier: ^0.10.1 + version: 0.10.1(@tauri-apps/plugin-sql@2.0.0-alpha.5)(react-dom@18.2.0)(react@18.2.0)(vue@2.7.16)(wa-sqlite@0.9.13) install: specifier: ^0.13.0 version: 0.13.0 @@ -1193,18 +1212,6 @@ packages: superjson: 2.2.1 dev: true - /@electric-sql/prisma-generator@1.1.3: - resolution: {integrity: sha512-Tvtdw7Vm3Ggdp35bCWmaYEyGmWeoLxU+g3mdbGNP4PzCq/eqMyO6OCTyZF7bdT+KqO2hEQT+jljsPRA+uUTgrQ==} - hasBin: true - dependencies: - '@prisma/generator-helper': 4.16.2 - code-block-writer: 11.0.3 - lodash: 4.17.21 - zod: 3.22.4 - transitivePeerDependencies: - - supports-color - dev: true - /@electric-sql/prisma-generator@1.1.4: resolution: {integrity: sha512-zZQ88uBEKIhf6lKmnzWjOs65V5uVj/i2/N9aU4jpbJIf63n9LUgUh6abv7weFkvJsGddY/6I0bgE4a400FAkxA==} hasBin: true @@ -1215,7 +1222,6 @@ packages: zod: 3.21.1 transitivePeerDependencies: - supports-color - dev: false /@emotion/babel-plugin@11.11.0: resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} @@ -3734,7 +3740,6 @@ packages: source-map: 0.6.1 optionalDependencies: prettier: 2.8.8 - dev: false /@vue/compiler-sfc@3.4.19: resolution: {integrity: sha512-LQ3U4SN0DlvV0xhr1lUsgLCYlwQfUfetyPxkKYu7dkfvx7g3ojrGAkw0AERLOKYXuAGnqFsEuytkdcComei3Yg==} @@ -5653,8 +5658,8 @@ packages: safe-buffer: 5.2.1 dev: false - /electric-sql@0.10.0(@tauri-apps/plugin-sql@2.0.0-alpha.5)(react-dom@18.2.0)(react@18.2.0)(vue@2.7.16)(wa-sqlite@0.9.13): - resolution: {integrity: sha512-u6Y1hU0adOO2PXWYJiwPKTCs7/Ksdt1/kSwioMWpLKwD5X87IMVZg27/+QwyYFC9znL+bk/rbses3axHJ8aZeg==} + /electric-sql@0.10.1(@tauri-apps/plugin-sql@2.0.0-alpha.5)(react-dom@18.2.0)(react@18.2.0)(vue@2.7.16)(wa-sqlite@0.9.13): + resolution: {integrity: sha512-k/Ctsw7fXV75nao5E5e77Kg0RkLbYN5YgMSNQRGPYdWp5VWX6RnhwQrMm12qhteMFTDNjeVXJD3L/ArHFyWBVw==} hasBin: true peerDependencies: '@capacitor-community/sqlite': '>= 5.6.2' @@ -5708,6 +5713,7 @@ packages: lodash.partition: 4.6.0 lodash.pick: 4.4.0 lodash.throttle: 4.1.1 + lodash.uniqwith: 4.5.0 loglevel: 1.9.1 long: 5.2.3 object.hasown: 1.1.4 @@ -5730,84 +5736,6 @@ packages: - encoding - supports-color - utf-8-validate - dev: false - - /electric-sql@0.9.6(@tauri-apps/plugin-sql@2.0.0-alpha.5)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-0W46ZBKO9+BJ+/VVTGfWumdSXYzPUVvZUTTFbvfDG3AMXH85B17PNpwudSgQRfT5FwUE6k8C+d0gR5Xuo29mmA==} - hasBin: true - peerDependencies: - '@capacitor-community/sqlite': '>= 5.6.2' - '@op-engineering/op-sqlite': '>= 2.0.16' - '@tauri-apps/plugin-sql': 2.0.0-alpha.5 - expo-sqlite: '>= 13.0.0' - react: '>= 16.8.0' - react-dom: '>= 16.8.0' - react-native: '>= 0.68.0' - typeorm: '>=0.3.0' - vue: '>=3.0.0' - wa-sqlite: rhashimoto/wa-sqlite#semver:^0.9.8 - peerDependenciesMeta: - '@capacitor-community/sqlite': - optional: true - '@op-engineering/op-sqlite': - optional: true - expo-sqlite: - optional: true - react: - optional: true - react-native: - optional: true - typeorm: - optional: true - vue: - optional: true - wa-sqlite: - optional: true - dependencies: - '@electric-sql/prisma-generator': 1.1.3 - '@prisma/client': 4.8.1(prisma@4.8.1) - '@tauri-apps/plugin-sql': 2.0.0-alpha.5 - async-mutex: 0.4.1 - base-64: 1.0.0 - better-sqlite3: 8.7.0 - commander: 11.1.0 - cross-fetch: 3.1.8 - decompress: 4.2.1 - dotenv-flow: 4.1.0 - events: 3.3.0 - exponential-backoff: 3.1.1 - frame-stream: 3.0.1 - get-port: 7.1.0 - jose: 4.15.5 - lodash.flow: 3.5.0 - lodash.groupby: 4.6.0 - lodash.isequal: 4.5.0 - lodash.mapvalues: 4.6.0 - lodash.omitby: 4.6.0 - lodash.partition: 4.6.0 - lodash.pick: 4.4.0 - lodash.throttle: 4.1.1 - loglevel: 1.9.1 - long: 5.2.3 - object.hasown: 1.1.4 - ohash: 1.1.3 - prisma: 4.8.1 - prompts: 2.4.2 - protobufjs: 7.2.6 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - squel: 5.13.0 - tcp-port-used: 1.0.2 - text-encoder-lite: 2.0.0 - ts-dedent: 2.2.0 - ws: 8.16.0 - zod: 3.21.1 - transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - utf-8-validate - dev: true /electron-to-chromium@1.4.724: resolution: {integrity: sha512-RTRvkmRkGhNBPPpdrgtDKvmOEYTrPlXDfc0J/Nfq5s29tEahAwhiX4mmhNzj6febWMleulxVYPh7QwCSL/EldA==} @@ -7670,6 +7598,9 @@ packages: resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} dev: true + /lodash.uniqwith@4.5.0: + resolution: {integrity: sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==} + /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -10327,7 +10258,6 @@ packages: dependencies: '@vue/compiler-sfc': 2.7.16 csstype: 3.1.3 - dev: false /vuex@3.6.2(vue@2.7.16): resolution: {integrity: sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==} @@ -10624,4 +10554,3 @@ packages: resolution: {tarball: https://codeload.github.com/rhashimoto/wa-sqlite/tar.gz/ca2084cdd188c56532ba3e272696d0b9e21a23bf} name: wa-sqlite version: 0.9.13 - dev: false diff --git a/src/generated/client/index.ts b/src/generated/client/index.ts new file mode 100644 index 00000000..ec90a25e --- /dev/null +++ b/src/generated/client/index.ts @@ -0,0 +1,2802 @@ +import { z } from 'zod'; +import type { Prisma } from './prismaClient'; +import { type TableSchema, DbSchema, Relation, ElectricClient, type HKT } from 'electric-sql/client/model'; +import migrations from './migrations'; + +///////////////////////////////////////// +// HELPER FUNCTIONS +///////////////////////////////////////// + + +///////////////////////////////////////// +// ENUMS +///////////////////////////////////////// + +export const ChipScalarFieldEnumSchema = z.enum(['id','label','value']); + +export const ClauseScalarFieldEnumSchema = z.enum(['id','label','value']); + +export const QueryModeSchema = z.enum(['default','insensitive']); + +export const ReportScalarFieldEnumSchema = z.enum(['id','title','project_description','redacted_by','meet_date','applicant_name','applicant_address','project_cadastral_ref','project_space_type','decision','precisions','contacts','further_information','created_by_id','created_by_username','created_at','service_instructeur']); + +export const Report_to_chipScalarFieldEnumSchema = z.enum(['id','report_id','chip_id']); + +export const Report_to_clauseScalarFieldEnumSchema = z.enum(['id','report_id','clause_id']); + +export const SortOrderSchema = z.enum(['asc','desc']); + +export const TransactionIsolationLevelSchema = z.enum(['ReadUncommitted','ReadCommitted','RepeatableRead','Serializable']); +///////////////////////////////////////// +// MODELS +///////////////////////////////////////// + +///////////////////////////////////////// +// CHIP SCHEMA +///////////////////////////////////////// + +export const ChipSchema = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), +}) + +export type Chip = z.infer + +///////////////////////////////////////// +// CLAUSE SCHEMA +///////////////////////////////////////// + +export const ClauseSchema = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), +}) + +export type Clause = z.infer + +///////////////////////////////////////// +// REPORT SCHEMA +///////////////////////////////////////// + +export const ReportSchema = z.object({ + id: z.string(), + title: z.string().nullable(), + project_description: z.string().nullable(), + redacted_by: z.string().nullable(), + meet_date: z.coerce.date().nullable(), + applicant_name: z.string().nullable(), + applicant_address: z.string().nullable(), + project_cadastral_ref: z.string().nullable(), + project_space_type: z.string().nullable(), + decision: z.string().nullable(), + precisions: z.string().nullable(), + contacts: z.string().nullable(), + further_information: z.string().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().nullable(), +}) + +export type Report = z.infer + +///////////////////////////////////////// +// REPORT TO CHIP SCHEMA +///////////////////////////////////////// + +export const Report_to_chipSchema = z.object({ + id: z.string(), + report_id: z.string(), + chip_id: z.string(), +}) + +export type Report_to_chip = z.infer + +///////////////////////////////////////// +// REPORT TO CLAUSE SCHEMA +///////////////////////////////////////// + +export const Report_to_clauseSchema = z.object({ + id: z.string(), + report_id: z.string(), + clause_id: z.string(), +}) + +export type Report_to_clause = z.infer + +///////////////////////////////////////// +// SELECT & INCLUDE +///////////////////////////////////////// + +// CHIP +//------------------------------------------------------ + +export const ChipIncludeSchema: z.ZodType = z.object({ + report_to_chip: z.union([z.boolean(),z.lazy(() => Report_to_chipFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ChipCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const ChipArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ChipSelectSchema).optional(), + include: z.lazy(() => ChipIncludeSchema).optional(), +}).strict(); + +export const ChipCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ChipCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const ChipCountOutputTypeSelectSchema: z.ZodType = z.object({ + report_to_chip: z.boolean().optional(), +}).strict(); + +export const ChipSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + label: z.boolean().optional(), + value: z.boolean().optional(), + report_to_chip: z.union([z.boolean(),z.lazy(() => Report_to_chipFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ChipCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// CLAUSE +//------------------------------------------------------ + +export const ClauseIncludeSchema: z.ZodType = z.object({ + report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ClauseCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const ClauseArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ClauseSelectSchema).optional(), + include: z.lazy(() => ClauseIncludeSchema).optional(), +}).strict(); + +export const ClauseCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ClauseCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const ClauseCountOutputTypeSelectSchema: z.ZodType = z.object({ + report_to_clause: z.boolean().optional(), +}).strict(); + +export const ClauseSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + label: z.boolean().optional(), + value: z.boolean().optional(), + report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ClauseCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// REPORT +//------------------------------------------------------ + +export const ReportIncludeSchema: z.ZodType = z.object({ + report_to_chip: z.union([z.boolean(),z.lazy(() => Report_to_chipFindManyArgsSchema)]).optional(), + report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ReportCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const ReportArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ReportSelectSchema).optional(), + include: z.lazy(() => ReportIncludeSchema).optional(), +}).strict(); + +export const ReportCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => ReportCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const ReportCountOutputTypeSelectSchema: z.ZodType = z.object({ + report_to_chip: z.boolean().optional(), + report_to_clause: z.boolean().optional(), +}).strict(); + +export const ReportSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + title: z.boolean().optional(), + project_description: z.boolean().optional(), + redacted_by: z.boolean().optional(), + meet_date: z.boolean().optional(), + applicant_name: z.boolean().optional(), + applicant_address: z.boolean().optional(), + project_cadastral_ref: z.boolean().optional(), + project_space_type: z.boolean().optional(), + decision: z.boolean().optional(), + precisions: z.boolean().optional(), + contacts: z.boolean().optional(), + further_information: z.boolean().optional(), + created_by_id: z.boolean().optional(), + created_by_username: z.boolean().optional(), + created_at: z.boolean().optional(), + service_instructeur: z.boolean().optional(), + report_to_chip: z.union([z.boolean(),z.lazy(() => Report_to_chipFindManyArgsSchema)]).optional(), + report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => ReportCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// REPORT TO CHIP +//------------------------------------------------------ + +export const Report_to_chipIncludeSchema: z.ZodType = z.object({ + chip: z.union([z.boolean(),z.lazy(() => ChipArgsSchema)]).optional(), + report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), +}).strict() + +export const Report_to_chipArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => Report_to_chipSelectSchema).optional(), + include: z.lazy(() => Report_to_chipIncludeSchema).optional(), +}).strict(); + +export const Report_to_chipSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + report_id: z.boolean().optional(), + chip_id: z.boolean().optional(), + chip: z.union([z.boolean(),z.lazy(() => ChipArgsSchema)]).optional(), + report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), +}).strict() + +// REPORT TO CLAUSE +//------------------------------------------------------ + +export const Report_to_clauseIncludeSchema: z.ZodType = z.object({ + clause: z.union([z.boolean(),z.lazy(() => ClauseArgsSchema)]).optional(), + report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), +}).strict() + +export const Report_to_clauseArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => Report_to_clauseSelectSchema).optional(), + include: z.lazy(() => Report_to_clauseIncludeSchema).optional(), +}).strict(); + +export const Report_to_clauseSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + report_id: z.boolean().optional(), + clause_id: z.boolean().optional(), + clause: z.union([z.boolean(),z.lazy(() => ClauseArgsSchema)]).optional(), + report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), +}).strict() + + +///////////////////////////////////////// +// INPUT TYPES +///////////////////////////////////////// + +export const ChipWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ChipWhereInputSchema),z.lazy(() => ChipWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => ChipWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ChipWhereInputSchema),z.lazy(() => ChipWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + label: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + value: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_to_chip: z.lazy(() => Report_to_chipListRelationFilterSchema).optional() +}).strict(); + +export const ChipOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional(), + report_to_chip: z.lazy(() => Report_to_chipOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const ChipWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().optional() +}).strict(); + +export const ChipOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => ChipCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => ChipMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => ChipMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const ChipScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ChipScalarWhereWithAggregatesInputSchema),z.lazy(() => ChipScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => ChipScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ChipScalarWhereWithAggregatesInputSchema),z.lazy(() => ChipScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + label: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + value: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + +export const ClauseWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ClauseWhereInputSchema),z.lazy(() => ClauseWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => ClauseWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ClauseWhereInputSchema),z.lazy(() => ClauseWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + label: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + value: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_to_clause: z.lazy(() => Report_to_clauseListRelationFilterSchema).optional() +}).strict(); + +export const ClauseOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const ClauseWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().optional() +}).strict(); + +export const ClauseOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => ClauseCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => ClauseMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => ClauseMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const ClauseScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema),z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema),z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + label: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + value: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + +export const ReportWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ReportWhereInputSchema),z.lazy(() => ReportWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => ReportWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ReportWhereInputSchema),z.lazy(() => ReportWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + title: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + project_description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + redacted_by: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + meet_date: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + applicant_name: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + applicant_address: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + project_cadastral_ref: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + project_space_type: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + decision: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + precisions: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + contacts: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + further_information: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + created_by_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + created_by_username: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + created_at: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + service_instructeur: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipListRelationFilterSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseListRelationFilterSchema).optional() +}).strict(); + +export const ReportOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + project_description: z.lazy(() => SortOrderSchema).optional(), + redacted_by: z.lazy(() => SortOrderSchema).optional(), + meet_date: z.lazy(() => SortOrderSchema).optional(), + applicant_name: z.lazy(() => SortOrderSchema).optional(), + applicant_address: z.lazy(() => SortOrderSchema).optional(), + project_cadastral_ref: z.lazy(() => SortOrderSchema).optional(), + project_space_type: z.lazy(() => SortOrderSchema).optional(), + decision: z.lazy(() => SortOrderSchema).optional(), + precisions: z.lazy(() => SortOrderSchema).optional(), + contacts: z.lazy(() => SortOrderSchema).optional(), + further_information: z.lazy(() => SortOrderSchema).optional(), + created_by_id: z.lazy(() => SortOrderSchema).optional(), + created_by_username: z.lazy(() => SortOrderSchema).optional(), + created_at: z.lazy(() => SortOrderSchema).optional(), + service_instructeur: z.lazy(() => SortOrderSchema).optional(), + report_to_chip: z.lazy(() => Report_to_chipOrderByRelationAggregateInputSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const ReportWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().optional() +}).strict(); + +export const ReportOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + project_description: z.lazy(() => SortOrderSchema).optional(), + redacted_by: z.lazy(() => SortOrderSchema).optional(), + meet_date: z.lazy(() => SortOrderSchema).optional(), + applicant_name: z.lazy(() => SortOrderSchema).optional(), + applicant_address: z.lazy(() => SortOrderSchema).optional(), + project_cadastral_ref: z.lazy(() => SortOrderSchema).optional(), + project_space_type: z.lazy(() => SortOrderSchema).optional(), + decision: z.lazy(() => SortOrderSchema).optional(), + precisions: z.lazy(() => SortOrderSchema).optional(), + contacts: z.lazy(() => SortOrderSchema).optional(), + further_information: z.lazy(() => SortOrderSchema).optional(), + created_by_id: z.lazy(() => SortOrderSchema).optional(), + created_by_username: z.lazy(() => SortOrderSchema).optional(), + created_at: z.lazy(() => SortOrderSchema).optional(), + service_instructeur: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => ReportCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => ReportMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => ReportMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const ReportScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => ReportScalarWhereWithAggregatesInputSchema),z.lazy(() => ReportScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => ReportScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => ReportScalarWhereWithAggregatesInputSchema),z.lazy(() => ReportScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + title: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + project_description: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + redacted_by: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + meet_date: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), + applicant_name: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + applicant_address: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + project_cadastral_ref: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + project_space_type: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + decision: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + precisions: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + contacts: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + further_information: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + created_by_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + created_by_username: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + created_at: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + service_instructeur: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), +}).strict(); + +export const Report_to_chipWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_chipWhereInputSchema),z.lazy(() => Report_to_chipWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_chipWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_chipWhereInputSchema),z.lazy(() => Report_to_chipWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + chip_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + chip: z.union([ z.lazy(() => ChipRelationFilterSchema),z.lazy(() => ChipWhereInputSchema) ]).optional(), + report: z.union([ z.lazy(() => ReportRelationFilterSchema),z.lazy(() => ReportWhereInputSchema) ]).optional(), +}).strict(); + +export const Report_to_chipOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + chip_id: z.lazy(() => SortOrderSchema).optional(), + chip: z.lazy(() => ChipOrderByWithRelationInputSchema).optional(), + report: z.lazy(() => ReportOrderByWithRelationInputSchema).optional() +}).strict(); + +export const Report_to_chipWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().optional() +}).strict(); + +export const Report_to_chipOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + chip_id: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => Report_to_chipCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => Report_to_chipMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => Report_to_chipMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const Report_to_chipScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_chipScalarWhereWithAggregatesInputSchema),z.lazy(() => Report_to_chipScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_chipScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_chipScalarWhereWithAggregatesInputSchema),z.lazy(() => Report_to_chipScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + chip_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + +export const Report_to_clauseWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_clauseWhereInputSchema),z.lazy(() => Report_to_clauseWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_clauseWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_clauseWhereInputSchema),z.lazy(() => Report_to_clauseWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + clause_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + clause: z.union([ z.lazy(() => ClauseRelationFilterSchema),z.lazy(() => ClauseWhereInputSchema) ]).optional(), + report: z.union([ z.lazy(() => ReportRelationFilterSchema),z.lazy(() => ReportWhereInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + clause_id: z.lazy(() => SortOrderSchema).optional(), + clause: z.lazy(() => ClauseOrderByWithRelationInputSchema).optional(), + report: z.lazy(() => ReportOrderByWithRelationInputSchema).optional() +}).strict(); + +export const Report_to_clauseWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().optional() +}).strict(); + +export const Report_to_clauseOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + clause_id: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => Report_to_clauseCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => Report_to_clauseMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => Report_to_clauseMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const Report_to_clauseScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema),z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema),z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + clause_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + +export const ChipCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), + report_to_chip: z.lazy(() => Report_to_chipCreateNestedManyWithoutChipInputSchema).optional() +}).strict(); + +export const ChipUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedCreateNestedManyWithoutChipInputSchema).optional() +}).strict(); + +export const ChipUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_to_chip: z.lazy(() => Report_to_chipUpdateManyWithoutChipNestedInputSchema).optional() +}).strict(); + +export const ChipUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedUpdateManyWithoutChipNestedInputSchema).optional() +}).strict(); + +export const ChipCreateManyInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ChipUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ChipUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ClauseCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), + report_to_clause: z.lazy(() => Report_to_clauseCreateNestedManyWithoutClauseInputSchema).optional() +}).strict(); + +export const ClauseUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedCreateNestedManyWithoutClauseInputSchema).optional() +}).strict(); + +export const ClauseUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_to_clause: z.lazy(() => Report_to_clauseUpdateManyWithoutClauseNestedInputSchema).optional() +}).strict(); + +export const ClauseUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutClauseNestedInputSchema).optional() +}).strict(); + +export const ClauseCreateManyInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ClauseUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ClauseUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ReportCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipCreateNestedManyWithoutReportInputSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedCreateNestedManyWithoutReportInputSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUpdateManyWithoutReportNestedInputSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const ReportUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedUpdateManyWithoutReportNestedInputSchema).optional(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const ReportCreateManyInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable() +}).strict(); + +export const ReportUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const ReportUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const Report_to_chipCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + chip: z.lazy(() => ChipCreateNestedOneWithoutReport_to_chipInputSchema), + report: z.lazy(() => ReportCreateNestedOneWithoutReport_to_chipInputSchema) +}).strict(); + +export const Report_to_chipUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string(), + chip_id: z.string() +}).strict(); + +export const Report_to_chipUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + chip: z.lazy(() => ChipUpdateOneRequiredWithoutReport_to_chipNestedInputSchema).optional(), + report: z.lazy(() => ReportUpdateOneRequiredWithoutReport_to_chipNestedInputSchema).optional() +}).strict(); + +export const Report_to_chipUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + chip_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_chipCreateManyInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string(), + chip_id: z.string() +}).strict(); + +export const Report_to_chipUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + chip_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + clause: z.lazy(() => ClauseCreateNestedOneWithoutReport_to_clauseInputSchema), + report: z.lazy(() => ReportCreateNestedOneWithoutReport_to_clauseInputSchema) +}).strict(); + +export const Report_to_clauseUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string(), + clause_id: z.string() +}).strict(); + +export const Report_to_clauseUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + clause: z.lazy(() => ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional(), + report: z.lazy(() => ReportUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional() +}).strict(); + +export const Report_to_clauseUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + clause_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseCreateManyInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string(), + clause_id: z.string() +}).strict(); + +export const Report_to_clauseUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + clause_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const StringFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringFilterSchema) ]).optional(), +}).strict(); + +export const Report_to_chipListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => Report_to_chipWhereInputSchema).optional(), + some: z.lazy(() => Report_to_chipWhereInputSchema).optional(), + none: z.lazy(() => Report_to_chipWhereInputSchema).optional() +}).strict(); + +export const Report_to_chipOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ChipCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ChipMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ChipMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const StringWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedStringFilterSchema).optional(), + _max: z.lazy(() => NestedStringFilterSchema).optional() +}).strict(); + +export const Report_to_clauseListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => Report_to_clauseWhereInputSchema).optional(), + some: z.lazy(() => Report_to_clauseWhereInputSchema).optional(), + none: z.lazy(() => Report_to_clauseWhereInputSchema).optional() +}).strict(); + +export const Report_to_clauseOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ClauseCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ClauseMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ClauseMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + label: z.lazy(() => SortOrderSchema).optional(), + value: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const StringNullableFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const DateTimeNullableFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const DateTimeFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeFilterSchema) ]).optional(), +}).strict(); + +export const ReportCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + project_description: z.lazy(() => SortOrderSchema).optional(), + redacted_by: z.lazy(() => SortOrderSchema).optional(), + meet_date: z.lazy(() => SortOrderSchema).optional(), + applicant_name: z.lazy(() => SortOrderSchema).optional(), + applicant_address: z.lazy(() => SortOrderSchema).optional(), + project_cadastral_ref: z.lazy(() => SortOrderSchema).optional(), + project_space_type: z.lazy(() => SortOrderSchema).optional(), + decision: z.lazy(() => SortOrderSchema).optional(), + precisions: z.lazy(() => SortOrderSchema).optional(), + contacts: z.lazy(() => SortOrderSchema).optional(), + further_information: z.lazy(() => SortOrderSchema).optional(), + created_by_id: z.lazy(() => SortOrderSchema).optional(), + created_by_username: z.lazy(() => SortOrderSchema).optional(), + created_at: z.lazy(() => SortOrderSchema).optional(), + service_instructeur: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ReportMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + project_description: z.lazy(() => SortOrderSchema).optional(), + redacted_by: z.lazy(() => SortOrderSchema).optional(), + meet_date: z.lazy(() => SortOrderSchema).optional(), + applicant_name: z.lazy(() => SortOrderSchema).optional(), + applicant_address: z.lazy(() => SortOrderSchema).optional(), + project_cadastral_ref: z.lazy(() => SortOrderSchema).optional(), + project_space_type: z.lazy(() => SortOrderSchema).optional(), + decision: z.lazy(() => SortOrderSchema).optional(), + precisions: z.lazy(() => SortOrderSchema).optional(), + contacts: z.lazy(() => SortOrderSchema).optional(), + further_information: z.lazy(() => SortOrderSchema).optional(), + created_by_id: z.lazy(() => SortOrderSchema).optional(), + created_by_username: z.lazy(() => SortOrderSchema).optional(), + created_at: z.lazy(() => SortOrderSchema).optional(), + service_instructeur: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ReportMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + title: z.lazy(() => SortOrderSchema).optional(), + project_description: z.lazy(() => SortOrderSchema).optional(), + redacted_by: z.lazy(() => SortOrderSchema).optional(), + meet_date: z.lazy(() => SortOrderSchema).optional(), + applicant_name: z.lazy(() => SortOrderSchema).optional(), + applicant_address: z.lazy(() => SortOrderSchema).optional(), + project_cadastral_ref: z.lazy(() => SortOrderSchema).optional(), + project_space_type: z.lazy(() => SortOrderSchema).optional(), + decision: z.lazy(() => SortOrderSchema).optional(), + precisions: z.lazy(() => SortOrderSchema).optional(), + contacts: z.lazy(() => SortOrderSchema).optional(), + further_information: z.lazy(() => SortOrderSchema).optional(), + created_by_id: z.lazy(() => SortOrderSchema).optional(), + created_by_username: z.lazy(() => SortOrderSchema).optional(), + created_at: z.lazy(() => SortOrderSchema).optional(), + service_instructeur: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const StringNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedStringNullableFilterSchema).optional(), + _max: z.lazy(() => NestedStringNullableFilterSchema).optional() +}).strict(); + +export const DateTimeNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeNullableFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeNullableFilterSchema).optional() +}).strict(); + +export const DateTimeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeFilterSchema).optional() +}).strict(); + +export const ChipRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => ChipWhereInputSchema).optional(), + isNot: z.lazy(() => ChipWhereInputSchema).optional() +}).strict(); + +export const ReportRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => ReportWhereInputSchema).optional(), + isNot: z.lazy(() => ReportWhereInputSchema).optional() +}).strict(); + +export const Report_to_chipCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + chip_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const Report_to_chipMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + chip_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const Report_to_chipMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + chip_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const ClauseRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => ClauseWhereInputSchema).optional(), + isNot: z.lazy(() => ClauseWhereInputSchema).optional() +}).strict(); + +export const Report_to_clauseCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + clause_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const Report_to_clauseMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + clause_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const Report_to_clauseMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + report_id: z.lazy(() => SortOrderSchema).optional(), + clause_id: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const Report_to_chipCreateNestedManyWithoutChipInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateWithoutChipInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyChipInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedCreateNestedManyWithoutChipInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateWithoutChipInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyChipInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const StringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.string().optional() +}).strict(); + +export const Report_to_chipUpdateManyWithoutChipNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateWithoutChipInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutChipInputSchema),z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutChipInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyChipInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutChipInputSchema),z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutChipInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutChipInputSchema),z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutChipInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedUpdateManyWithoutChipNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateWithoutChipInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutChipInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutChipInputSchema),z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutChipInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyChipInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutChipInputSchema),z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutChipInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutChipInputSchema),z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutChipInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseCreateNestedManyWithoutClauseInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedCreateNestedManyWithoutClauseInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUpdateManyWithoutClauseNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedUpdateManyWithoutClauseNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_chipCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyReportInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyReportInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const NullableStringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.string().optional().nullable() +}).strict(); + +export const NullableDateTimeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.coerce.date().optional().nullable() +}).strict(); + +export const DateTimeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.coerce.date().optional() +}).strict(); + +export const Report_to_chipUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyReportInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_chipCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_chipUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_chipCreateManyReportInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_chipWhereUniqueInputSchema),z.lazy(() => Report_to_chipWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_chipUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Report_to_chipUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const ChipCreateNestedOneWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ChipCreateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedCreateWithoutReport_to_chipInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ChipCreateOrConnectWithoutReport_to_chipInputSchema).optional(), + connect: z.lazy(() => ChipWhereUniqueInputSchema).optional() +}).strict(); + +export const ReportCreateNestedOneWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_chipInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutReport_to_chipInputSchema).optional(), + connect: z.lazy(() => ReportWhereUniqueInputSchema).optional() +}).strict(); + +export const ChipUpdateOneRequiredWithoutReport_to_chipNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ChipCreateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedCreateWithoutReport_to_chipInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ChipCreateOrConnectWithoutReport_to_chipInputSchema).optional(), + upsert: z.lazy(() => ChipUpsertWithoutReport_to_chipInputSchema).optional(), + connect: z.lazy(() => ChipWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => ChipUpdateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedUpdateWithoutReport_to_chipInputSchema) ]).optional(), +}).strict(); + +export const ReportUpdateOneRequiredWithoutReport_to_chipNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_chipInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutReport_to_chipInputSchema).optional(), + upsert: z.lazy(() => ReportUpsertWithoutReport_to_chipInputSchema).optional(), + connect: z.lazy(() => ReportWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => ReportUpdateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutReport_to_chipInputSchema) ]).optional(), +}).strict(); + +export const ClauseCreateNestedOneWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ClauseCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), + connect: z.lazy(() => ClauseWhereUniqueInputSchema).optional() +}).strict(); + +export const ReportCreateNestedOneWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), + connect: z.lazy(() => ReportWhereUniqueInputSchema).optional() +}).strict(); + +export const ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ClauseCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), + upsert: z.lazy(() => ClauseUpsertWithoutReport_to_clauseInputSchema).optional(), + connect: z.lazy(() => ClauseWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => ClauseUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedUpdateWithoutReport_to_clauseInputSchema) ]).optional(), +}).strict(); + +export const ReportUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), + upsert: z.lazy(() => ReportUpsertWithoutReport_to_clauseInputSchema).optional(), + connect: z.lazy(() => ReportWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => ReportUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutReport_to_clauseInputSchema) ]).optional(), +}).strict(); + +export const NestedStringFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringFilterSchema) ]).optional(), +}).strict(); + +export const NestedStringWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedStringFilterSchema).optional(), + _max: z.lazy(() => NestedStringFilterSchema).optional() +}).strict(); + +export const NestedIntFilterSchema: z.ZodType = z.object({ + equals: z.number().optional(), + in: z.number().array().optional(), + notIn: z.number().array().optional(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z.union([ z.number(),z.lazy(() => NestedIntFilterSchema) ]).optional(), +}).strict(); + +export const NestedStringNullableFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const NestedDateTimeNullableFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const NestedDateTimeFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeFilterSchema) ]).optional(), +}).strict(); + +export const NestedStringNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedStringNullableFilterSchema).optional(), + _max: z.lazy(() => NestedStringNullableFilterSchema).optional() +}).strict(); + +export const NestedIntNullableFilterSchema: z.ZodType = z.object({ + equals: z.number().optional().nullable(), + in: z.number().array().optional().nullable(), + notIn: z.number().array().optional().nullable(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z.union([ z.number(),z.lazy(() => NestedIntNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const NestedDateTimeNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeNullableFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeNullableFilterSchema).optional() +}).strict(); + +export const NestedDateTimeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeFilterSchema).optional() +}).strict(); + +export const Report_to_chipCreateWithoutChipInputSchema: z.ZodType = z.object({ + id: z.string(), + report: z.lazy(() => ReportCreateNestedOneWithoutReport_to_chipInputSchema) +}).strict(); + +export const Report_to_chipUncheckedCreateWithoutChipInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string() +}).strict(); + +export const Report_to_chipCreateOrConnectWithoutChipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema) ]), +}).strict(); + +export const Report_to_chipCreateManyChipInputEnvelopeSchema: z.ZodType = z.object({ + data: z.lazy(() => Report_to_chipCreateManyChipInputSchema).array(), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const Report_to_chipUpsertWithWhereUniqueWithoutChipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateWithoutChipInputSchema) ]), + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutChipInputSchema) ]), +}).strict(); + +export const Report_to_chipUpdateWithWhereUniqueWithoutChipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + data: z.union([ z.lazy(() => Report_to_chipUpdateWithoutChipInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateWithoutChipInputSchema) ]), +}).strict(); + +export const Report_to_chipUpdateManyWithWhereWithoutChipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipScalarWhereInputSchema), + data: z.union([ z.lazy(() => Report_to_chipUpdateManyMutationInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateManyWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const Report_to_chipScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_chipScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_chipScalarWhereInputSchema),z.lazy(() => Report_to_chipScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + chip_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), +}).strict(); + +export const Report_to_clauseCreateWithoutClauseInputSchema: z.ZodType = z.object({ + id: z.string(), + report: z.lazy(() => ReportCreateNestedOneWithoutReport_to_clauseInputSchema) +}).strict(); + +export const Report_to_clauseUncheckedCreateWithoutClauseInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string() +}).strict(); + +export const Report_to_clauseCreateOrConnectWithoutClauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema) ]), +}).strict(); + +export const Report_to_clauseCreateManyClauseInputEnvelopeSchema: z.ZodType = z.object({ + data: z.lazy(() => Report_to_clauseCreateManyClauseInputSchema).array(), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutClauseInputSchema) ]), + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema) ]), +}).strict(); + +export const Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + data: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutClauseInputSchema) ]), +}).strict(); + +export const Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseScalarWhereInputSchema), + data: z.union([ z.lazy(() => Report_to_clauseUpdateManyMutationInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const Report_to_clauseScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => Report_to_clauseScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + report_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + clause_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), +}).strict(); + +export const Report_to_chipCreateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.string(), + chip: z.lazy(() => ChipCreateNestedOneWithoutReport_to_chipInputSchema) +}).strict(); + +export const Report_to_chipUncheckedCreateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.string(), + chip_id: z.string() +}).strict(); + +export const Report_to_chipCreateOrConnectWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_chipCreateManyReportInputEnvelopeSchema: z.ZodType = z.object({ + data: z.lazy(() => Report_to_chipCreateManyReportInputSchema).array(), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const Report_to_clauseCreateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.string(), + clause: z.lazy(() => ClauseCreateNestedOneWithoutReport_to_clauseInputSchema) +}).strict(); + +export const Report_to_clauseUncheckedCreateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.string(), + clause_id: z.string() +}).strict(); + +export const Report_to_clauseCreateOrConnectWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_clauseCreateManyReportInputEnvelopeSchema: z.ZodType = z.object({ + data: z.lazy(() => Report_to_clauseCreateManyReportInputSchema).array(), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const Report_to_chipUpsertWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + update: z.union([ z.lazy(() => Report_to_chipUpdateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateWithoutReportInputSchema) ]), + create: z.union([ z.lazy(() => Report_to_chipCreateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedCreateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_chipUpdateWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipWhereUniqueInputSchema), + data: z.union([ z.lazy(() => Report_to_chipUpdateWithoutReportInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_chipUpdateManyWithWhereWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_chipScalarWhereInputSchema), + data: z.union([ z.lazy(() => Report_to_chipUpdateManyMutationInputSchema),z.lazy(() => Report_to_chipUncheckedUpdateManyWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + update: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutReportInputSchema) ]), + create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), + data: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutReportInputSchema) ]), +}).strict(); + +export const Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema: z.ZodType = z.object({ + where: z.lazy(() => Report_to_clauseScalarWhereInputSchema), + data: z.union([ z.lazy(() => Report_to_clauseUpdateManyMutationInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const ChipCreateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ChipUncheckedCreateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ChipCreateOrConnectWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => ChipWhereUniqueInputSchema), + create: z.union([ z.lazy(() => ChipCreateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedCreateWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const ReportCreateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_clause: z.lazy(() => Report_to_clauseCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportUncheckedCreateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportCreateOrConnectWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + where: z.lazy(() => ReportWhereUniqueInputSchema), + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const ChipUpsertWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => ChipUpdateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedUpdateWithoutReport_to_chipInputSchema) ]), + create: z.union([ z.lazy(() => ChipCreateWithoutReport_to_chipInputSchema),z.lazy(() => ChipUncheckedCreateWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const ChipUpdateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ChipUncheckedUpdateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ReportUpsertWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => ReportUpdateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutReport_to_chipInputSchema) ]), + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_chipInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_chipInputSchema) ]), +}).strict(); + +export const ReportUpdateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_clause: z.lazy(() => Report_to_clauseUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const ReportUncheckedUpdateWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_clause: z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const ClauseCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ClauseUncheckedCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.string(), + label: z.string(), + value: z.string() +}).strict(); + +export const ClauseCreateOrConnectWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => ClauseWhereUniqueInputSchema), + create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const ReportCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportUncheckedCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.string(), + title: z.string().optional().nullable(), + project_description: z.string().optional().nullable(), + redacted_by: z.string().optional().nullable(), + meet_date: z.coerce.date().optional().nullable(), + applicant_name: z.string().optional().nullable(), + applicant_address: z.string().optional().nullable(), + project_cadastral_ref: z.string().optional().nullable(), + project_space_type: z.string().optional().nullable(), + decision: z.string().optional().nullable(), + precisions: z.string().optional().nullable(), + contacts: z.string().optional().nullable(), + further_information: z.string().optional().nullable(), + created_by_id: z.string(), + created_by_username: z.string(), + created_at: z.coerce.date(), + service_instructeur: z.string().optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedCreateNestedManyWithoutReportInputSchema).optional() +}).strict(); + +export const ReportCreateOrConnectWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + where: z.lazy(() => ReportWhereUniqueInputSchema), + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const ClauseUpsertWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => ClauseUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedUpdateWithoutReport_to_clauseInputSchema) ]), + create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const ClauseUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ClauseUncheckedUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const ReportUpsertWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => ReportUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutReport_to_clauseInputSchema) ]), + create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]), +}).strict(); + +export const ReportUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const ReportUncheckedUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + redacted_by: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + meet_date: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + applicant_address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_cadastral_ref: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + project_space_type: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + decision: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + precisions: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + contacts: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + further_information: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + created_by_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_by_username: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + created_at: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + service_instructeur: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + report_to_chip: z.lazy(() => Report_to_chipUncheckedUpdateManyWithoutReportNestedInputSchema).optional() +}).strict(); + +export const Report_to_chipCreateManyChipInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string() +}).strict(); + +export const Report_to_chipUpdateWithoutChipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report: z.lazy(() => ReportUpdateOneRequiredWithoutReport_to_chipNestedInputSchema).optional() +}).strict(); + +export const Report_to_chipUncheckedUpdateWithoutChipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_chipUncheckedUpdateManyWithoutReport_to_chipInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseCreateManyClauseInputSchema: z.ZodType = z.object({ + id: z.string(), + report_id: z.string() +}).strict(); + +export const Report_to_clauseUpdateWithoutClauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report: z.lazy(() => ReportUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional() +}).strict(); + +export const Report_to_clauseUncheckedUpdateWithoutClauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + report_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_chipCreateManyReportInputSchema: z.ZodType = z.object({ + id: z.string(), + chip_id: z.string() +}).strict(); + +export const Report_to_clauseCreateManyReportInputSchema: z.ZodType = z.object({ + id: z.string(), + clause_id: z.string() +}).strict(); + +export const Report_to_chipUpdateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + chip: z.lazy(() => ChipUpdateOneRequiredWithoutReport_to_chipNestedInputSchema).optional() +}).strict(); + +export const Report_to_chipUncheckedUpdateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + chip_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const Report_to_clauseUpdateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + clause: z.lazy(() => ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional() +}).strict(); + +export const Report_to_clauseUncheckedUpdateWithoutReportInputSchema: z.ZodType = z.object({ + id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + clause_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +///////////////////////////////////////// +// ARGS +///////////////////////////////////////// + +export const ChipFindFirstArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereInputSchema.optional(), + orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), + cursor: ChipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ChipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ChipFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereInputSchema.optional(), + orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), + cursor: ChipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ChipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ChipFindManyArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereInputSchema.optional(), + orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), + cursor: ChipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ChipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ChipAggregateArgsSchema: z.ZodType = z.object({ + where: ChipWhereInputSchema.optional(), + orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), + cursor: ChipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ChipGroupByArgsSchema: z.ZodType = z.object({ + where: ChipWhereInputSchema.optional(), + orderBy: z.union([ ChipOrderByWithAggregationInputSchema.array(),ChipOrderByWithAggregationInputSchema ]).optional(), + by: ChipScalarFieldEnumSchema.array(), + having: ChipScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ChipFindUniqueArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ChipFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ClauseFindFirstArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereInputSchema.optional(), + orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), + cursor: ClauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ClauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ClauseFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereInputSchema.optional(), + orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), + cursor: ClauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ClauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ClauseFindManyArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereInputSchema.optional(), + orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), + cursor: ClauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ClauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ClauseAggregateArgsSchema: z.ZodType = z.object({ + where: ClauseWhereInputSchema.optional(), + orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), + cursor: ClauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ClauseGroupByArgsSchema: z.ZodType = z.object({ + where: ClauseWhereInputSchema.optional(), + orderBy: z.union([ ClauseOrderByWithAggregationInputSchema.array(),ClauseOrderByWithAggregationInputSchema ]).optional(), + by: ClauseScalarFieldEnumSchema.array(), + having: ClauseScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ClauseFindUniqueArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ClauseFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ReportFindFirstArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereInputSchema.optional(), + orderBy: z.union([ ReportOrderByWithRelationInputSchema.array(),ReportOrderByWithRelationInputSchema ]).optional(), + cursor: ReportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ReportScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ReportFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereInputSchema.optional(), + orderBy: z.union([ ReportOrderByWithRelationInputSchema.array(),ReportOrderByWithRelationInputSchema ]).optional(), + cursor: ReportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ReportScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ReportFindManyArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereInputSchema.optional(), + orderBy: z.union([ ReportOrderByWithRelationInputSchema.array(),ReportOrderByWithRelationInputSchema ]).optional(), + cursor: ReportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: ReportScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const ReportAggregateArgsSchema: z.ZodType = z.object({ + where: ReportWhereInputSchema.optional(), + orderBy: z.union([ ReportOrderByWithRelationInputSchema.array(),ReportOrderByWithRelationInputSchema ]).optional(), + cursor: ReportWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ReportGroupByArgsSchema: z.ZodType = z.object({ + where: ReportWhereInputSchema.optional(), + orderBy: z.union([ ReportOrderByWithAggregationInputSchema.array(),ReportOrderByWithAggregationInputSchema ]).optional(), + by: ReportScalarFieldEnumSchema.array(), + having: ReportScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const ReportFindUniqueArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ReportFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_chipFindFirstArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereInputSchema.optional(), + orderBy: z.union([ Report_to_chipOrderByWithRelationInputSchema.array(),Report_to_chipOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_chipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_chipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_chipFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereInputSchema.optional(), + orderBy: z.union([ Report_to_chipOrderByWithRelationInputSchema.array(),Report_to_chipOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_chipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_chipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_chipFindManyArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereInputSchema.optional(), + orderBy: z.union([ Report_to_chipOrderByWithRelationInputSchema.array(),Report_to_chipOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_chipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_chipScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_chipAggregateArgsSchema: z.ZodType = z.object({ + where: Report_to_chipWhereInputSchema.optional(), + orderBy: z.union([ Report_to_chipOrderByWithRelationInputSchema.array(),Report_to_chipOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_chipWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const Report_to_chipGroupByArgsSchema: z.ZodType = z.object({ + where: Report_to_chipWhereInputSchema.optional(), + orderBy: z.union([ Report_to_chipOrderByWithAggregationInputSchema.array(),Report_to_chipOrderByWithAggregationInputSchema ]).optional(), + by: Report_to_chipScalarFieldEnumSchema.array(), + having: Report_to_chipScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const Report_to_chipFindUniqueArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_chipFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_clauseFindFirstArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereInputSchema.optional(), + orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_clauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_clauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereInputSchema.optional(), + orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_clauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_clauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseFindManyArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereInputSchema.optional(), + orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_clauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: Report_to_clauseScalarFieldEnumSchema.array().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseAggregateArgsSchema: z.ZodType = z.object({ + where: Report_to_clauseWhereInputSchema.optional(), + orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), + cursor: Report_to_clauseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseGroupByArgsSchema: z.ZodType = z.object({ + where: Report_to_clauseWhereInputSchema.optional(), + orderBy: z.union([ Report_to_clauseOrderByWithAggregationInputSchema.array(),Report_to_clauseOrderByWithAggregationInputSchema ]).optional(), + by: Report_to_clauseScalarFieldEnumSchema.array(), + having: Report_to_clauseScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseFindUniqueArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_clauseFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ChipCreateArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + data: z.union([ ChipCreateInputSchema,ChipUncheckedCreateInputSchema ]), +}).strict() as z.ZodType + +export const ChipUpsertArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereUniqueInputSchema, + create: z.union([ ChipCreateInputSchema,ChipUncheckedCreateInputSchema ]), + update: z.union([ ChipUpdateInputSchema,ChipUncheckedUpdateInputSchema ]), +}).strict() as z.ZodType + +export const ChipCreateManyArgsSchema: z.ZodType = z.object({ + data: ChipCreateManyInputSchema.array(), + skipDuplicates: z.boolean().optional(), +}).strict() as z.ZodType + +export const ChipDeleteArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + where: ChipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ChipUpdateArgsSchema: z.ZodType = z.object({ + select: ChipSelectSchema.optional(), + include: ChipIncludeSchema.optional(), + data: z.union([ ChipUpdateInputSchema,ChipUncheckedUpdateInputSchema ]), + where: ChipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ChipUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ ChipUpdateManyMutationInputSchema,ChipUncheckedUpdateManyInputSchema ]), + where: ChipWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const ChipDeleteManyArgsSchema: z.ZodType = z.object({ + where: ChipWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const ClauseCreateArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + data: z.union([ ClauseCreateInputSchema,ClauseUncheckedCreateInputSchema ]), +}).strict() as z.ZodType + +export const ClauseUpsertArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereUniqueInputSchema, + create: z.union([ ClauseCreateInputSchema,ClauseUncheckedCreateInputSchema ]), + update: z.union([ ClauseUpdateInputSchema,ClauseUncheckedUpdateInputSchema ]), +}).strict() as z.ZodType + +export const ClauseCreateManyArgsSchema: z.ZodType = z.object({ + data: ClauseCreateManyInputSchema.array(), + skipDuplicates: z.boolean().optional(), +}).strict() as z.ZodType + +export const ClauseDeleteArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + where: ClauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ClauseUpdateArgsSchema: z.ZodType = z.object({ + select: ClauseSelectSchema.optional(), + include: ClauseIncludeSchema.optional(), + data: z.union([ ClauseUpdateInputSchema,ClauseUncheckedUpdateInputSchema ]), + where: ClauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ClauseUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ ClauseUpdateManyMutationInputSchema,ClauseUncheckedUpdateManyInputSchema ]), + where: ClauseWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const ClauseDeleteManyArgsSchema: z.ZodType = z.object({ + where: ClauseWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const ReportCreateArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + data: z.union([ ReportCreateInputSchema,ReportUncheckedCreateInputSchema ]), +}).strict() as z.ZodType + +export const ReportUpsertArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereUniqueInputSchema, + create: z.union([ ReportCreateInputSchema,ReportUncheckedCreateInputSchema ]), + update: z.union([ ReportUpdateInputSchema,ReportUncheckedUpdateInputSchema ]), +}).strict() as z.ZodType + +export const ReportCreateManyArgsSchema: z.ZodType = z.object({ + data: ReportCreateManyInputSchema.array(), + skipDuplicates: z.boolean().optional(), +}).strict() as z.ZodType + +export const ReportDeleteArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + where: ReportWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ReportUpdateArgsSchema: z.ZodType = z.object({ + select: ReportSelectSchema.optional(), + include: ReportIncludeSchema.optional(), + data: z.union([ ReportUpdateInputSchema,ReportUncheckedUpdateInputSchema ]), + where: ReportWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const ReportUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ ReportUpdateManyMutationInputSchema,ReportUncheckedUpdateManyInputSchema ]), + where: ReportWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const ReportDeleteManyArgsSchema: z.ZodType = z.object({ + where: ReportWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const Report_to_chipCreateArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + data: z.union([ Report_to_chipCreateInputSchema,Report_to_chipUncheckedCreateInputSchema ]), +}).strict() as z.ZodType + +export const Report_to_chipUpsertArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereUniqueInputSchema, + create: z.union([ Report_to_chipCreateInputSchema,Report_to_chipUncheckedCreateInputSchema ]), + update: z.union([ Report_to_chipUpdateInputSchema,Report_to_chipUncheckedUpdateInputSchema ]), +}).strict() as z.ZodType + +export const Report_to_chipCreateManyArgsSchema: z.ZodType = z.object({ + data: Report_to_chipCreateManyInputSchema.array(), + skipDuplicates: z.boolean().optional(), +}).strict() as z.ZodType + +export const Report_to_chipDeleteArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + where: Report_to_chipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_chipUpdateArgsSchema: z.ZodType = z.object({ + select: Report_to_chipSelectSchema.optional(), + include: Report_to_chipIncludeSchema.optional(), + data: z.union([ Report_to_chipUpdateInputSchema,Report_to_chipUncheckedUpdateInputSchema ]), + where: Report_to_chipWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_chipUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ Report_to_chipUpdateManyMutationInputSchema,Report_to_chipUncheckedUpdateManyInputSchema ]), + where: Report_to_chipWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const Report_to_chipDeleteManyArgsSchema: z.ZodType = z.object({ + where: Report_to_chipWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const Report_to_clauseCreateArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + data: z.union([ Report_to_clauseCreateInputSchema,Report_to_clauseUncheckedCreateInputSchema ]), +}).strict() as z.ZodType + +export const Report_to_clauseUpsertArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereUniqueInputSchema, + create: z.union([ Report_to_clauseCreateInputSchema,Report_to_clauseUncheckedCreateInputSchema ]), + update: z.union([ Report_to_clauseUpdateInputSchema,Report_to_clauseUncheckedUpdateInputSchema ]), +}).strict() as z.ZodType + +export const Report_to_clauseCreateManyArgsSchema: z.ZodType = z.object({ + data: Report_to_clauseCreateManyInputSchema.array(), + skipDuplicates: z.boolean().optional(), +}).strict() as z.ZodType + +export const Report_to_clauseDeleteArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + where: Report_to_clauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_clauseUpdateArgsSchema: z.ZodType = z.object({ + select: Report_to_clauseSelectSchema.optional(), + include: Report_to_clauseIncludeSchema.optional(), + data: z.union([ Report_to_clauseUpdateInputSchema,Report_to_clauseUncheckedUpdateInputSchema ]), + where: Report_to_clauseWhereUniqueInputSchema, +}).strict() as z.ZodType + +export const Report_to_clauseUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ Report_to_clauseUpdateManyMutationInputSchema,Report_to_clauseUncheckedUpdateManyInputSchema ]), + where: Report_to_clauseWhereInputSchema.optional(), +}).strict() as z.ZodType + +export const Report_to_clauseDeleteManyArgsSchema: z.ZodType = z.object({ + where: Report_to_clauseWhereInputSchema.optional(), +}).strict() as z.ZodType + +interface ChipGetPayload extends HKT { + readonly _A?: boolean | null | undefined | Prisma.ChipArgs + readonly type: Prisma.ChipGetPayload +} + +interface ClauseGetPayload extends HKT { + readonly _A?: boolean | null | undefined | Prisma.ClauseArgs + readonly type: Prisma.ClauseGetPayload +} + +interface ReportGetPayload extends HKT { + readonly _A?: boolean | null | undefined | Prisma.ReportArgs + readonly type: Prisma.ReportGetPayload +} + +interface Report_to_chipGetPayload extends HKT { + readonly _A?: boolean | null | undefined | Prisma.Report_to_chipArgs + readonly type: Prisma.Report_to_chipGetPayload +} + +interface Report_to_clauseGetPayload extends HKT { + readonly _A?: boolean | null | undefined | Prisma.Report_to_clauseArgs + readonly type: Prisma.Report_to_clauseGetPayload +} + +export const tableSchemas = { + chip: { + fields: new Map([ + [ + "id", + "TEXT" + ], + [ + "label", + "TEXT" + ], + [ + "value", + "TEXT" + ] + ]), + relations: [ + new Relation("report_to_chip", "", "", "report_to_chip", "ChipToReport_to_chip", "many"), + ], + modelSchema: (ChipCreateInputSchema as any) + .partial() + .or((ChipUncheckedCreateInputSchema as any).partial()), + createSchema: ChipCreateArgsSchema, + createManySchema: ChipCreateManyArgsSchema, + findUniqueSchema: ChipFindUniqueArgsSchema, + findSchema: ChipFindFirstArgsSchema, + updateSchema: ChipUpdateArgsSchema, + updateManySchema: ChipUpdateManyArgsSchema, + upsertSchema: ChipUpsertArgsSchema, + deleteSchema: ChipDeleteArgsSchema, + deleteManySchema: ChipDeleteManyArgsSchema + } as TableSchema< + z.infer, + Prisma.ChipCreateArgs['data'], + Prisma.ChipUpdateArgs['data'], + Prisma.ChipFindFirstArgs['select'], + Prisma.ChipFindFirstArgs['where'], + Prisma.ChipFindUniqueArgs['where'], + Omit, + Prisma.ChipFindFirstArgs['orderBy'], + Prisma.ChipScalarFieldEnum, + ChipGetPayload + >, + clause: { + fields: new Map([ + [ + "id", + "TEXT" + ], + [ + "label", + "TEXT" + ], + [ + "value", + "TEXT" + ] + ]), + relations: [ + new Relation("report_to_clause", "", "", "report_to_clause", "ClauseToReport_to_clause", "many"), + ], + modelSchema: (ClauseCreateInputSchema as any) + .partial() + .or((ClauseUncheckedCreateInputSchema as any).partial()), + createSchema: ClauseCreateArgsSchema, + createManySchema: ClauseCreateManyArgsSchema, + findUniqueSchema: ClauseFindUniqueArgsSchema, + findSchema: ClauseFindFirstArgsSchema, + updateSchema: ClauseUpdateArgsSchema, + updateManySchema: ClauseUpdateManyArgsSchema, + upsertSchema: ClauseUpsertArgsSchema, + deleteSchema: ClauseDeleteArgsSchema, + deleteManySchema: ClauseDeleteManyArgsSchema + } as TableSchema< + z.infer, + Prisma.ClauseCreateArgs['data'], + Prisma.ClauseUpdateArgs['data'], + Prisma.ClauseFindFirstArgs['select'], + Prisma.ClauseFindFirstArgs['where'], + Prisma.ClauseFindUniqueArgs['where'], + Omit, + Prisma.ClauseFindFirstArgs['orderBy'], + Prisma.ClauseScalarFieldEnum, + ClauseGetPayload + >, + report: { + fields: new Map([ + [ + "id", + "TEXT" + ], + [ + "title", + "TEXT" + ], + [ + "project_description", + "TEXT" + ], + [ + "redacted_by", + "TEXT" + ], + [ + "meet_date", + "TIMESTAMP" + ], + [ + "applicant_name", + "TEXT" + ], + [ + "applicant_address", + "TEXT" + ], + [ + "project_cadastral_ref", + "TEXT" + ], + [ + "project_space_type", + "TEXT" + ], + [ + "decision", + "TEXT" + ], + [ + "precisions", + "TEXT" + ], + [ + "contacts", + "TEXT" + ], + [ + "further_information", + "TEXT" + ], + [ + "created_by_id", + "TEXT" + ], + [ + "created_by_username", + "TEXT" + ], + [ + "created_at", + "TIMESTAMP" + ], + [ + "service_instructeur", + "TEXT" + ] + ]), + relations: [ + new Relation("report_to_chip", "", "", "report_to_chip", "ReportToReport_to_chip", "many"), + new Relation("report_to_clause", "", "", "report_to_clause", "ReportToReport_to_clause", "many"), + ], + modelSchema: (ReportCreateInputSchema as any) + .partial() + .or((ReportUncheckedCreateInputSchema as any).partial()), + createSchema: ReportCreateArgsSchema, + createManySchema: ReportCreateManyArgsSchema, + findUniqueSchema: ReportFindUniqueArgsSchema, + findSchema: ReportFindFirstArgsSchema, + updateSchema: ReportUpdateArgsSchema, + updateManySchema: ReportUpdateManyArgsSchema, + upsertSchema: ReportUpsertArgsSchema, + deleteSchema: ReportDeleteArgsSchema, + deleteManySchema: ReportDeleteManyArgsSchema + } as TableSchema< + z.infer, + Prisma.ReportCreateArgs['data'], + Prisma.ReportUpdateArgs['data'], + Prisma.ReportFindFirstArgs['select'], + Prisma.ReportFindFirstArgs['where'], + Prisma.ReportFindUniqueArgs['where'], + Omit, + Prisma.ReportFindFirstArgs['orderBy'], + Prisma.ReportScalarFieldEnum, + ReportGetPayload + >, + report_to_chip: { + fields: new Map([ + [ + "id", + "TEXT" + ], + [ + "report_id", + "TEXT" + ], + [ + "chip_id", + "TEXT" + ] + ]), + relations: [ + new Relation("chip", "chip_id", "id", "chip", "ChipToReport_to_chip", "one"), + new Relation("report", "report_id", "id", "report", "ReportToReport_to_chip", "one"), + ], + modelSchema: (Report_to_chipCreateInputSchema as any) + .partial() + .or((Report_to_chipUncheckedCreateInputSchema as any).partial()), + createSchema: Report_to_chipCreateArgsSchema, + createManySchema: Report_to_chipCreateManyArgsSchema, + findUniqueSchema: Report_to_chipFindUniqueArgsSchema, + findSchema: Report_to_chipFindFirstArgsSchema, + updateSchema: Report_to_chipUpdateArgsSchema, + updateManySchema: Report_to_chipUpdateManyArgsSchema, + upsertSchema: Report_to_chipUpsertArgsSchema, + deleteSchema: Report_to_chipDeleteArgsSchema, + deleteManySchema: Report_to_chipDeleteManyArgsSchema + } as TableSchema< + z.infer, + Prisma.Report_to_chipCreateArgs['data'], + Prisma.Report_to_chipUpdateArgs['data'], + Prisma.Report_to_chipFindFirstArgs['select'], + Prisma.Report_to_chipFindFirstArgs['where'], + Prisma.Report_to_chipFindUniqueArgs['where'], + Omit, + Prisma.Report_to_chipFindFirstArgs['orderBy'], + Prisma.Report_to_chipScalarFieldEnum, + Report_to_chipGetPayload + >, + report_to_clause: { + fields: new Map([ + [ + "id", + "TEXT" + ], + [ + "report_id", + "TEXT" + ], + [ + "clause_id", + "TEXT" + ] + ]), + relations: [ + new Relation("clause", "clause_id", "id", "clause", "ClauseToReport_to_clause", "one"), + new Relation("report", "report_id", "id", "report", "ReportToReport_to_clause", "one"), + ], + modelSchema: (Report_to_clauseCreateInputSchema as any) + .partial() + .or((Report_to_clauseUncheckedCreateInputSchema as any).partial()), + createSchema: Report_to_clauseCreateArgsSchema, + createManySchema: Report_to_clauseCreateManyArgsSchema, + findUniqueSchema: Report_to_clauseFindUniqueArgsSchema, + findSchema: Report_to_clauseFindFirstArgsSchema, + updateSchema: Report_to_clauseUpdateArgsSchema, + updateManySchema: Report_to_clauseUpdateManyArgsSchema, + upsertSchema: Report_to_clauseUpsertArgsSchema, + deleteSchema: Report_to_clauseDeleteArgsSchema, + deleteManySchema: Report_to_clauseDeleteManyArgsSchema + } as TableSchema< + z.infer, + Prisma.Report_to_clauseCreateArgs['data'], + Prisma.Report_to_clauseUpdateArgs['data'], + Prisma.Report_to_clauseFindFirstArgs['select'], + Prisma.Report_to_clauseFindFirstArgs['where'], + Prisma.Report_to_clauseFindUniqueArgs['where'], + Omit, + Prisma.Report_to_clauseFindFirstArgs['orderBy'], + Prisma.Report_to_clauseScalarFieldEnum, + Report_to_clauseGetPayload + >, +} + +export const schema = new DbSchema(tableSchemas, migrations) +export type Electric = ElectricClient