diff --git a/Dockerfile b/Dockerfile index 8a6f1ec7..6f49045d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,16 +49,12 @@ FROM with-deps AS backend WORKDIR /usr/src/app COPY packages/backend/ ./packages/backend/ COPY packages/pdf/ ./packages/pdf/ -COPY packages/electric-client/ ./packages/electric-client/ - COPY db/ ./db/ COPY --from=with-deps /usr/src/app/packages/backend/node_modules ./packages/backend/node_modules -COPY --from=with-deps /usr/src/app/packages/electric-client/node_modules ./packages/electric-client/node_modules -RUN pnpm electric-client generate:back RUN pnpm backend build -CMD pnpm electric:up;pnpm backend start +CMD pnpm migration:up;pnpm backend start ################################ @@ -66,7 +62,6 @@ CMD pnpm electric:up;pnpm backend start ################################ FROM with-deps AS frontend COPY packages/frontend/ ./packages/frontend/ -COPY packages/electric-client/ ./packages/electric-client/ COPY packages/pdf/ ./packages/pdf/ COPY --from=with-deps /usr/src/app/packages/frontend/node_modules ./packages/frontend/node_modules COPY --from=with-deps /usr/src/app/packages/frontend/styled-system ./packages/frontend/styled-system diff --git a/db/migrate.ts b/db/migrate.ts new file mode 100644 index 00000000..20fdc71d --- /dev/null +++ b/db/migrate.ts @@ -0,0 +1,19 @@ +import dotenv from "dotenv"; +import dotenvExpand from "dotenv-expand"; +import { execSync } from "child_process"; + +dotenvExpand.expand(dotenv.config()); + +const databaseUrl = process.env.DATABASE_URL; +if (!databaseUrl) { + throw new Error("DATABASE_URL is not set"); +} + +const command = `pnpm pg-migrations apply --database "${databaseUrl}" --ignore-error migration_file_edited --directory ./db/migrations`; + +try { + execSync(command, { stdio: "inherit" }); +} catch (e) { + console.error("Migration failed:", e); + process.exit(1); +} diff --git a/db/migrations/01-add_users.sql b/db/migrations/01-add_users.sql index 5edf44cb..34ccbf16 100644 --- a/db/migrations/01-add_users.sql +++ b/db/migrations/01-add_users.sql @@ -15,7 +15,7 @@ CREATE TABLE "udap"( ,udap_text TEXT ); -ALTER TABLE "udap" ENABLE ELECTRIC; +CREATE PUBLICATION powersync FOR TABLE "udap"; --> statement-breakpoint CREATE TABLE IF NOT EXISTS "user" ( @@ -34,13 +34,12 @@ CREATE TABLE IF NOT EXISTS "internal_user" ( "userId" text NOT NULL REFERENCES "user"(id) ON DELETE CASCADE ); -ALTER TABLE "user" ENABLE ELECTRIC; +ALTER PUBLICATION powersync ADD TABLE "user"; CREATE TABLE IF NOT EXISTS "delegation" ( + "id" text PRIMARY KEY NOT NULL, "createdBy" text NOT NULL REFERENCES "user"(id) ON DELETE CASCADE, - "delegatedTo" text NOT NULL REFERENCES "user"(id) ON DELETE CASCADE, - PRIMARY KEY("createdBy", "delegatedTo") + "delegatedTo" text NOT NULL REFERENCES "user"(id) ON DELETE CASCADE ); - -ALTER TABLE "delegation" ENABLE ELECTRIC; \ No newline at end of file +ALTER PUBLICATION powersync ADD TABLE "delegation"; \ No newline at end of file diff --git a/db/migrations/02-create_items_table.sql b/db/migrations/02-create_items_table.sql index 762a4495..dd05a707 100644 --- a/db/migrations/02-create_items_table.sql +++ b/db/migrations/02-create_items_table.sql @@ -20,6 +20,5 @@ CREATE TABLE IF NOT EXISTS "report" ( "udap_id" TEXT ); +ALTER PUBLICATION powersync ADD TABLE "report"; -ALTER TABLE - "report" ENABLE ELECTRIC; diff --git a/db/migrations/03-insert_udaps.sql b/db/migrations/03-insert_udaps.sql deleted file mode 100644 index 027b7d63..00000000 --- a/db/migrations/03-insert_udaps.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT 1; \ No newline at end of file diff --git a/db/migrations/04-add_chips_table.sql b/db/migrations/04-add_chips_table.sql deleted file mode 100644 index 02846c34..00000000 --- a/db/migrations/04-add_chips_table.sql +++ /dev/null @@ -1,10 +0,0 @@ - -CREATE TABLE clause( - key text NOT NULL - ,value text NOT NULL - ,udap_id text - ,text text NOT NULL - , PRIMARY KEY (key, value, udap_id) -); - -ALTER TABLE clause ENABLE ELECTRIC; \ No newline at end of file diff --git a/db/migrations/06-insert_drac.sql b/db/migrations/06-insert_drac.sql deleted file mode 100644 index 027b7d63..00000000 --- a/db/migrations/06-insert_drac.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT 1; \ No newline at end of file diff --git a/db/migrations/07-add_service_instructeurs.sql b/db/migrations/07-add_service_instructeurs.sql index 9f3fb20e..9af5c71e 100644 --- a/db/migrations/07-add_service_instructeurs.sql +++ b/db/migrations/07-add_service_instructeurs.sql @@ -1,5 +1,5 @@ CREATE TABLE IF NOT EXISTS service_instructeurs ( - id INTEGER NOT NULL PRIMARY KEY, + id TEXT NOT NULL PRIMARY KEY, full_name TEXT NOT NULL, short_name TEXT NOT NULL, email TEXT, @@ -7,5 +7,5 @@ CREATE TABLE IF NOT EXISTS service_instructeurs ( udap_id TEXT ); +ALTER PUBLICATION powersync ADD TABLE "service_instructeurs"; -ALTER TABLE service_instructeurs ENABLE ELECTRIC; diff --git a/db/migrations/902-rework_clauses.sql b/db/migrations/902-rework_clauses.sql index 85611459..fba4d054 100644 --- a/db/migrations/902-rework_clauses.sql +++ b/db/migrations/902-rework_clauses.sql @@ -8,4 +8,4 @@ CREATE TABLE clause_v2 ( ,text text NOT NULL ); -ALTER TABLE clause_v2 ENABLE ELECTRIC; \ No newline at end of file +ALTER PUBLICATION powersync ADD TABLE "clause_v2"; diff --git a/db/migrations/903-fix_clausev1.sql b/db/migrations/903-fix_clausev1.sql deleted file mode 100644 index 497e12de..00000000 --- a/db/migrations/903-fix_clausev1.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE clause ADD COLUMN "hidden" BOOLEAN; \ No newline at end of file diff --git a/db/migrations/904-add_pdf_snapshot.sql b/db/migrations/904-add_pdf_snapshot.sql index 6022998d..86969b70 100644 --- a/db/migrations/904-add_pdf_snapshot.sql +++ b/db/migrations/904-add_pdf_snapshot.sql @@ -6,4 +6,4 @@ CREATE TABLE pdf_snapshot ( user_id TEXT ); -ALTER TABLE pdf_snapshot ENABLE ELECTRIC; \ No newline at end of file +ALTER PUBLICATION powersync ADD TABLE "pdf_snapshot"; diff --git a/db/migrations/907-add_pictures.sql b/db/migrations/907-add_pictures.sql index c8910726..96d38460 100644 --- a/db/migrations/907-add_pictures.sql +++ b/db/migrations/907-add_pictures.sql @@ -5,4 +5,4 @@ CREATE TABLE pictures ( "createdAt" TIMESTAMP ); -ALTER TABLE pictures ENABLE ELECTRIC; \ No newline at end of file +ALTER PUBLICATION powersync ADD TABLE "pictures"; diff --git a/db/migrations/908-add_tmp_pictures.sql b/db/migrations/908-add_tmp_pictures.sql index 05445216..d2c1fde4 100644 --- a/db/migrations/908-add_tmp_pictures.sql +++ b/db/migrations/908-add_tmp_pictures.sql @@ -4,4 +4,4 @@ CREATE TABLE tmp_pictures ( "createdAt" TIMESTAMP ); -ALTER TABLE tmp_pictures ENABLE ELECTRIC; \ No newline at end of file +ALTER PUBLICATION powersync ADD TABLE "tmp_pictures"; diff --git a/db/migrations/909-add_picture_lines.sql b/db/migrations/909-add_picture_lines.sql index 20bef453..34855cc5 100644 --- a/db/migrations/909-add_picture_lines.sql +++ b/db/migrations/909-add_picture_lines.sql @@ -5,4 +5,4 @@ CREATE TABLE picture_lines ( "createdAt" TIMESTAMP ); -ALTER TABLE picture_lines ENABLE ELECTRIC; \ No newline at end of file +ALTER PUBLICATION powersync ADD TABLE "picture_lines"; diff --git a/db/migrations/911-add_transactions.sql b/db/migrations/911-add_transactions.sql new file mode 100644 index 00000000..e22faf6d --- /dev/null +++ b/db/migrations/911-add_transactions.sql @@ -0,0 +1,14 @@ +CREATE TABLE IF NOT EXISTS transactions ( + id TEXT PRIMARY KEY, + op_id INTEGER NOT NULL, + tx_id INTEGER, + entity_id TEXT NOT NULL, + type TEXT NOT NULL, + op TEXT NOT NULL, + data TEXT, + user_id TEXT NOT NULL, + created_at TIMESTAMP, + error TEXT +); + +ALTER PUBLICATION powersync ADD TABLE "transactions"; diff --git a/docker-compose.yaml b/docker-compose.yaml index 545ca848..36573259 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,6 +3,7 @@ version: "3.1" volumes: pg_data: minio_data: + mongo_storage: services: pg: @@ -13,6 +14,8 @@ services: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PORT: ${POSTGRES_PORT} command: + - -c + - listen_addresses=* - -c - wal_level=logical ports: @@ -21,25 +24,68 @@ services: volumes: - pg_data:/var/lib/postgresql/data - ./db/init/:/docker-entrypoint-initdb.d + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"] + interval: 5s + timeout: 5s + retries: 5 - electric: - image: electricsql/electric:0.12.0 + mongo: + image: mongo:7.0 + command: --replSet rs0 --bind_ip_all --quiet + restart: unless-stopped + ports: + - 27017:27017 + volumes: + - mongo_storage:/data/db + # Initializes the MongoDB replica set. This service will not usually be actively running + mongo-rs-init: + image: mongo:7.0 depends_on: - - pg + - mongo + restart: on-failure + entrypoint: + - bash + - -c + - 'mongosh --host mongo:27017 --eval ''try{rs.status().ok && quit(0)} catch {} rs.initiate({_id: "rs0", version: + 1, members: [{ _id: 0, host : "mongo:27017" }]})''' + + # electric: + # image: electricsql/electric:0.12.0 + # depends_on: + # - pg + # environment: + # DATABASE_REQUIRE_SSL: false + # DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@pg:${POSTGRES_PORT}/${POSTGRES_DB} + # AUTH_JWT_KEY: ${JWT_SECRET} + # PG_PROXY_PASSWORD: ${PG_PROXY_PASSWORD} + # PG_PROXY_PORT: ${PG_PROXY_PORT} + # AUTH_MODE: secure + # LOGICAL_PUBLISHER_HOST: electric + # AUTH_JWT_ALG: HS256 + # ELECTRIC_PG_PROXY_PORT: 65432 + # ports: + # - ${ELECTRIC_PORT}:5133 + # - ${PG_PROXY_PORT}:65432 + # restart: always + + powersync: + restart: unless-stopped + depends_on: + mongo-rs-init: + condition: service_completed_successfully + pg: + condition: service_healthy + image: journeyapps/powersync-service:latest + command: ["start", "-r", "unified"] + volumes: + - ./powersync-config.yaml:/config/config.yaml environment: - DATABASE_REQUIRE_SSL: false - DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@pg:${POSTGRES_PORT}/${POSTGRES_DB} - AUTH_JWT_KEY: ${JWT_SECRET} - PG_PROXY_PASSWORD: ${PG_PROXY_PASSWORD} - PG_PROXY_PORT: ${PG_PROXY_PORT} - AUTH_MODE: secure - LOGICAL_PUBLISHER_HOST: electric - AUTH_JWT_ALG: HS256 - ELECTRIC_PG_PROXY_PORT: 65432 + POWERSYNC_CONFIG_PATH: /config/config.yaml + PS_DATABASE_URL: ${PS_DATABASE_URL} + PS_JWT_SECRET: ${JWT_SECRET} ports: - - ${ELECTRIC_PORT}:5133 - - ${PG_PROXY_PORT}:65432 - restart: always + - ${POWERSYNC_PORT:-3003}:8080 adminer: image: adminer diff --git a/package.json b/package.json index 34648821..eb2efaf2 100644 --- a/package.json +++ b/package.json @@ -6,17 +6,11 @@ "scripts": { "frontend": "pnpm --filter @cr-vif/frontend", "backend": "pnpm --filter @cr-vif/backend", - "electric-client": "pnpm --filter @cr-vif/electric-client", "pdf": "pnpm --filter @cr-vif/pdf", - "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}} --ignore-error migration_file_edited --directory ./db/migrations\"", - "show-config": "pnpm electric-sql show-config", - "electric:migrate": "pnpm electric:up && pnpm electric-client generate:front && pnpm electric-client generate:back", + "migration:up": "vite-node ./db/migrate.ts", "client:json": "pnpm backend dev --create-only", "client:ts": "typed-openapi ./packages/backend/openapi.json --output ./packages/frontend/src/api.gen.ts", "client:generate": "pnpm client:json && pnpm client:ts", - "salut": "docker ps", "e2e": "playwright test" }, "keywords": [], @@ -27,10 +21,13 @@ "@pandabox/prettier-plugin": "^0.1.0", "@playwright/test": "^1.43.0", "@types/node": "^20.11.28", - "electric-sql": "^0.12.1", + "cross-env": "^7.0.3", + "dotenv": "^16.4.5", + "dotenv-expand": "^11.0.6", "prettier": "^3.2.5", "prisma": "^4.8.1", - "typed-openapi": "^0.4.1" + "typed-openapi": "^0.4.1", + "vite-node": "^1.4.0" }, "pnpm": { "patchedDependencies": { diff --git a/packages/backend/openapi.json b/packages/backend/openapi.json index 0b9438b4..1817309f 100644 --- a/packages/backend/openapi.json +++ b/packages/backend/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"CR VIF API","description":"CR VIF API Documentation","version":"1.0"},"components":{"schemas":{}},"paths":{"/api/create-user":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"udap_id":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"}},"required":["name","udap_id","email","password"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"udap_id":{"type":"string"},"udap":{"type":"object","properties":{"id":{"type":"string"},"department":{"type":"string"},"completeCoords":{"type":"string"},"visible":{"type":"boolean"},"name":{"type":"string"},"address":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"marianne_text":{"type":"string"},"drac_text":{"type":"string"},"udap_text":{"type":"string"}},"required":["id","department"]}},"required":["id","name","udap_id","udap"]},"token":{"type":"string"},"expiresAt":{"type":"string"},"refreshToken":{"type":"string"}},"required":["token","expiresAt","refreshToken"]}}}}}}},"/api/login":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"udap_id":{"type":"string"},"udap":{"type":"object","properties":{"id":{"type":"string"},"department":{"type":"string"},"completeCoords":{"type":"string"},"visible":{"type":"boolean"},"name":{"type":"string"},"address":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"marianne_text":{"type":"string"},"drac_text":{"type":"string"},"udap_text":{"type":"string"}},"required":["id","department"]}},"required":["id","name","udap_id","udap"]},"token":{"type":"string"},"expiresAt":{"type":"string"},"refreshToken":{"type":"string"}},"required":["token","expiresAt","refreshToken"]}}}}}}},"/api/refresh-token":{"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"token","required":true},{"schema":{"type":"string"},"in":"query","name":"refreshToken","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"udap_id":{"type":"string"},"udap":{"type":"object","properties":{"id":{"type":"string"},"department":{"type":"string"},"completeCoords":{"type":"string"},"visible":{"type":"boolean"},"name":{"type":"string"},"address":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"marianne_text":{"type":"string"},"drac_text":{"type":"string"},"udap_text":{"type":"string"}},"required":["id","department"]}},"required":["id","name","udap_id","udap"]},"token":{"type":"string"},"expiresAt":{"type":"string"},"refreshToken":{"type":"string"}},"required":["token","expiresAt","refreshToken"]}}}}}}},"/api/send-reset-password":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/reset-password":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"temporaryLink":{"type":"string"},"newPassword":{"type":"string"}},"required":["temporaryLink","newPassword"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/udaps":{"get":{"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"department":{"type":"string"},"completeCoords":{"type":"string"},"visible":{"type":"boolean"},"name":{"type":"string"},"address":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"marianne_text":{"type":"string"},"drac_text":{"type":"string"},"udap_text":{"type":"string"}},"required":["id","department"]}}}}}}}},"/api/upload/image":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/api/upload/picture":{"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"reportId","required":true},{"schema":{"type":"string"},"in":"query","name":"pictureId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/api/upload/picture/{pictureId}/lines":{"post":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"reportId","required":true},{"schema":{"type":"string"},"in":"path","name":"pictureId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/pdf/report":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"htmlString":{"type":"string"},"reportId":{"type":"string"},"recipients":{"type":"string"}},"required":["htmlString","reportId","recipients"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}}}},"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"reportId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}}}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"CR VIF API","description":"CR VIF API Documentation","version":"1.0"},"components":{"schemas":{}},"paths":{"/api/create-user":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"udap_id":{"type":"string"}},"required":["email","password","name","udap_id"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"udap_id":{"type":"string"},"udap":{}},"required":["id","name","udap_id","udap"]},"token":{"type":"string"},"expiresAt":{"type":"string"},"refreshToken":{"type":"string"}},"required":["token","expiresAt","refreshToken"]}}}}}}},"/api/login":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"udap_id":{"type":"string"},"udap":{}},"required":["id","name","udap_id","udap"]},"token":{"type":"string"},"expiresAt":{"type":"string"},"refreshToken":{"type":"string"}},"required":["token","expiresAt","refreshToken"]}}}}}}},"/api/refresh-token":{"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"token","required":true},{"schema":{"type":"string"},"in":"query","name":"refreshToken","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"udap_id":{"type":"string"},"udap":{}},"required":["id","name","udap_id","udap"]},"token":{"type":"string"},"expiresAt":{"type":"string"},"refreshToken":{"type":"string"}},"required":["token","expiresAt","refreshToken"]}}}}}}},"/api/send-reset-password":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/reset-password":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"temporaryLink":{"type":"string"},"newPassword":{"type":"string"}},"required":["temporaryLink","newPassword"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/udaps":{"get":{"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"department":{"type":"string"},"completeCoords":{"type":"string"},"visible":{"type":"boolean"},"name":{"type":"string"},"address":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"marianne_text":{"type":"string"},"drac_text":{"type":"string"},"udap_text":{"type":"string"}},"required":["id","department"]}}}}}}}},"/api/upload/image":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/api/upload/picture":{"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"reportId","required":true},{"schema":{"type":"string"},"in":"query","name":"pictureId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/api/upload/picture/{pictureId}/lines":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]}},"color":{"type":"string"}},"required":["points","color"]}}},"required":["lines"]}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"pictureId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/pdf/report":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"htmlString":{"type":"string"},"reportId":{"type":"string"},"recipients":{"type":"string"}},"required":["htmlString","reportId","recipients"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}}}},"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"reportId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/api/upload-data":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"op_id":{"type":"number"},"tx_id":{"anyOf":[{"type":"number"},{"type":"null"}]},"id":{"type":"string"},"type":{"type":"string"},"op":{"type":"string"},"data":{}},"required":["op_id","id","type","op"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}}}} \ No newline at end of file diff --git a/packages/backend/package.json b/packages/backend/package.json index af9a65e1..cbe4abe5 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -8,7 +8,8 @@ "build": "tsup ./src/index.ts --publicDir --format esm", "start": "cross-env NODE_ENV=production node ./dist/index.js", "dev": "vite-node --watch ./src/index.ts", - "migration:create": "pnpm drizzle-kit generate:pg" + "pull-types": "pnpm kysely-codegen --env-file ../../.env --out-file ./src/db-types.d.ts", + "test": "vitest" }, "exports": { ".": "./src/router.ts" @@ -17,7 +18,6 @@ "author": "", "license": "ISC", "devDependencies": { - "@cr-vif/electric-client": "workspace:*", "@cr-vif/pdf": "workspace:*", "@triplit/client": "^0.3.33", "@types/better-sqlite3": "^7.6.9", @@ -29,10 +29,12 @@ "@types/uuid": "^9.0.8", "cross-env": "^7.0.3", "drizzle-kit": "^0.20.14", + "kysely-codegen": "^0.17.0", "tsup": "^8.0.2", "typescript": "^5.2.2", "vite": "^5.1.6", - "vite-node": "^1.4.0" + "vite-node": "^1.4.0", + "vitest": "^2.1.5" }, "dependencies": { "@aws-sdk/client-s3": "^3.572.0", @@ -41,11 +43,12 @@ "@fastify/multipart": "^8.2.0", "@fastify/swagger": "^8.14.0", "@fastify/swagger-ui": "^3.0.0", - "@fastify/type-provider-typebox": "^4.0.0", + "@fastify/type-provider-typebox": "^4.1.0", "@prisma/client": "^4.8.1", "@react-pdf/renderer": "^3.4.2", "@sentry/node": "^7.70.0", "@sinclair/typebox": "^0.32.20", + "@types/pg": "^8.11.10", "canvas": "^2.11.2", "date-fns": "^3.6.0", "debug": "^4.3.4", @@ -56,9 +59,12 @@ "drizzle-zod": "^0.5.1", "fastify": "^4.26.2", "fastify-multer": "^2.0.3", + "jose": "^5.9.6", "jsonwebtoken": "^9.0.2", + "kysely": "^0.27.4", "nodemailer": "^6.9.13", "pastable": "^2.2.1", + "pg": "^8.13.1", "postgres": "^3.4.4", "react": "^18.2.0", "react-pdf-html": "^2.0.4", diff --git a/packages/backend/src/db-types.d.ts b/packages/backend/src/db-types.d.ts new file mode 100644 index 00000000..3dfb4331 --- /dev/null +++ b/packages/backend/src/db-types.d.ts @@ -0,0 +1,183 @@ +/** + * This file was generated by kysely-codegen. + * Please do not edit it manually. + */ + +import type { ColumnType } from "kysely"; + +export type Generated = T extends ColumnType + ? ColumnType + : ColumnType; + +export type Int8 = ColumnType; + +export type Timestamp = ColumnType; + +export interface AtdatabasesMigrationsApplied { + applied_at: Timestamp; + id: Generated; + ignored_error: string | null; + index: number; + name: string; + obsolete: boolean; + script: string; +} + +export interface AtdatabasesMigrationsVersion { + id: number; + version: string | null; +} + +export interface Clause { + hidden: boolean | null; + key: string; + text: string; + udap_id: string; + value: string; +} + +export interface ClauseV2 { + id: string; + key: string; + position: number | null; + text: string; + udap_id: string | null; + value: string; +} + +export interface Delegation { + createdBy: string; + delegatedTo: string; +} + +export interface InternalUser { + email: string; + id: string; + password: string; + role: string; + temporaryLink: string | null; + temporaryLinkExpiresAt: string | null; + userId: string; +} + +export interface PdfSnapshot { + html: string | null; + id: string; + report: string | null; + report_id: string | null; + user_id: string | null; +} + +export interface PictureLines { + createdAt: Timestamp | null; + id: string; + lines: string; + pictureId: string | null; +} + +export interface Pictures { + createdAt: Timestamp | null; + finalUrl: string | null; + id: string; + reportId: string | null; + url: string | null; +} + +export interface Report { + applicantAddress: string | null; + applicantEmail: string | null; + applicantName: string | null; + city: string | null; + contacts: string | null; + createdAt: Timestamp; + createdBy: string; + decision: string | null; + disabled: boolean | null; + furtherInformation: string | null; + id: string; + meetDate: Timestamp | null; + pdf: string | null; + precisions: string | null; + projectCadastralRef: string | null; + projectDescription: string | null; + projectSpaceType: string | null; + redactedBy: string | null; + redactedById: string | null; + serviceInstructeur: number | null; + title: string | null; + udap_id: string | null; + zipCode: string | null; +} + +export interface ServiceInstructeurs { + email: string | null; + full_name: string; + id: number; + short_name: string; + tel: string | null; + udap_id: string | null; +} + +export interface TmpPictures { + createdAt: Timestamp | null; + id: string; + reportId: string | null; +} + +export interface Transactions { + created_at: Timestamp | null; + data: string | null; + entity_id: string; + error: string | null; + id: string; + op: string; + op_id: number; + tx_id: number | null; + type: string; + user_id: string; +} + +export interface Udap { + address: string | null; + city: string | null; + completeCoords: string | null; + department: string; + drac_text: string | null; + email: string | null; + id: string; + marianne_text: string | null; + name: string | null; + phone: string | null; + udap_text: string | null; + visible: boolean | null; + zipCode: string | null; +} + +export interface User { + id: string; + name: string; + udap_id: string; +} + +export interface Whitelist { + email: string; +} + +export interface DB { + atdatabases_migrations_applied: AtdatabasesMigrationsApplied; + atdatabases_migrations_version: AtdatabasesMigrationsVersion; + clause: Clause; + clause_v2: ClauseV2; + delegation: Delegation; + internal_user: InternalUser; + pdf_snapshot: PdfSnapshot; + picture_lines: PictureLines; + pictures: Pictures; + report: Report; + service_instructeurs: ServiceInstructeurs; + tmp_pictures: TmpPictures; + transactions: Transactions; + udap: Udap; + user: User; + whitelist: Whitelist; +} diff --git a/packages/backend/src/db/db.ts b/packages/backend/src/db/db.ts index 4001f7ad..2ff6427f 100644 --- a/packages/backend/src/db/db.ts +++ b/packages/backend/src/db/db.ts @@ -1,8 +1,18 @@ -import { PrismaClient } from "@cr-vif/electric-client/backend"; import { ENV } from "../envVars"; +import { DB } from "../db-types"; // this is the Database interface we defined earlier +import { Pool } from "pg"; +import { Kysely, PostgresDialect } from "kysely"; -export const db = new PrismaClient({ datasources: { db: { url: ENV.DATABASE_URL } } }); +const dialect = new PostgresDialect({ + pool: new Pool({ + connectionString: ENV.DATABASE_URL, + }), +}); -export const cleanUpDb = async () => { - await db.$disconnect(); -}; +// Database interface is passed to Kysely's constructor, and from now on, Kysely +// knows your database structure. +// Dialect is passed to Kysely's constructor, and from now on, Kysely knows how +// to communicate with your database. +export const db = new Kysely({ + dialect, +}); diff --git a/packages/backend/src/envVars.ts b/packages/backend/src/envVars.ts index b12d318b..1fc31e67 100644 --- a/packages/backend/src/envVars.ts +++ b/packages/backend/src/envVars.ts @@ -13,7 +13,7 @@ const envSchema = z.object({ POSTGRES_PASSWORD: z.string(), POSTGRES_DB: z.string(), DATABASE_URL: z.string(), - TOKEN_LIFETIME: z.string().default("1w"), + TOKEN_LIFETIME: z.string().default("60m"), JWT_SECRET: z.string(), JWT_REFRESH_SECRET: z.string(), NODE_ENV: z.string().default("development"), @@ -37,3 +37,4 @@ const envSchema = z.object({ export const ENV = envSchema.parse(process.env); export const isDev = ENV.NODE_ENV === "development"; +export const isTest = ENV.NODE_ENV === "test"; diff --git a/packages/backend/src/features/mail.ts b/packages/backend/src/features/mail.ts index 4b776e9f..ad4ed53b 100644 --- a/packages/backend/src/features/mail.ts +++ b/packages/backend/src/features/mail.ts @@ -1,8 +1,8 @@ import { createTransport } from "nodemailer"; import { ENV } from "../envVars"; -import { Report } from "@cr-vif/electric-client/frontend"; import { format } from "date-fns"; import { sentry } from "./sentry"; +import { Report } from "../../../frontend/src/db/AppSchema"; const transporter = createTransport({ host: ENV.EMAIL_HOST, @@ -43,6 +43,7 @@ Cordialement`, }); }; +// TODO: CR_commune_demandeur_date.pdf const getPDFInMailName = (report: Report) => { const date = format(report.meetDate || new Date(), "dd-MM-yyyy"); return `compte_rendu_UDAP_${[report.applicantName?.replaceAll(" ", ""), date].filter(Boolean).join("_")}.pdf`; diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 77773cb9..c8b81abf 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -13,7 +13,7 @@ const debug = makeDebug("index"); const start = async () => { await registerViteHmrServerRestart(); - await initClauseV2(); + // await initClauseV2(); debug("Starting fastify server in", ENV.NODE_ENV, "mode"); const fastifyInstance = await initFastify(); diff --git a/packages/backend/src/router.ts b/packages/backend/src/router.ts index d4c1831d..efd16dfc 100644 --- a/packages/backend/src/router.ts +++ b/packages/backend/src/router.ts @@ -12,6 +12,7 @@ import { staticDataPlugin } from "./routes/staticDataRoutes"; import { pdfPlugin } from "./routes/pdfRoutes"; import { uploadPlugin } from "./routes/uploadRoutes"; import { sentry } from "./features/sentry"; +import { syncPlugin } from "./routes/syncRoutes"; const debug = makeDebug("fastify"); @@ -57,6 +58,7 @@ export const initFastify = async () => { await instance.register(staticDataPlugin); await instance.register(uploadPlugin, { prefix: "/upload" }); await instance.register(pdfPlugin, { prefix: "/pdf" }); + await instance.register(syncPlugin); }, { prefix: "/api" }, ); diff --git a/packages/backend/src/routes/pdfRoutes.tsx b/packages/backend/src/routes/pdfRoutes.tsx index e5873585..a579249f 100644 --- a/packages/backend/src/routes/pdfRoutes.tsx +++ b/packages/backend/src/routes/pdfRoutes.tsx @@ -1,21 +1,30 @@ import { Type, type FastifyPluginAsyncTypebox } from "@fastify/type-provider-typebox"; import { renderToBuffer } from "@react-pdf/renderer"; import { ReportPDFDocument } from "@cr-vif/pdf"; -import { Pictures, Udap } from "@cr-vif/electric-client/frontend"; import { authenticate } from "./authMiddleware"; import { db } from "../db/db"; import { sendReportMail } from "../features/mail"; import { getPDFName } from "../services/uploadService"; import React from "react"; +import { Udap } from "../../../frontend/src/db/AppSchema"; +import { Pictures } from "../db-types"; export const pdfPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => { fastify.addHook("preHandler", authenticate); fastify.post("/report", { schema: reportPdfTSchema }, async (request) => { const { reportId, htmlString } = request.body; - const { udap } = request.user.user; + const { udap_id } = request.user.user!; - const pictures = await db.pictures.findMany({ where: { reportId }, orderBy: { createdAt: "asc" } }); + const pictures = await db + .selectFrom("pictures") + .where("reportId", "=", reportId) + .orderBy("createdAt asc") + .selectAll() + .execute(); + + const udapsQuery = await db.selectFrom("udap").where("id", "=", udap_id).selectAll().execute(); + const udap = udapsQuery[0]!; const pdf = await generatePdf({ htmlString, udap, pictures }); @@ -27,7 +36,7 @@ export const pdfPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => { name, }); - await db.report.update({ where: { id: reportId }, data: { pdf: url } }); + await db.updateTable("report").set({ pdf: url }).where("id", "=", reportId).execute(); const userMail = request.user.email; const recipients = request.body.recipients @@ -36,7 +45,8 @@ export const pdfPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => { .map((r) => r.trim()); if (!recipients.includes(userMail)) recipients.push(userMail); - const report = await db.report.findUnique({ where: { id: reportId } }); + const reportsQuery = await db.selectFrom("report").where("id", "=", reportId).selectAll().execute(); + const report = reportsQuery[0]; await sendReportMail({ recipients: recipients.join(","), pdfBuffer: pdf, report: report! }); diff --git a/packages/backend/src/routes/staticDataRoutes.ts b/packages/backend/src/routes/staticDataRoutes.ts index 0f585073..9460c217 100644 --- a/packages/backend/src/routes/staticDataRoutes.ts +++ b/packages/backend/src/routes/staticDataRoutes.ts @@ -1,6 +1,5 @@ import type { FastifyPluginAsyncTypebox } from "@fastify/type-provider-typebox"; import { Type } from "@sinclair/typebox"; -import { udap } from "@cr-vif/electric-client/typebox"; export const staticDataPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => { // @ts-ignore - null/undefined mismatch @@ -9,6 +8,29 @@ export const staticDataPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => }); }; +export const udapTSchema = Type.Object({ + id: Type.String(), + department: Type.String(), + completeCoords: Type.Optional(Type.String()), + visible: Type.Optional(Type.Boolean()), + name: Type.Optional(Type.String()), + address: Type.Optional(Type.String()), + zipCode: Type.Optional(Type.String()), + city: Type.Optional(Type.String()), + phone: Type.Optional(Type.String()), + email: Type.Optional(Type.String()), + marianne_text: Type.Optional(Type.String()), + drac_text: Type.Optional(Type.String()), + udap_text: Type.Optional(Type.String()), + user: Type.Array( + Type.Object({ + id: Type.String(), + name: Type.String(), + udap_id: Type.String(), + }), + ), +}); + export const getUDAPsTSchema = { - response: { 200: Type.Array(Type.Omit(udap, ["user"])) }, + response: { 200: Type.Array(Type.Omit(udapTSchema, ["user"])) }, }; diff --git a/packages/backend/src/routes/syncRoutes.ts b/packages/backend/src/routes/syncRoutes.ts new file mode 100644 index 00000000..b82194a8 --- /dev/null +++ b/packages/backend/src/routes/syncRoutes.ts @@ -0,0 +1,17 @@ +import { FastifyPluginAsyncTypebox } from "@fastify/type-provider-typebox"; +import { Type } from "@sinclair/typebox"; +import { crudTSchema } from "../services/syncService"; +import { authenticate } from "./authMiddleware"; + +export const syncPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => { + fastify.addHook("preHandler", authenticate); + + fastify.post("/upload-data", { schema: uploadDataTSchema }, async (request) => { + return request.services.sync.applyCrud(request.body, request.user.id); + }); +}; + +const uploadDataTSchema = { + body: crudTSchema, + response: { 200: Type.Any() }, +}; diff --git a/packages/backend/src/routes/tschemas.ts b/packages/backend/src/routes/tschemas.ts new file mode 100644 index 00000000..dcdb1c5b --- /dev/null +++ b/packages/backend/src/routes/tschemas.ts @@ -0,0 +1,15 @@ +import { Type } from "@sinclair/typebox"; + +export const userAndTokenTSchema = Type.Object({ + user: Type.Optional( + Type.Object({ + id: Type.String(), + name: Type.String(), + udap_id: Type.String(), + udap: Type.Any(), + }), + ), + token: Type.String(), + expiresAt: Type.String(), + refreshToken: Type.String(), +}); diff --git a/packages/backend/src/routes/uploadRoutes.tsx b/packages/backend/src/routes/uploadRoutes.tsx index 12fab7fb..e4aa8b9f 100644 --- a/packages/backend/src/routes/uploadRoutes.tsx +++ b/packages/backend/src/routes/uploadRoutes.tsx @@ -19,6 +19,7 @@ export const uploadPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => { fastify.post("/image", async (request, reply) => { const file = await request.file(); + console.log(request.query); const { reportId, id } = request.query || ({} as any); if (!file) throw new AppError(400, "No file provided"); @@ -30,32 +31,21 @@ export const uploadPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => { name: getPictureName(reportId, id), }); - debug("adding url to pic", id, "for report", reportId); + await db + .insertInto("pictures") + .values({ + id, + url, + reportId, + createdAt: new Date(), + finalUrl: url, + }) + .execute(); - await db.pictures.create({ data: { id, url, reportId, createdAt: new Date(), finalUrl: url } }); - // try { - // await db.tmp_pictures.delete({ where: { id } }); - // } catch (e) {} - // await db.pictures.update({ where: { id }, data: { url } }); + debug("adding url to pic", id, "for report", reportId); reply.send(url); - // for await (const file of files) { - // const isImage = ["image/png", "image/jpeg", "image/jpg"].includes(file.mimetype); - - // if (!isImage) { - // throw new AppError(400, "File is not an image"); - // } - - // // await request.services.upload.addImageToReport({ - // // reportId: "", - // // buffer: await file.toBuffer(), - // // name: getFileName(file), - // // }); - // } - - console.log("done"); - return "ok"; }); diff --git a/packages/backend/src/routes/userRoutes.ts b/packages/backend/src/routes/userRoutes.ts index f073fb41..ddd71d5b 100644 --- a/packages/backend/src/routes/userRoutes.ts +++ b/packages/backend/src/routes/userRoutes.ts @@ -1,19 +1,16 @@ -import type { FastifyPluginAsyncTypebox } from "@fastify/type-provider-typebox"; +import type { FastifyPluginAsyncTypebox, Static } from "@fastify/type-provider-typebox"; import { Type } from "@sinclair/typebox"; -import { userAndTokenTSchema } from "../services/userService"; -import { internal_userInput, userInput } from "@cr-vif/electric-client/typebox"; +import { userAndTokenTSchema } from "./tschemas"; export const userPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => { - // @ts-expect-error null / undefined mismatch fastify.post("/create-user", { schema: createUserTSchema }, async (request) => { - const resp = await request.services.user.createUser(request.body); + const resp = (await request.services.user.createUser(request.body)) as Static; return resp; }); - // @ts-expect-error null / undefined mismatch fastify.post("/login", { schema: loginTSchema }, async (request) => { - const result = await request.services.user.login(request.body); + const result = (await request.services.user.login(request.body)) as Static; return result; }); @@ -23,7 +20,7 @@ export const userPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => { }); fastify.post("/send-reset-password", { schema: sendResetPasswordTSchema }, async (request) => { - return request.services.user.generateResetLink(request.body.email); + return request.services.user.generateResetLink(request.body.email) as Promise<{ message: string }>; }); fastify.post("/reset-password", { schema: resetPasswordTSchema }, async (request) => { @@ -32,15 +29,17 @@ export const userPlugin: FastifyPluginAsyncTypebox = async (fastify, _) => { }; export const createUserTSchema = { - body: Type.Composite([ - Type.Pick(userInput, ["name", "udap_id"]), - Type.Pick(internal_userInput, ["email", "password"]), - ]), + body: Type.Object({ + email: Type.String(), + password: Type.String(), + name: Type.String(), + udap_id: Type.String(), + }), response: { 200: userAndTokenTSchema }, }; export const loginTSchema = { - body: Type.Pick(internal_userInput, ["email", "password"]), + body: Type.Object({ email: Type.String(), password: Type.String() }), response: { 200: userAndTokenTSchema }, }; diff --git a/packages/backend/src/services/services.ts b/packages/backend/src/services/services.ts index 9fe97d00..3f946f58 100644 --- a/packages/backend/src/services/services.ts +++ b/packages/backend/src/services/services.ts @@ -1,5 +1,6 @@ import { authenticate } from "../routes/authMiddleware"; import { StaticDataService } from "./staticDataService"; +import { SyncService } from "./syncService"; import { UploadService } from "./uploadService"; import { UserService } from "./userService"; @@ -11,6 +12,7 @@ const makeServices = () => ({ user: new UserService(), staticData: new StaticDataService(), upload: new UploadService(), + sync: new SyncService(), }); export const getServices = () => { diff --git a/packages/backend/src/services/staticDataService.ts b/packages/backend/src/services/staticDataService.ts index f593105f..dfdb50d6 100644 --- a/packages/backend/src/services/staticDataService.ts +++ b/packages/backend/src/services/staticDataService.ts @@ -2,6 +2,6 @@ import { db } from "../db/db"; export class StaticDataService { async getUDAPs() { - return db.udap.findMany({ where: { visible: true } }); + return db.selectFrom("udap").where("visible", "=", true).selectAll().execute(); } } diff --git a/packages/backend/src/services/syncService.ts b/packages/backend/src/services/syncService.ts new file mode 100644 index 00000000..91438646 --- /dev/null +++ b/packages/backend/src/services/syncService.ts @@ -0,0 +1,81 @@ +import { Static, TSchema, Type } from "@sinclair/typebox"; +import { db } from "../db/db"; +import { makeDebug } from "../features/debug"; +import { getServices } from "./services"; +import { v4 } from "uuid"; + +const debug = makeDebug("sync-service"); + +const Nullable = (schema: T) => Type.Optional(Type.Union([schema, Type.Null()])); + +export class SyncService { + async applyCrud(operation: Static, userId: string) { + await db + .insertInto("transactions") + .values({ + id: v4(), + entity_id: operation.id, + type: operation.type, + op_id: operation.op_id, + tx_id: operation.tx_id, + data: JSON.stringify(operation.data), + op: operation.op, + created_at: new Date(), + user_id: userId, + }) + .execute(); + + try { + if (operation.op === "DELETE") { + debug("Deleting row on table", operation.type, "with id", operation.id); + const { type, id } = operation; + await db + .deleteFrom(type as any) + .where("id", "=", id) + .execute(); + } + if (operation.op === "PATCH") { + debug("Patching row on table", operation.type, "with id", operation.id); + const { type, id, data } = operation; + await db + .updateTable(type as any) + .set(data as any) + .where("id", "=", id) + .execute(); + } + if (operation.op === "PUT") { + debug("Inserting row on table", operation.type); + const { type, data, id } = operation; + await db + .insertInto(type as any) + .values({ id, ...data } as any) + .execute(); + } + + if (operation.type === "picture_lines") { + debug("updating picture lines"); + const pictureLines = await db.selectFrom("picture_lines").where("id", "=", operation.id).selectAll().execute(); + + debug(pictureLines); + const pictureId = pictureLines?.[0]?.pictureId; + + if (pictureId) await getServices().upload.handleNotifyPictureLines({ pictureId }); + } + } catch (e) { + debug("Error on applyCrud", e); + + return { success: false, error: e }; + } + + return { success: true }; + } +} + +export const crudTSchema = Type.Object({ + op_id: Type.Number(), + tx_id: Nullable(Type.Number()), + id: Type.String(), + type: Type.String(), + op: Type.String(), + data: Type.Optional(Type.Any()), +}); diff --git a/packages/backend/src/services/uploadService.ts b/packages/backend/src/services/uploadService.ts index dc6830de..cfe03c3b 100644 --- a/packages/backend/src/services/uploadService.ts +++ b/packages/backend/src/services/uploadService.ts @@ -92,15 +92,18 @@ export class UploadService { async handleNotifyPictureLines({ pictureId, - lines, + // lines, }: { pictureId: string; - lines: Array<{ points: { x: number; y: number }[]; color: string }>; + // lines: Array<{ points: { x: number; y: number }[]; color: string }>; }) { debug("Handling picture lines", pictureId); - const picture = await db.pictures.findFirst({ - where: { id: pictureId }, - }); + const pictureQuery = await db.selectFrom("pictures").where("id", "=", pictureId).selectAll().execute(); + const picture = pictureQuery?.[0]; + + const linesQuery = await db.selectFrom("picture_lines").where("pictureId", "=", pictureId).selectAll().execute(); + const lines = JSON.parse(linesQuery?.[0]?.lines || "[]"); + if (!picture) throw new AppError(404, "Picture not found"); const buffer = await applyLinesToPicture({ pictureUrl: picture.url!, lines }); @@ -122,7 +125,7 @@ export class UploadService { const url = `${bucketUrl}/${name}`; - await db.pictures.update({ where: { id: pictureId }, data: { finalUrl: url } }); + await db.updateTable("pictures").set({ finalUrl: url }).where("id", "=", pictureId).execute(); debug(url); return url; diff --git a/packages/backend/src/services/userService.ts b/packages/backend/src/services/userService.ts index fe88bda7..e9c8b268 100644 --- a/packages/backend/src/services/userService.ts +++ b/packages/backend/src/services/userService.ts @@ -1,22 +1,20 @@ -import { addDays } from "date-fns"; +import { addDays, addHours } from "date-fns"; import jwt from "jsonwebtoken"; import crypto from "node:crypto"; import { db } from "../db/db"; -import type { Prisma } from "@cr-vif/electric-client/backend"; -import * as Schemas from "@cr-vif/electric-client/typebox"; import { Type } from "@sinclair/typebox"; -import { ENV, isDev } from "../envVars"; +import { ENV, isDev, isTest } from "../envVars"; import { makeDebug } from "../features/debug"; import { AppError } from "../features/errors"; import { sendPasswordResetMail } from "../features/mail"; +import { InternalUser, User } from "../db-types"; +import { Expression, Simplify, sql } from "kysely"; +import { jsonArrayFrom, jsonObjectFrom } from "kysely/helpers/postgres"; const debug = makeDebug("user_service"); export class UserService { - async createUser( - payload: Pick & - Pick, - ) { + async createUser(payload: Pick & Pick) { await assertEmailDoesNotAlreadyExist(payload.email); await assertEmailInWhitelist(payload.email); @@ -25,73 +23,83 @@ export class UserService { const { name, udap_id, ...rest } = payload; const id = "user-" + crypto.randomUUID(); - const internalUser = await db.internal_user.create({ - data: { + await db.insertInto("user").values({ id, name, udap_id }).returningAll().execute(); + + await db + .insertInto("internal_user") + .values({ id, ...rest, role: "user", - user: { - create: { - id, - name, - udap_id, - }, - }, + userId: id, password, - }, - include: { - user: { - include: { - udap: true, - }, - }, - }, - }); + }) + .execute(); - const user = internalUser.user; + const { token, expiresAt } = this.generateJWT(id); - const { token, expiresAt } = this.generateJWT(internalUser); + const { user } = (await this.getUserById(id))!; - return { user: user, token, expiresAt, refreshToken: this.generateRefreshToken(internalUser) }; - } - - async getUserByEmail(email: string) { - const user = await db.internal_user.findFirst({ - where: { email }, - include: { user: { include: { udap: true } } }, - }); - assertUserExists(user); - return user!; + return { user: user, token, expiresAt, refreshToken: this.generateRefreshToken(id) }; } async getUserById(id: string) { - const user = await db.internal_user.findFirst({ where: { id }, include: { user: { include: { udap: true } } } }); + const internalUserResults = await db + .selectFrom("internal_user") + .where("internal_user.id", "=", id) + .select((eb) => [ + jsonObjectFrom( + eb + .selectFrom("user") + .whereRef("internal_user.id", "=", "user.id") + .selectAll() + .select((eb) => [ + jsonObjectFrom(eb.selectFrom("udap").whereRef("user.udap_id", "=", "udap.id").selectAll()).as("udap"), + ]), + ).as("user"), + // jsonObjectFrom(eb.selectFrom("udap").whereRef()) + ]) + .selectAll() + .execute(); + // .innerJoin("user", "internal_user.userId", "user.id") + // .innerJoin("udap", "user.udap_id", "udap.id") + // .selectAll() + // .execute(); + + const user = internalUserResults[0]; + + // const user = await db.internal_user.findFirst({ where: { id }, include: { user: { include: { udap: true } } } }); assertUserExists(user); return user; } - async login(payload: Pick) { - const user = await db.internal_user.findFirst({ - where: { email: payload.email }, - include: { - user: { - include: { - udap: true, - }, - }, - }, - }); - assertUserExists(user); - await assertPasswordsMatch(payload.password, user!.password); + async login(payload: Pick) { + const internalUserInsertResults = await db + .selectFrom("internal_user") + .where("email", "=", payload.email) + .selectAll() + .execute(); + const internalUser = internalUserInsertResults[0]!; + + assertUserExists(internalUser); + await assertPasswordsMatch(payload.password, internalUser.password); - const { token, expiresAt } = this.generateJWT(user!); + const { token, expiresAt } = this.generateJWT(internalUser.id); - return { user: user?.user, token, expiresAt, refreshToken: this.generateRefreshToken(user!) }; + const { user } = (await this.getUserById(internalUser.id))!; + + return { user, token, expiresAt, refreshToken: this.generateRefreshToken(internalUser.id) }; + } + + async addToWhitelist(email: string) { + await db.insertInto("whitelist").values({ email }).execute(); + return { message: "Courriel ajouté à la liste blanche." }; } async generateResetLink(email: string) { - const user = await db.internal_user.findFirst({ where: { email } }); + const userResults = await db.selectFrom("internal_user").where("email", "=", email).selectAll().execute(); + const user = userResults[0]!; assertUserExists(user, "Aucun utilisateur avec ce courriel n'a été trouvé."); const temporaryLink = crypto.randomUUID(); @@ -99,10 +107,15 @@ export class UserService { const encryptedLink = md5(temporaryLink); - await db.internal_user.update({ - where: { id: user!.id }, - data: { temporaryLink: encryptedLink, temporaryLinkExpiresAt }, - }); + await db + .updateTable("internal_user") + .set({ temporaryLink: encryptedLink, temporaryLinkExpiresAt }) + .where("id", "=", user.id) + .execute(); + + if (isTest) { + return temporaryLink; + } await sendPasswordResetMail({ email: user!.email, temporaryLink }); @@ -115,17 +128,21 @@ export class UserService { async resetPassword({ temporaryLink, newPassword }: { temporaryLink: string; newPassword: string }) { const encryptedLink = md5(temporaryLink); - const user = await db.internal_user.findFirst({ - where: { temporaryLink: encryptedLink }, - }); + const userResults = await db + .selectFrom("internal_user") + .where("temporaryLink", "=", encryptedLink) + .selectAll() + .execute(); + const user = userResults[0]; await assertLinkIsValid(user, encryptedLink); const password = await encryptPassword(newPassword); - await db.internal_user.update({ - where: { id: user!.id }, - data: { password, temporaryLink: null, temporaryLinkExpiresAt: null }, - }); + await db + .updateTable("internal_user") + .set({ password, temporaryLink: null, temporaryLinkExpiresAt: null }) + .where("id", "=", user!.id) + .execute(); return { message: "Votre mot de passe a été modifié avec succès." }; } @@ -134,21 +151,27 @@ export class UserService { const payload = this.validateToken(token); const { sub } = payload; if (!sub) throw new AppError(403, "Token invalide"); - return this.getUserById(sub); + return this.getUserById(sub as string); } - generateJWT(user: Prisma.internal_userUncheckedCreateInput) { - const expiresAt = addDays(new Date(), 7).toISOString(); + generateJWT(userId: InternalUser["id"]) { + const expiresAt = addHours(new Date(), 1).toISOString(); - const token = jwt.sign( - { - sub: user.id, - }, - ENV.JWT_SECRET, - { - expiresIn: ENV.TOKEN_LIFETIME, - }, - ); + const key = { + alg: "HS256", + k: ENV.JWT_SECRET, + kid: "powersync", + kty: "oct", + }; + + const token = jwt.sign({}, Buffer.from(key.k, "base64"), { + algorithm: key.alg as any, + keyid: key.kid, + subject: userId, + issuer: "test-client", + audience: ["powersync"], + expiresIn: "1h", + }); return { token, expiresAt }; } @@ -157,7 +180,7 @@ export class UserService { debug("refreshing token", token?.slice(0, 6), refreshToken?.slice(0, 6)); try { const { sub } = this.validateToken(token); - const rToken = refreshToken ?? this.generateRefreshToken((await this.getUserById(sub))!); + const rToken = refreshToken ?? this.generateRefreshToken(sub as string); debug("token is valid"); return { token, refreshToken: rToken }; } catch (e: any) { @@ -167,7 +190,7 @@ export class UserService { const { sub } = this.validateRefreshToken(refreshToken); const user = await this.getUserById(sub); - const { token, expiresAt } = this.generateJWT(user!); + const { token, expiresAt } = this.generateJWT(user!.id); return { token, expiresAt, refreshToken, user: user!.user }; } catch (e) { debug("invalid refresh token", e); @@ -179,18 +202,21 @@ export class UserService { } } - generateRefreshToken(user: Prisma.internal_userUncheckedCreateInput) { + generateRefreshToken(userId: InternalUser["id"]) { const token = jwt.sign( { - sub: user.id, + sub: userId, }, ENV.JWT_REFRESH_SECRET, ); + return token; } validateToken(token: string) { - return jwt.verify(token, ENV.JWT_SECRET) as { sub: string }; + return jwt.verify(token, Buffer.from(key.k, "base64"), { + algorithms: [key.alg as any], + }); } validateRefreshToken(token: string) { @@ -198,14 +224,14 @@ export class UserService { } } -const md5 = (data: string) => crypto.createHash("md5").update(data).digest("hex"); +const key = { + alg: "HS256", + k: ENV.JWT_SECRET, + kid: "powersync", + kty: "oct", +}; -export const userAndTokenTSchema = Type.Object({ - user: Type.Optional(Type.Pick(Schemas.user, ["id", "name", "udap_id", "udap"])), - token: Type.String(), - expiresAt: Type.String(), - refreshToken: Type.String(), -}); +const md5 = (data: string) => crypto.createHash("md5").update(data).digest("hex"); const encryptPassword = (password: string) => { return new Promise((resolve, reject) => { @@ -229,10 +255,7 @@ const verifyPassword = (password: string, hash: string) => { }); }; -const assertLinkIsValid = async ( - user: Prisma.internal_userUncheckedCreateInput | null | undefined, - encryptedLink: string, -) => { +const assertLinkIsValid = async (user: InternalUser | undefined, encryptedLink: string) => { if (!user) { throw new AppError(403, "Le lien est invalide"); } @@ -252,7 +275,7 @@ const assertLinkIsValid = async ( }; const assertUserExists = (user: any, errorDescription?: string) => { - if (!user) { + if (!user || !user.id) { throw new AppError(403, "Le courriel ou le mot de passe est incorrect"); } }; @@ -266,22 +289,20 @@ const assertPasswordsMatch = async (password: string, hash: string) => { }; const assertEmailDoesNotAlreadyExist = async (email: string) => { - const existingUser = await db.internal_user.findFirst({ - where: { - email, - }, - }); + const existingUserResults = await db.selectFrom("internal_user").where("email", "=", email).selectAll().execute(); + const existingUser = existingUserResults[0]; if (existingUser) { throw new AppError(400, "Un utilisateur avec ce courriel existe déjà"); } - return existingUser; + return null; }; const assertEmailInWhitelist = async (email: string) => { if (isDev) return; - const whitelist = await db.whitelist.findFirst({ where: { email } }); + const whitelistResults = await db.selectFrom("whitelist").where("email", "=", email).selectAll().execute(); + const whitelist = whitelistResults[0]; if (!whitelist) { throw new AppError(403, "Votre courriel n'est pas autorisée à accéder à cette application"); diff --git a/packages/backend/tests/user.test.ts b/packages/backend/tests/user.test.ts new file mode 100644 index 00000000..2e279885 --- /dev/null +++ b/packages/backend/tests/user.test.ts @@ -0,0 +1,115 @@ +import { describe, it, expect, beforeAll, afterAll } from "vitest"; +import { UserService } from "../src/services/userService"; +import { AppError } from "../src/features/errors"; +import { StaticDataService } from "../src/services/staticDataService"; +import { db } from "../src/db/db"; + +const userService = new UserService(); +const staticDataService = new StaticDataService(); + +const mockUser = { + email: "test@test.com", + password: "test", + name: "Test user", +}; + +describe("auth tests", () => { + beforeAll(async () => { + await db.deleteFrom("internal_user").where("email", "=", mockUser.email).execute(); + await db.deleteFrom("whitelist").where("email", "=", mockUser.email).execute(); + }); + + afterAll(async () => { + await db.deleteFrom("internal_user").where("email", "=", mockUser.email).execute(); + await db.deleteFrom("whitelist").where("email", "=", mockUser.email).execute(); + }); + + it("should fail to login", async () => { + try { + await userService.login(mockUser); + } catch (e) { + expect(e).toBeInstanceOf(AppError); + expect((e as AppError).status).toBe(403); + } + }); + + it("should try to signup without being whitelisted", async () => { + const udaps = await staticDataService.getUDAPs(); + const udap = udaps[0]; + expect(udap).toBeDefined(); + + try { + await userService.createUser({ ...mockUser, udap_id: udap.id }); + } catch (e) { + expect(e).toBeInstanceOf(AppError); + expect((e as AppError).status).toBe(403); + } + }); + + it("should succeed to signup", async () => { + const udaps = await staticDataService.getUDAPs(); + const udap = udaps[0]; + expect(udap).toBeDefined(); + + await userService.addToWhitelist(mockUser.email); + + const user = await userService.createUser({ ...mockUser, udap_id: udap.id }); + expect(user).toBeDefined(); + + expect(user.token).toBeDefined(); + expect(user.expiresAt).toBeDefined(); + expect(user.refreshToken).toBeDefined(); + }); + + it("should fail to signup with the same email", async () => { + const udaps = await staticDataService.getUDAPs(); + const udap = udaps[0]; + expect(udap).toBeDefined(); + + try { + await userService.createUser({ ...mockUser, udap_id: udap.id }); + } catch (e) { + expect(e).toBeInstanceOf(AppError); + expect((e as AppError).status).toBe(400); + } + }); + + it("should fail to login with wrong password", async () => { + try { + await userService.login({ email: mockUser.email, password: "wrong" }); + } catch (e) { + expect(e).toBeInstanceOf(AppError); + expect((e as AppError).status).toBe(403); + } + }); + + it("should login", async () => { + const user = await userService.login(mockUser); + expect(user).toBeDefined(); + + expect(user.token).toBeDefined(); + expect(user.expiresAt).toBeDefined(); + expect(user.refreshToken).toBeDefined(); + + const userByToken = await userService.getUserByToken(user.token); + expect(userByToken).toBeDefined(); + }); + + it("should reset password", async () => { + const user = await userService.login(mockUser); + expect(user).toBeDefined(); + + const temporaryLink = (await userService.generateResetLink(mockUser.email)) as string; + await userService.resetPassword({ temporaryLink, newPassword: "newpassword" }); + + try { + await userService.login({ email: mockUser.email, password: mockUser.password }); + } catch (e) { + expect(e).toBeInstanceOf(AppError); + expect((e as AppError).status).toBe(403); + } + + const newUser = await userService.login({ email: mockUser.email, password: "newpassword" }); + expect(newUser).toBeDefined(); + }); +}); diff --git a/packages/electric-client/package-lock.json b/packages/electric-client/package-lock.json deleted file mode 100644 index f68837db..00000000 --- a/packages/electric-client/package-lock.json +++ /dev/null @@ -1,249 +0,0 @@ -{ - "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 deleted file mode 100644 index c203d2fd..00000000 --- a/packages/electric-client/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "@cr-vif/electric-client", - "version": "1.0.0", - "description": "", - "scripts": { - "generate:front": "dotenv -e ../../.env -- pnpm electric-sql generate && pnpm complete", - "pull": "dotenv -e ../../.env -- pnpm prisma db pull", - "generate:back": "dotenv -e ../../.env -- pnpm prisma generate", - "complete": "vite-node ./scripts/completePrismaClient.ts", - "build": "tsup src/index.ts --dts --format cjs,esm" - }, - "exports": { - "./frontend": { - "import": { - "default": "./src/generated/client/index.ts", - "types": "./src/generated/client/index.ts" - } - }, - "./backend": { - "import": { - "default": "./src/generated/backend-client/index.ts", - "types": "./src/generated/backend-client/index.ts" - } - }, - "./zod": { - "import": { - "default": "./src/generated/zod/index.ts", - "types": "./src/generated/zod/index.ts" - } - }, - "./typebox": { - "import": { - "default": "./src/generated/typebox/index.ts", - "types": "./src/generated/typebox/index.ts" - } - } - }, - "keywords": [], - "author": "", - "license": "ISC", - "peerDependencies": { - "@prisma/client": "^4.8.1", - "@sinclair/typebox": "^0.32.20", - "electric-sql": "^0.12.1", - "zod": "^3.22.4" - }, - "devDependencies": { - "dotenv-cli": "^7.4.1", - "prisma": "^4.8.1", - "prisma-typebox-generator": "^2.1.0", - "vite-node": "^1.4.0" - } -} diff --git a/packages/electric-client/prisma/schema.prisma b/packages/electric-client/prisma/schema.prisma deleted file mode 100644 index cd544acd..00000000 --- a/packages/electric-client/prisma/schema.prisma +++ /dev/null @@ -1,170 +0,0 @@ -generator client { - provider = "prisma-client-js" -} - -generator typebox { - provider = "prisma-typebox-generator" - output = "../src/generated/typebox" -} - -datasource db { - provider = "postgresql" - url = env("DATABASE_URL") -} - -model atdatabases_migrations_applied { - id BigInt @id @default(autoincrement()) - index Int - name String - script String - applied_at DateTime @db.Timestamptz(6) - ignored_error String? - obsolete Boolean -} - -model atdatabases_migrations_version { - id Int @id - version String? -} - -model clause { - key String - value String - udap_id String - text String - hidden Boolean? - - @@id([key, value, udap_id]) -} - -model report { - id String @id - title String? - projectDescription String? - redactedBy String? - meetDate DateTime? @db.Timestamp(6) - applicantName String? - applicantAddress String? - projectCadastralRef String? - projectSpaceType String? - decision String? - precisions String? - contacts String? - furtherInformation String? - createdBy String - createdAt DateTime @db.Timestamp(6) - serviceInstructeur Int? - pdf String? - disabled Boolean? - udap_id String? - redactedById String? - applicantEmail String? - city String? - zipCode String? - pictures pictures[] - user user @relation(fields: [createdBy], references: [id], onDelete: SetNull, onUpdate: NoAction) - tmp_pictures tmp_pictures[] -} - -model delegation { - createdBy String - delegatedTo String - user_delegation_createdByTouser user @relation("delegation_createdByTouser", fields: [createdBy], references: [id], onDelete: Cascade, onUpdate: NoAction) - user_delegation_delegatedToTouser user @relation("delegation_delegatedToTouser", fields: [delegatedTo], references: [id], onDelete: Cascade, onUpdate: NoAction) - - @@id([createdBy, delegatedTo]) -} - -model udap { - id String @id - department String - completeCoords String? - visible Boolean? - name String? - address String? - zipCode String? - city String? - phone String? - email String? - marianne_text String? - drac_text String? - udap_text String? - user user[] -} - -model user { - id String @id - name String - udap_id String - delegation_delegation_createdByTouser delegation[] @relation("delegation_createdByTouser") - delegation_delegation_delegatedToTouser delegation[] @relation("delegation_delegatedToTouser") - internal_user internal_user[] - report report[] - udap udap @relation(fields: [udap_id], references: [id], onDelete: SetNull, onUpdate: NoAction, map: "fk_udap_id") -} - -model whitelist { - email String @id -} - -model internal_user { - id String @id - email String - role String - password String - temporaryLink String? - temporaryLinkExpiresAt String? - userId String - user user @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: NoAction) -} - -model service_instructeurs { - id Int @id - full_name String - short_name String - email String? - tel String? - udap_id String? -} - -model clause_v2 { - id String @id - key String - value String - position Int? - udap_id String? - text String -} - -model pdf_snapshot { - id String @id - report_id String? - html String? - report String? - user_id String? -} - -model pictures { - id String @id - reportId String? - url String? - createdAt DateTime? @db.Timestamp(6) - finalUrl String? - picture_lines picture_lines[] - report report? @relation(fields: [reportId], references: [id], onDelete: Cascade, onUpdate: NoAction) -} - -model tmp_pictures { - id String @id - reportId String? - createdAt DateTime? @db.Timestamp(6) - report report? @relation(fields: [reportId], references: [id], onDelete: Cascade, onUpdate: NoAction) -} - -model picture_lines { - id String @id - pictureId String? - lines String - createdAt DateTime? @db.Timestamp(6) - pictures pictures? @relation(fields: [pictureId], references: [id], onDelete: Cascade, onUpdate: NoAction) -} diff --git a/packages/electric-client/scripts/completePrismaClient.ts b/packages/electric-client/scripts/completePrismaClient.ts deleted file mode 100644 index 32e14d33..00000000 --- a/packages/electric-client/scripts/completePrismaClient.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { promises as fs } from "node:fs"; - -const content = `export * from '@prisma/client/runtime';`; -const path = "./src/generated/client/runtime/library.d.ts"; - -await fs.mkdir("./src/generated/client/runtime", { recursive: true }); -await fs.writeFile(path, content); diff --git a/packages/electric-client/src/generated/backend-client/index.ts b/packages/electric-client/src/generated/backend-client/index.ts deleted file mode 100644 index fcab163d..00000000 --- a/packages/electric-client/src/generated/backend-client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "@prisma/client"; diff --git a/packages/electric-client/src/generated/client/index.ts b/packages/electric-client/src/generated/client/index.ts deleted file mode 100644 index c63a3275..00000000 --- a/packages/electric-client/src/generated/client/index.ts +++ /dev/null @@ -1,5799 +0,0 @@ -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'; -import pgMigrations from './pg-migrations'; - -///////////////////////////////////////// -// HELPER FUNCTIONS -///////////////////////////////////////// - - -///////////////////////////////////////// -// ENUMS -///////////////////////////////////////// - -export const ClauseScalarFieldEnumSchema = z.enum(['key','value','udap_id','text','hidden']); - -export const Clause_v2ScalarFieldEnumSchema = z.enum(['id','key','value','position','udap_id','text']); - -export const DelegationScalarFieldEnumSchema = z.enum(['createdBy','delegatedTo']); - -export const Pdf_snapshotScalarFieldEnumSchema = z.enum(['id','report_id','html','report','user_id']); - -export const Picture_linesScalarFieldEnumSchema = z.enum(['id','pictureId','lines','createdAt']); - -export const PicturesScalarFieldEnumSchema = z.enum(['id','reportId','url','createdAt','finalUrl']); - -export const QueryModeSchema = z.enum(['default','insensitive']); - -export const ReportScalarFieldEnumSchema = z.enum(['id','title','projectDescription','redactedBy','meetDate','applicantName','applicantAddress','projectCadastralRef','projectSpaceType','decision','precisions','contacts','furtherInformation','createdBy','createdAt','serviceInstructeur','pdf','disabled','udap_id','redactedById','applicantEmail','city','zipCode']); - -export const Service_instructeursScalarFieldEnumSchema = z.enum(['id','full_name','short_name','email','tel','udap_id']); - -export const SortOrderSchema = z.enum(['asc','desc']); - -export const Tmp_picturesScalarFieldEnumSchema = z.enum(['id','reportId','createdAt']); - -export const TransactionIsolationLevelSchema = z.enum(['ReadUncommitted','ReadCommitted','RepeatableRead','Serializable']); - -export const UdapScalarFieldEnumSchema = z.enum(['id','department','completeCoords','visible','name','address','zipCode','city','phone','email','marianne_text','drac_text','udap_text']); - -export const UserScalarFieldEnumSchema = z.enum(['id','name','udap_id']); -///////////////////////////////////////// -// MODELS -///////////////////////////////////////// - -///////////////////////////////////////// -// CLAUSE SCHEMA -///////////////////////////////////////// - -export const ClauseSchema = z.object({ - key: z.string(), - value: z.string(), - udap_id: z.string(), - text: z.string(), - hidden: z.boolean().nullable(), -}) - -export type Clause = z.infer - -///////////////////////////////////////// -// CLAUSE V 2 SCHEMA -///////////////////////////////////////// - -export const Clause_v2Schema = z.object({ - id: z.string(), - key: z.string(), - value: z.string(), - position: z.number().int().gte(-2147483648).lte(2147483647).nullable(), - udap_id: z.string().nullable(), - text: z.string(), -}) - -export type Clause_v2 = z.infer - -///////////////////////////////////////// -// DELEGATION SCHEMA -///////////////////////////////////////// - -export const DelegationSchema = z.object({ - createdBy: z.string(), - delegatedTo: z.string(), -}) - -export type Delegation = z.infer - -///////////////////////////////////////// -// PDF SNAPSHOT SCHEMA -///////////////////////////////////////// - -export const Pdf_snapshotSchema = z.object({ - id: z.string(), - report_id: z.string().nullable(), - html: z.string().nullable(), - report: z.string().nullable(), - user_id: z.string().nullable(), -}) - -export type Pdf_snapshot = z.infer - -///////////////////////////////////////// -// PICTURE LINES SCHEMA -///////////////////////////////////////// - -export const Picture_linesSchema = z.object({ - id: z.string(), - pictureId: z.string().nullable(), - lines: z.string(), - createdAt: z.coerce.date().nullable(), -}) - -export type Picture_lines = z.infer - -///////////////////////////////////////// -// PICTURES SCHEMA -///////////////////////////////////////// - -export const PicturesSchema = z.object({ - id: z.string(), - reportId: z.string().nullable(), - url: z.string().nullable(), - createdAt: z.coerce.date().nullable(), - finalUrl: z.string().nullable(), -}) - -export type Pictures = z.infer - -///////////////////////////////////////// -// REPORT SCHEMA -///////////////////////////////////////// - -export const ReportSchema = z.object({ - id: z.string(), - title: z.string().nullable(), - projectDescription: z.string().nullable(), - redactedBy: z.string().nullable(), - meetDate: z.coerce.date().nullable(), - applicantName: z.string().nullable(), - applicantAddress: z.string().nullable(), - projectCadastralRef: z.string().nullable(), - projectSpaceType: z.string().nullable(), - decision: z.string().nullable(), - precisions: z.string().nullable(), - contacts: z.string().nullable(), - furtherInformation: z.string().nullable(), - createdBy: z.string(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().int().gte(-2147483648).lte(2147483647).nullable(), - pdf: z.string().nullable(), - disabled: z.boolean().nullable(), - udap_id: z.string().nullable(), - redactedById: z.string().nullable(), - applicantEmail: z.string().nullable(), - city: z.string().nullable(), - zipCode: z.string().nullable(), -}) - -export type Report = z.infer - -///////////////////////////////////////// -// SERVICE INSTRUCTEURS SCHEMA -///////////////////////////////////////// - -export const Service_instructeursSchema = z.object({ - id: z.number().int().gte(-2147483648).lte(2147483647), - full_name: z.string(), - short_name: z.string(), - email: z.string().nullable(), - tel: z.string().nullable(), - udap_id: z.string().nullable(), -}) - -export type Service_instructeurs = z.infer - -///////////////////////////////////////// -// TMP PICTURES SCHEMA -///////////////////////////////////////// - -export const Tmp_picturesSchema = z.object({ - id: z.string(), - reportId: z.string().nullable(), - createdAt: z.coerce.date().nullable(), -}) - -export type Tmp_pictures = z.infer - -///////////////////////////////////////// -// UDAP SCHEMA -///////////////////////////////////////// - -export const UdapSchema = z.object({ - id: z.string(), - department: z.string(), - completeCoords: z.string().nullable(), - visible: z.boolean().nullable(), - name: z.string().nullable(), - address: z.string().nullable(), - zipCode: z.string().nullable(), - city: z.string().nullable(), - phone: z.string().nullable(), - email: z.string().nullable(), - marianne_text: z.string().nullable(), - drac_text: z.string().nullable(), - udap_text: z.string().nullable(), -}) - -export type Udap = z.infer - -///////////////////////////////////////// -// USER SCHEMA -///////////////////////////////////////// - -export const UserSchema = z.object({ - id: z.string(), - name: z.string(), - udap_id: z.string(), -}) - -export type User = z.infer - -///////////////////////////////////////// -// SELECT & INCLUDE -///////////////////////////////////////// - -// CLAUSE -//------------------------------------------------------ - -export const ClauseSelectSchema: z.ZodType = z.object({ - key: z.boolean().optional(), - value: z.boolean().optional(), - udap_id: z.boolean().optional(), - text: z.boolean().optional(), - hidden: z.boolean().optional(), -}).strict() - -// CLAUSE V 2 -//------------------------------------------------------ - -export const Clause_v2SelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - key: z.boolean().optional(), - value: z.boolean().optional(), - position: z.boolean().optional(), - udap_id: z.boolean().optional(), - text: z.boolean().optional(), -}).strict() - -// DELEGATION -//------------------------------------------------------ - -export const DelegationIncludeSchema: z.ZodType = z.object({ - user_delegation_createdByTouser: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), - user_delegation_delegatedToTouser: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), -}).strict() - -export const DelegationArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => DelegationSelectSchema).optional(), - include: z.lazy(() => DelegationIncludeSchema).optional(), -}).strict(); - -export const DelegationSelectSchema: z.ZodType = z.object({ - createdBy: z.boolean().optional(), - delegatedTo: z.boolean().optional(), - user_delegation_createdByTouser: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), - user_delegation_delegatedToTouser: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), -}).strict() - -// PDF SNAPSHOT -//------------------------------------------------------ - -export const Pdf_snapshotSelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - report_id: z.boolean().optional(), - html: z.boolean().optional(), - report: z.boolean().optional(), - user_id: z.boolean().optional(), -}).strict() - -// PICTURE LINES -//------------------------------------------------------ - -export const Picture_linesSelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - pictureId: z.boolean().optional(), - lines: z.boolean().optional(), - createdAt: z.boolean().optional(), -}).strict() - -// PICTURES -//------------------------------------------------------ - -export const PicturesIncludeSchema: z.ZodType = z.object({ - report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), -}).strict() - -export const PicturesArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => PicturesSelectSchema).optional(), - include: z.lazy(() => PicturesIncludeSchema).optional(), -}).strict(); - -export const PicturesSelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - reportId: z.boolean().optional(), - url: z.boolean().optional(), - createdAt: z.boolean().optional(), - finalUrl: z.boolean().optional(), - report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), -}).strict() - -// REPORT -//------------------------------------------------------ - -export const ReportIncludeSchema: z.ZodType = z.object({ - pictures: z.union([z.boolean(),z.lazy(() => PicturesFindManyArgsSchema)]).optional(), - user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), - tmp_pictures: z.union([z.boolean(),z.lazy(() => Tmp_picturesFindManyArgsSchema)]).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({ - pictures: z.boolean().optional(), - tmp_pictures: z.boolean().optional(), -}).strict(); - -export const ReportSelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - title: z.boolean().optional(), - projectDescription: z.boolean().optional(), - redactedBy: z.boolean().optional(), - meetDate: z.boolean().optional(), - applicantName: z.boolean().optional(), - applicantAddress: z.boolean().optional(), - projectCadastralRef: z.boolean().optional(), - projectSpaceType: z.boolean().optional(), - decision: z.boolean().optional(), - precisions: z.boolean().optional(), - contacts: z.boolean().optional(), - furtherInformation: z.boolean().optional(), - createdBy: z.boolean().optional(), - createdAt: z.boolean().optional(), - serviceInstructeur: z.boolean().optional(), - pdf: z.boolean().optional(), - disabled: z.boolean().optional(), - udap_id: z.boolean().optional(), - redactedById: z.boolean().optional(), - applicantEmail: z.boolean().optional(), - city: z.boolean().optional(), - zipCode: z.boolean().optional(), - pictures: z.union([z.boolean(),z.lazy(() => PicturesFindManyArgsSchema)]).optional(), - user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), - tmp_pictures: z.union([z.boolean(),z.lazy(() => Tmp_picturesFindManyArgsSchema)]).optional(), - _count: z.union([z.boolean(),z.lazy(() => ReportCountOutputTypeArgsSchema)]).optional(), -}).strict() - -// SERVICE INSTRUCTEURS -//------------------------------------------------------ - -export const Service_instructeursSelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - full_name: z.boolean().optional(), - short_name: z.boolean().optional(), - email: z.boolean().optional(), - tel: z.boolean().optional(), - udap_id: z.boolean().optional(), -}).strict() - -// TMP PICTURES -//------------------------------------------------------ - -export const Tmp_picturesIncludeSchema: z.ZodType = z.object({ - report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), -}).strict() - -export const Tmp_picturesArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => Tmp_picturesSelectSchema).optional(), - include: z.lazy(() => Tmp_picturesIncludeSchema).optional(), -}).strict(); - -export const Tmp_picturesSelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - reportId: z.boolean().optional(), - createdAt: z.boolean().optional(), - report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), -}).strict() - -// UDAP -//------------------------------------------------------ - -export const UdapIncludeSchema: z.ZodType = z.object({ - user: z.union([z.boolean(),z.lazy(() => UserFindManyArgsSchema)]).optional(), - _count: z.union([z.boolean(),z.lazy(() => UdapCountOutputTypeArgsSchema)]).optional(), -}).strict() - -export const UdapArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => UdapSelectSchema).optional(), - include: z.lazy(() => UdapIncludeSchema).optional(), -}).strict(); - -export const UdapCountOutputTypeArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => UdapCountOutputTypeSelectSchema).nullish(), -}).strict(); - -export const UdapCountOutputTypeSelectSchema: z.ZodType = z.object({ - user: z.boolean().optional(), -}).strict(); - -export const UdapSelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - department: z.boolean().optional(), - completeCoords: z.boolean().optional(), - visible: z.boolean().optional(), - name: z.boolean().optional(), - address: z.boolean().optional(), - zipCode: z.boolean().optional(), - city: z.boolean().optional(), - phone: z.boolean().optional(), - email: z.boolean().optional(), - marianne_text: z.boolean().optional(), - drac_text: z.boolean().optional(), - udap_text: z.boolean().optional(), - user: z.union([z.boolean(),z.lazy(() => UserFindManyArgsSchema)]).optional(), - _count: z.union([z.boolean(),z.lazy(() => UdapCountOutputTypeArgsSchema)]).optional(), -}).strict() - -// USER -//------------------------------------------------------ - -export const UserIncludeSchema: z.ZodType = z.object({ - delegation_delegation_createdByTouser: z.union([z.boolean(),z.lazy(() => DelegationFindManyArgsSchema)]).optional(), - delegation_delegation_delegatedToTouser: z.union([z.boolean(),z.lazy(() => DelegationFindManyArgsSchema)]).optional(), - report: z.union([z.boolean(),z.lazy(() => ReportFindManyArgsSchema)]).optional(), - udap: z.union([z.boolean(),z.lazy(() => UdapArgsSchema)]).optional(), - _count: z.union([z.boolean(),z.lazy(() => UserCountOutputTypeArgsSchema)]).optional(), -}).strict() - -export const UserArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => UserSelectSchema).optional(), - include: z.lazy(() => UserIncludeSchema).optional(), -}).strict(); - -export const UserCountOutputTypeArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => UserCountOutputTypeSelectSchema).nullish(), -}).strict(); - -export const UserCountOutputTypeSelectSchema: z.ZodType = z.object({ - delegation_delegation_createdByTouser: z.boolean().optional(), - delegation_delegation_delegatedToTouser: z.boolean().optional(), - report: z.boolean().optional(), -}).strict(); - -export const UserSelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - name: z.boolean().optional(), - udap_id: z.boolean().optional(), - delegation_delegation_createdByTouser: z.union([z.boolean(),z.lazy(() => DelegationFindManyArgsSchema)]).optional(), - delegation_delegation_delegatedToTouser: z.union([z.boolean(),z.lazy(() => DelegationFindManyArgsSchema)]).optional(), - report: z.union([z.boolean(),z.lazy(() => ReportFindManyArgsSchema)]).optional(), - udap: z.union([z.boolean(),z.lazy(() => UdapArgsSchema)]).optional(), - _count: z.union([z.boolean(),z.lazy(() => UserCountOutputTypeArgsSchema)]).optional(), -}).strict() - - -///////////////////////////////////////// -// INPUT TYPES -///////////////////////////////////////// - -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(), - key: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - value: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - udap_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - text: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - hidden: z.union([ z.lazy(() => BoolNullableFilterSchema),z.boolean() ]).optional().nullable(), -}).strict(); - -export const ClauseOrderByWithRelationInputSchema: z.ZodType = z.object({ - key: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - text: z.lazy(() => SortOrderSchema).optional(), - hidden: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ClauseWhereUniqueInputSchema: z.ZodType = z.object({ - key_value_udap_id: z.lazy(() => ClauseKeyValueUdap_idCompoundUniqueInputSchema).optional() -}).strict(); - -export const ClauseOrderByWithAggregationInputSchema: z.ZodType = z.object({ - key: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - text: z.lazy(() => SortOrderSchema).optional(), - hidden: 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(), - key: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - value: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - udap_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - text: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - hidden: z.union([ z.lazy(() => BoolNullableWithAggregatesFilterSchema),z.boolean() ]).optional().nullable(), -}).strict(); - -export const Clause_v2WhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Clause_v2WhereInputSchema),z.lazy(() => Clause_v2WhereInputSchema).array() ]).optional(), - OR: z.lazy(() => Clause_v2WhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Clause_v2WhereInputSchema),z.lazy(() => Clause_v2WhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - key: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - value: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - position: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), - udap_id: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - text: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), -}).strict(); - -export const Clause_v2OrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - key: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - position: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - text: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Clause_v2WhereUniqueInputSchema: z.ZodType = z.object({ - id: z.string().optional() -}).strict(); - -export const Clause_v2OrderByWithAggregationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - key: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - position: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - text: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => Clause_v2CountOrderByAggregateInputSchema).optional(), - _avg: z.lazy(() => Clause_v2AvgOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => Clause_v2MaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => Clause_v2MinOrderByAggregateInputSchema).optional(), - _sum: z.lazy(() => Clause_v2SumOrderByAggregateInputSchema).optional() -}).strict(); - -export const Clause_v2ScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Clause_v2ScalarWhereWithAggregatesInputSchema),z.lazy(() => Clause_v2ScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => Clause_v2ScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Clause_v2ScalarWhereWithAggregatesInputSchema),z.lazy(() => Clause_v2ScalarWhereWithAggregatesInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - key: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - value: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - position: z.union([ z.lazy(() => IntNullableWithAggregatesFilterSchema),z.number() ]).optional().nullable(), - udap_id: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - text: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), -}).strict(); - -export const DelegationWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => DelegationWhereInputSchema),z.lazy(() => DelegationWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => DelegationWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => DelegationWhereInputSchema),z.lazy(() => DelegationWhereInputSchema).array() ]).optional(), - createdBy: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - delegatedTo: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - user_delegation_createdByTouser: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), - user_delegation_delegatedToTouser: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), -}).strict(); - -export const DelegationOrderByWithRelationInputSchema: z.ZodType = z.object({ - createdBy: z.lazy(() => SortOrderSchema).optional(), - delegatedTo: z.lazy(() => SortOrderSchema).optional(), - user_delegation_createdByTouser: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), - user_delegation_delegatedToTouser: z.lazy(() => UserOrderByWithRelationInputSchema).optional() -}).strict(); - -export const DelegationWhereUniqueInputSchema: z.ZodType = z.object({ - createdBy_delegatedTo: z.lazy(() => DelegationCreatedByDelegatedToCompoundUniqueInputSchema).optional() -}).strict(); - -export const DelegationOrderByWithAggregationInputSchema: z.ZodType = z.object({ - createdBy: z.lazy(() => SortOrderSchema).optional(), - delegatedTo: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => DelegationCountOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => DelegationMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => DelegationMinOrderByAggregateInputSchema).optional() -}).strict(); - -export const DelegationScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => DelegationScalarWhereWithAggregatesInputSchema),z.lazy(() => DelegationScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => DelegationScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => DelegationScalarWhereWithAggregatesInputSchema),z.lazy(() => DelegationScalarWhereWithAggregatesInputSchema).array() ]).optional(), - createdBy: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - delegatedTo: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), -}).strict(); - -export const Pdf_snapshotWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Pdf_snapshotWhereInputSchema),z.lazy(() => Pdf_snapshotWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => Pdf_snapshotWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Pdf_snapshotWhereInputSchema),z.lazy(() => Pdf_snapshotWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - report_id: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - html: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - report: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - user_id: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), -}).strict(); - -export const Pdf_snapshotOrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - report_id: z.lazy(() => SortOrderSchema).optional(), - html: z.lazy(() => SortOrderSchema).optional(), - report: z.lazy(() => SortOrderSchema).optional(), - user_id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Pdf_snapshotWhereUniqueInputSchema: z.ZodType = z.object({ - id: z.string().optional() -}).strict(); - -export const Pdf_snapshotOrderByWithAggregationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - report_id: z.lazy(() => SortOrderSchema).optional(), - html: z.lazy(() => SortOrderSchema).optional(), - report: z.lazy(() => SortOrderSchema).optional(), - user_id: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => Pdf_snapshotCountOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => Pdf_snapshotMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => Pdf_snapshotMinOrderByAggregateInputSchema).optional() -}).strict(); - -export const Pdf_snapshotScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Pdf_snapshotScalarWhereWithAggregatesInputSchema),z.lazy(() => Pdf_snapshotScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => Pdf_snapshotScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Pdf_snapshotScalarWhereWithAggregatesInputSchema),z.lazy(() => Pdf_snapshotScalarWhereWithAggregatesInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - report_id: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - html: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - report: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - user_id: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), -}).strict(); - -export const Picture_linesWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Picture_linesWhereInputSchema),z.lazy(() => Picture_linesWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => Picture_linesWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Picture_linesWhereInputSchema),z.lazy(() => Picture_linesWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - pictureId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - lines: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - createdAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), -}).strict(); - -export const Picture_linesOrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - pictureId: z.lazy(() => SortOrderSchema).optional(), - lines: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Picture_linesWhereUniqueInputSchema: z.ZodType = z.object({ - id: z.string().optional() -}).strict(); - -export const Picture_linesOrderByWithAggregationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - pictureId: z.lazy(() => SortOrderSchema).optional(), - lines: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => Picture_linesCountOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => Picture_linesMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => Picture_linesMinOrderByAggregateInputSchema).optional() -}).strict(); - -export const Picture_linesScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Picture_linesScalarWhereWithAggregatesInputSchema),z.lazy(() => Picture_linesScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => Picture_linesScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Picture_linesScalarWhereWithAggregatesInputSchema),z.lazy(() => Picture_linesScalarWhereWithAggregatesInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - pictureId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - lines: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - createdAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), -}).strict(); - -export const PicturesWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => PicturesWhereInputSchema),z.lazy(() => PicturesWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => PicturesWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => PicturesWhereInputSchema),z.lazy(() => PicturesWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - reportId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - url: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - createdAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), - finalUrl: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - report: z.union([ z.lazy(() => ReportRelationFilterSchema),z.lazy(() => ReportWhereInputSchema) ]).optional().nullable(), -}).strict(); - -export const PicturesOrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - url: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - finalUrl: z.lazy(() => SortOrderSchema).optional(), - report: z.lazy(() => ReportOrderByWithRelationInputSchema).optional() -}).strict(); - -export const PicturesWhereUniqueInputSchema: z.ZodType = z.object({ - id: z.string().optional() -}).strict(); - -export const PicturesOrderByWithAggregationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - url: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - finalUrl: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => PicturesCountOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => PicturesMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => PicturesMinOrderByAggregateInputSchema).optional() -}).strict(); - -export const PicturesScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => PicturesScalarWhereWithAggregatesInputSchema),z.lazy(() => PicturesScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => PicturesScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => PicturesScalarWhereWithAggregatesInputSchema),z.lazy(() => PicturesScalarWhereWithAggregatesInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - reportId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - url: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - createdAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), - finalUrl: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), -}).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(), - projectDescription: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - redactedBy: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - meetDate: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), - applicantName: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - applicantAddress: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - projectCadastralRef: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - createdBy: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), - serviceInstructeur: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), - pdf: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - disabled: z.union([ z.lazy(() => BoolNullableFilterSchema),z.boolean() ]).optional().nullable(), - udap_id: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - redactedById: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - applicantEmail: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - city: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - zipCode: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - pictures: z.lazy(() => PicturesListRelationFilterSchema).optional(), - user: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), - tmp_pictures: z.lazy(() => Tmp_picturesListRelationFilterSchema).optional() -}).strict(); - -export const ReportOrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - title: z.lazy(() => SortOrderSchema).optional(), - projectDescription: z.lazy(() => SortOrderSchema).optional(), - redactedBy: z.lazy(() => SortOrderSchema).optional(), - meetDate: z.lazy(() => SortOrderSchema).optional(), - applicantName: z.lazy(() => SortOrderSchema).optional(), - applicantAddress: z.lazy(() => SortOrderSchema).optional(), - projectCadastralRef: z.lazy(() => SortOrderSchema).optional(), - projectSpaceType: z.lazy(() => SortOrderSchema).optional(), - decision: z.lazy(() => SortOrderSchema).optional(), - precisions: z.lazy(() => SortOrderSchema).optional(), - contacts: z.lazy(() => SortOrderSchema).optional(), - furtherInformation: z.lazy(() => SortOrderSchema).optional(), - createdBy: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - serviceInstructeur: z.lazy(() => SortOrderSchema).optional(), - pdf: z.lazy(() => SortOrderSchema).optional(), - disabled: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - redactedById: z.lazy(() => SortOrderSchema).optional(), - applicantEmail: z.lazy(() => SortOrderSchema).optional(), - city: z.lazy(() => SortOrderSchema).optional(), - zipCode: z.lazy(() => SortOrderSchema).optional(), - pictures: z.lazy(() => PicturesOrderByRelationAggregateInputSchema).optional(), - user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), - tmp_pictures: z.lazy(() => Tmp_picturesOrderByRelationAggregateInputSchema).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(), - projectDescription: z.lazy(() => SortOrderSchema).optional(), - redactedBy: z.lazy(() => SortOrderSchema).optional(), - meetDate: z.lazy(() => SortOrderSchema).optional(), - applicantName: z.lazy(() => SortOrderSchema).optional(), - applicantAddress: z.lazy(() => SortOrderSchema).optional(), - projectCadastralRef: z.lazy(() => SortOrderSchema).optional(), - projectSpaceType: z.lazy(() => SortOrderSchema).optional(), - decision: z.lazy(() => SortOrderSchema).optional(), - precisions: z.lazy(() => SortOrderSchema).optional(), - contacts: z.lazy(() => SortOrderSchema).optional(), - furtherInformation: z.lazy(() => SortOrderSchema).optional(), - createdBy: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - serviceInstructeur: z.lazy(() => SortOrderSchema).optional(), - pdf: z.lazy(() => SortOrderSchema).optional(), - disabled: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - redactedById: z.lazy(() => SortOrderSchema).optional(), - applicantEmail: z.lazy(() => SortOrderSchema).optional(), - city: z.lazy(() => SortOrderSchema).optional(), - zipCode: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => ReportCountOrderByAggregateInputSchema).optional(), - _avg: z.lazy(() => ReportAvgOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => ReportMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => ReportMinOrderByAggregateInputSchema).optional(), - _sum: z.lazy(() => ReportSumOrderByAggregateInputSchema).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(), - projectDescription: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - redactedBy: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - meetDate: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), - applicantName: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - applicantAddress: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - projectCadastralRef: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - createdBy: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), - serviceInstructeur: z.union([ z.lazy(() => IntNullableWithAggregatesFilterSchema),z.number() ]).optional().nullable(), - pdf: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - disabled: z.union([ z.lazy(() => BoolNullableWithAggregatesFilterSchema),z.boolean() ]).optional().nullable(), - udap_id: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - redactedById: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - applicantEmail: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - city: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - zipCode: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), -}).strict(); - -export const Service_instructeursWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Service_instructeursWhereInputSchema),z.lazy(() => Service_instructeursWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => Service_instructeursWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Service_instructeursWhereInputSchema),z.lazy(() => Service_instructeursWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), - full_name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - short_name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - email: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - tel: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - udap_id: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), -}).strict(); - -export const Service_instructeursOrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - full_name: z.lazy(() => SortOrderSchema).optional(), - short_name: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - tel: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Service_instructeursWhereUniqueInputSchema: z.ZodType = z.object({ - id: z.number().int().gte(-2147483648).lte(2147483647).optional() -}).strict(); - -export const Service_instructeursOrderByWithAggregationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - full_name: z.lazy(() => SortOrderSchema).optional(), - short_name: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - tel: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => Service_instructeursCountOrderByAggregateInputSchema).optional(), - _avg: z.lazy(() => Service_instructeursAvgOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => Service_instructeursMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => Service_instructeursMinOrderByAggregateInputSchema).optional(), - _sum: z.lazy(() => Service_instructeursSumOrderByAggregateInputSchema).optional() -}).strict(); - -export const Service_instructeursScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Service_instructeursScalarWhereWithAggregatesInputSchema),z.lazy(() => Service_instructeursScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => Service_instructeursScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Service_instructeursScalarWhereWithAggregatesInputSchema),z.lazy(() => Service_instructeursScalarWhereWithAggregatesInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => IntWithAggregatesFilterSchema),z.number() ]).optional(), - full_name: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - short_name: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - email: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - tel: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - udap_id: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), -}).strict(); - -export const Tmp_picturesWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Tmp_picturesWhereInputSchema),z.lazy(() => Tmp_picturesWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => Tmp_picturesWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Tmp_picturesWhereInputSchema),z.lazy(() => Tmp_picturesWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - reportId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - createdAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), - report: z.union([ z.lazy(() => ReportRelationFilterSchema),z.lazy(() => ReportWhereInputSchema) ]).optional().nullable(), -}).strict(); - -export const Tmp_picturesOrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - report: z.lazy(() => ReportOrderByWithRelationInputSchema).optional() -}).strict(); - -export const Tmp_picturesWhereUniqueInputSchema: z.ZodType = z.object({ - id: z.string().optional() -}).strict(); - -export const Tmp_picturesOrderByWithAggregationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => Tmp_picturesCountOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => Tmp_picturesMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => Tmp_picturesMinOrderByAggregateInputSchema).optional() -}).strict(); - -export const Tmp_picturesScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Tmp_picturesScalarWhereWithAggregatesInputSchema),z.lazy(() => Tmp_picturesScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => Tmp_picturesScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Tmp_picturesScalarWhereWithAggregatesInputSchema),z.lazy(() => Tmp_picturesScalarWhereWithAggregatesInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - reportId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - createdAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), -}).strict(); - -export const UdapWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => UdapWhereInputSchema),z.lazy(() => UdapWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => UdapWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => UdapWhereInputSchema),z.lazy(() => UdapWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - department: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - completeCoords: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - visible: z.union([ z.lazy(() => BoolNullableFilterSchema),z.boolean() ]).optional().nullable(), - name: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - address: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - zipCode: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - city: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - phone: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - email: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - marianne_text: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - drac_text: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - udap_text: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - user: z.lazy(() => UserListRelationFilterSchema).optional() -}).strict(); - -export const UdapOrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - department: z.lazy(() => SortOrderSchema).optional(), - completeCoords: z.lazy(() => SortOrderSchema).optional(), - visible: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional(), - address: z.lazy(() => SortOrderSchema).optional(), - zipCode: z.lazy(() => SortOrderSchema).optional(), - city: z.lazy(() => SortOrderSchema).optional(), - phone: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - marianne_text: z.lazy(() => SortOrderSchema).optional(), - drac_text: z.lazy(() => SortOrderSchema).optional(), - udap_text: z.lazy(() => SortOrderSchema).optional(), - user: z.lazy(() => UserOrderByRelationAggregateInputSchema).optional() -}).strict(); - -export const UdapWhereUniqueInputSchema: z.ZodType = z.object({ - id: z.string().optional() -}).strict(); - -export const UdapOrderByWithAggregationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - department: z.lazy(() => SortOrderSchema).optional(), - completeCoords: z.lazy(() => SortOrderSchema).optional(), - visible: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional(), - address: z.lazy(() => SortOrderSchema).optional(), - zipCode: z.lazy(() => SortOrderSchema).optional(), - city: z.lazy(() => SortOrderSchema).optional(), - phone: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - marianne_text: z.lazy(() => SortOrderSchema).optional(), - drac_text: z.lazy(() => SortOrderSchema).optional(), - udap_text: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => UdapCountOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => UdapMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => UdapMinOrderByAggregateInputSchema).optional() -}).strict(); - -export const UdapScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => UdapScalarWhereWithAggregatesInputSchema),z.lazy(() => UdapScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => UdapScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => UdapScalarWhereWithAggregatesInputSchema),z.lazy(() => UdapScalarWhereWithAggregatesInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - department: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - completeCoords: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - visible: z.union([ z.lazy(() => BoolNullableWithAggregatesFilterSchema),z.boolean() ]).optional().nullable(), - name: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - address: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - zipCode: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - city: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - phone: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - email: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - marianne_text: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - drac_text: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), - udap_text: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), -}).strict(); - -export const UserWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => UserWhereInputSchema),z.lazy(() => UserWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => UserWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => UserWhereInputSchema),z.lazy(() => UserWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - udap_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationListRelationFilterSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationListRelationFilterSchema).optional(), - report: z.lazy(() => ReportListRelationFilterSchema).optional(), - udap: z.union([ z.lazy(() => UdapRelationFilterSchema),z.lazy(() => UdapWhereInputSchema) ]).optional(), -}).strict(); - -export const UserOrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationOrderByRelationAggregateInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationOrderByRelationAggregateInputSchema).optional(), - report: z.lazy(() => ReportOrderByRelationAggregateInputSchema).optional(), - udap: z.lazy(() => UdapOrderByWithRelationInputSchema).optional() -}).strict(); - -export const UserWhereUniqueInputSchema: z.ZodType = z.object({ - id: z.string().optional() -}).strict(); - -export const UserOrderByWithAggregationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => UserCountOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => UserMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => UserMinOrderByAggregateInputSchema).optional() -}).strict(); - -export const UserScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => UserScalarWhereWithAggregatesInputSchema),z.lazy(() => UserScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => UserScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => UserScalarWhereWithAggregatesInputSchema),z.lazy(() => UserScalarWhereWithAggregatesInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - name: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - udap_id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), -}).strict(); - -export const ClauseCreateInputSchema: z.ZodType = z.object({ - key: z.string(), - value: z.string(), - udap_id: z.string(), - text: z.string(), - hidden: z.boolean().optional().nullable() -}).strict(); - -export const ClauseUncheckedCreateInputSchema: z.ZodType = z.object({ - key: z.string(), - value: z.string(), - udap_id: z.string(), - text: z.string(), - hidden: z.boolean().optional().nullable() -}).strict(); - -export const ClauseUpdateInputSchema: z.ZodType = z.object({ - key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - udap_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - text: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - hidden: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const ClauseUncheckedUpdateInputSchema: z.ZodType = z.object({ - key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - udap_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - text: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - hidden: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const ClauseCreateManyInputSchema: z.ZodType = z.object({ - key: z.string(), - value: z.string(), - udap_id: z.string(), - text: z.string(), - hidden: z.boolean().optional().nullable() -}).strict(); - -export const ClauseUpdateManyMutationInputSchema: z.ZodType = z.object({ - key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - udap_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - text: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - hidden: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const ClauseUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - udap_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - text: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - hidden: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Clause_v2CreateInputSchema: z.ZodType = z.object({ - id: z.string(), - key: z.string(), - value: z.string(), - position: z.number().int().gte(-2147483648).lte(2147483647).optional().nullable(), - udap_id: z.string().optional().nullable(), - text: z.string() -}).strict(); - -export const Clause_v2UncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - key: z.string(), - value: z.string(), - position: z.number().int().gte(-2147483648).lte(2147483647).optional().nullable(), - udap_id: z.string().optional().nullable(), - text: z.string() -}).strict(); - -export const Clause_v2UpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - position: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - text: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const Clause_v2UncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - position: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - text: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const Clause_v2CreateManyInputSchema: z.ZodType = z.object({ - id: z.string(), - key: z.string(), - value: z.string(), - position: z.number().int().gte(-2147483648).lte(2147483647).optional().nullable(), - udap_id: z.string().optional().nullable(), - text: z.string() -}).strict(); - -export const Clause_v2UpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - position: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - text: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const Clause_v2UncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - key: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - position: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - text: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const DelegationCreateInputSchema: z.ZodType = z.object({ - user_delegation_createdByTouser: z.lazy(() => UserCreateNestedOneWithoutDelegation_delegation_createdByTouserInputSchema), - user_delegation_delegatedToTouser: z.lazy(() => UserCreateNestedOneWithoutDelegation_delegation_delegatedToTouserInputSchema) -}).strict(); - -export const DelegationUncheckedCreateInputSchema: z.ZodType = z.object({ - createdBy: z.string(), - delegatedTo: z.string() -}).strict(); - -export const DelegationUpdateInputSchema: z.ZodType = z.object({ - user_delegation_createdByTouser: z.lazy(() => UserUpdateOneRequiredWithoutDelegation_delegation_createdByTouserNestedInputSchema).optional(), - user_delegation_delegatedToTouser: z.lazy(() => UserUpdateOneRequiredWithoutDelegation_delegation_delegatedToTouserNestedInputSchema).optional() -}).strict(); - -export const DelegationUncheckedUpdateInputSchema: z.ZodType = z.object({ - createdBy: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegatedTo: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const DelegationCreateManyInputSchema: z.ZodType = z.object({ - createdBy: z.string(), - delegatedTo: z.string() -}).strict(); - -export const DelegationUpdateManyMutationInputSchema: z.ZodType = z.object({ -}).strict(); - -export const DelegationUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - createdBy: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegatedTo: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const Pdf_snapshotCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - report_id: z.string().optional().nullable(), - html: z.string().optional().nullable(), - report: z.string().optional().nullable(), - user_id: z.string().optional().nullable() -}).strict(); - -export const Pdf_snapshotUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - report_id: z.string().optional().nullable(), - html: z.string().optional().nullable(), - report: z.string().optional().nullable(), - user_id: z.string().optional().nullable() -}).strict(); - -export const Pdf_snapshotUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - report_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - html: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - report: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - user_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Pdf_snapshotUncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - report_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - html: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - report: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - user_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Pdf_snapshotCreateManyInputSchema: z.ZodType = z.object({ - id: z.string(), - report_id: z.string().optional().nullable(), - html: z.string().optional().nullable(), - report: z.string().optional().nullable(), - user_id: z.string().optional().nullable() -}).strict(); - -export const Pdf_snapshotUpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - report_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - html: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - report: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - user_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Pdf_snapshotUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - report_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - html: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - report: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - user_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Picture_linesCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - pictureId: z.string().optional().nullable(), - lines: z.string(), - createdAt: z.coerce.date().optional().nullable() -}).strict(); - -export const Picture_linesUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - pictureId: z.string().optional().nullable(), - lines: z.string(), - createdAt: z.coerce.date().optional().nullable() -}).strict(); - -export const Picture_linesUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - pictureId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - lines: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Picture_linesUncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - pictureId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - lines: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Picture_linesCreateManyInputSchema: z.ZodType = z.object({ - id: z.string(), - pictureId: z.string().optional().nullable(), - lines: z.string(), - createdAt: z.coerce.date().optional().nullable() -}).strict(); - -export const Picture_linesUpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - pictureId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - lines: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Picture_linesUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - pictureId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - lines: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const PicturesCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - url: z.string().optional().nullable(), - createdAt: z.coerce.date().optional().nullable(), - finalUrl: z.string().optional().nullable(), - report: z.lazy(() => ReportCreateNestedOneWithoutPicturesInputSchema).optional() -}).strict(); - -export const PicturesUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - reportId: z.string().optional().nullable(), - url: z.string().optional().nullable(), - createdAt: z.coerce.date().optional().nullable(), - finalUrl: z.string().optional().nullable() -}).strict(); - -export const PicturesUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - url: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - finalUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - report: z.lazy(() => ReportUpdateOneWithoutPicturesNestedInputSchema).optional() -}).strict(); - -export const PicturesUncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - reportId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - url: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - finalUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const PicturesCreateManyInputSchema: z.ZodType = z.object({ - id: z.string(), - reportId: z.string().optional().nullable(), - url: z.string().optional().nullable(), - createdAt: z.coerce.date().optional().nullable(), - finalUrl: z.string().optional().nullable() -}).strict(); - -export const PicturesUpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - url: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - finalUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const PicturesUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - reportId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - url: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - finalUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const ReportCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - projectDescription: z.string().optional().nullable(), - redactedBy: z.string().optional().nullable(), - meetDate: z.coerce.date().optional().nullable(), - applicantName: z.string().optional().nullable(), - applicantAddress: z.string().optional().nullable(), - projectCadastralRef: z.string().optional().nullable(), - projectSpaceType: z.string().optional().nullable(), - decision: z.string().optional().nullable(), - precisions: z.string().optional().nullable(), - contacts: z.string().optional().nullable(), - furtherInformation: z.string().optional().nullable(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().int().gte(-2147483648).lte(2147483647).optional().nullable(), - pdf: z.string().optional().nullable(), - disabled: z.boolean().optional().nullable(), - udap_id: z.string().optional().nullable(), - redactedById: z.string().optional().nullable(), - applicantEmail: z.string().optional().nullable(), - city: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - pictures: z.lazy(() => PicturesCreateNestedManyWithoutReportInputSchema).optional(), - user: z.lazy(() => UserCreateNestedOneWithoutReportInputSchema), - tmp_pictures: z.lazy(() => Tmp_picturesCreateNestedManyWithoutReportInputSchema).optional() -}).strict(); - -export const ReportUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - projectDescription: z.string().optional().nullable(), - redactedBy: z.string().optional().nullable(), - meetDate: z.coerce.date().optional().nullable(), - applicantName: z.string().optional().nullable(), - applicantAddress: z.string().optional().nullable(), - projectCadastralRef: z.string().optional().nullable(), - projectSpaceType: z.string().optional().nullable(), - decision: z.string().optional().nullable(), - precisions: z.string().optional().nullable(), - contacts: z.string().optional().nullable(), - furtherInformation: z.string().optional().nullable(), - createdBy: z.string(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().int().gte(-2147483648).lte(2147483647).optional().nullable(), - pdf: z.string().optional().nullable(), - disabled: z.boolean().optional().nullable(), - udap_id: z.string().optional().nullable(), - redactedById: z.string().optional().nullable(), - applicantEmail: z.string().optional().nullable(), - city: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - pictures: z.lazy(() => PicturesUncheckedCreateNestedManyWithoutReportInputSchema).optional(), - tmp_pictures: z.lazy(() => Tmp_picturesUncheckedCreateNestedManyWithoutReportInputSchema).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(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pictures: z.lazy(() => PicturesUpdateManyWithoutReportNestedInputSchema).optional(), - user: z.lazy(() => UserUpdateOneRequiredWithoutReportNestedInputSchema).optional(), - tmp_pictures: z.lazy(() => Tmp_picturesUpdateManyWithoutReportNestedInputSchema).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(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdBy: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pictures: z.lazy(() => PicturesUncheckedUpdateManyWithoutReportNestedInputSchema).optional(), - tmp_pictures: z.lazy(() => Tmp_picturesUncheckedUpdateManyWithoutReportNestedInputSchema).optional() -}).strict(); - -export const ReportCreateManyInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - projectDescription: z.string().optional().nullable(), - redactedBy: z.string().optional().nullable(), - meetDate: z.coerce.date().optional().nullable(), - applicantName: z.string().optional().nullable(), - applicantAddress: z.string().optional().nullable(), - projectCadastralRef: z.string().optional().nullable(), - projectSpaceType: z.string().optional().nullable(), - decision: z.string().optional().nullable(), - precisions: z.string().optional().nullable(), - contacts: z.string().optional().nullable(), - furtherInformation: z.string().optional().nullable(), - createdBy: z.string(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().int().gte(-2147483648).lte(2147483647).optional().nullable(), - pdf: z.string().optional().nullable(), - disabled: z.boolean().optional().nullable(), - udap_id: z.string().optional().nullable(), - redactedById: z.string().optional().nullable(), - applicantEmail: z.string().optional().nullable(), - city: z.string().optional().nullable(), - zipCode: 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(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: 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(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdBy: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Service_instructeursCreateInputSchema: z.ZodType = z.object({ - id: z.number().int().gte(-2147483648).lte(2147483647), - full_name: z.string(), - short_name: z.string(), - email: z.string().optional().nullable(), - tel: z.string().optional().nullable(), - udap_id: z.string().optional().nullable() -}).strict(); - -export const Service_instructeursUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.number().int().gte(-2147483648).lte(2147483647), - full_name: z.string(), - short_name: z.string(), - email: z.string().optional().nullable(), - tel: z.string().optional().nullable(), - udap_id: z.string().optional().nullable() -}).strict(); - -export const Service_instructeursUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - full_name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - short_name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - tel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Service_instructeursUncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - full_name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - short_name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - tel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Service_instructeursCreateManyInputSchema: z.ZodType = z.object({ - id: z.number().int().gte(-2147483648).lte(2147483647), - full_name: z.string(), - short_name: z.string(), - email: z.string().optional().nullable(), - tel: z.string().optional().nullable(), - udap_id: z.string().optional().nullable() -}).strict(); - -export const Service_instructeursUpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - full_name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - short_name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - tel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Service_instructeursUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), - full_name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - short_name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - tel: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Tmp_picturesCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - createdAt: z.coerce.date().optional().nullable(), - report: z.lazy(() => ReportCreateNestedOneWithoutTmp_picturesInputSchema).optional() -}).strict(); - -export const Tmp_picturesUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - reportId: z.string().optional().nullable(), - createdAt: z.coerce.date().optional().nullable() -}).strict(); - -export const Tmp_picturesUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - report: z.lazy(() => ReportUpdateOneWithoutTmp_picturesNestedInputSchema).optional() -}).strict(); - -export const Tmp_picturesUncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - reportId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Tmp_picturesCreateManyInputSchema: z.ZodType = z.object({ - id: z.string(), - reportId: z.string().optional().nullable(), - createdAt: z.coerce.date().optional().nullable() -}).strict(); - -export const Tmp_picturesUpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Tmp_picturesUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - reportId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const UdapCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - department: z.string(), - completeCoords: z.string().optional().nullable(), - visible: z.boolean().optional().nullable(), - name: z.string().optional().nullable(), - address: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - city: z.string().optional().nullable(), - phone: z.string().optional().nullable(), - email: z.string().optional().nullable(), - marianne_text: z.string().optional().nullable(), - drac_text: z.string().optional().nullable(), - udap_text: z.string().optional().nullable(), - user: z.lazy(() => UserCreateNestedManyWithoutUdapInputSchema).optional() -}).strict(); - -export const UdapUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - department: z.string(), - completeCoords: z.string().optional().nullable(), - visible: z.boolean().optional().nullable(), - name: z.string().optional().nullable(), - address: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - city: z.string().optional().nullable(), - phone: z.string().optional().nullable(), - email: z.string().optional().nullable(), - marianne_text: z.string().optional().nullable(), - drac_text: z.string().optional().nullable(), - udap_text: z.string().optional().nullable(), - user: z.lazy(() => UserUncheckedCreateNestedManyWithoutUdapInputSchema).optional() -}).strict(); - -export const UdapUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - department: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - completeCoords: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - visible: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - phone: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - marianne_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - drac_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - user: z.lazy(() => UserUpdateManyWithoutUdapNestedInputSchema).optional() -}).strict(); - -export const UdapUncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - department: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - completeCoords: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - visible: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - phone: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - marianne_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - drac_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - user: z.lazy(() => UserUncheckedUpdateManyWithoutUdapNestedInputSchema).optional() -}).strict(); - -export const UdapCreateManyInputSchema: z.ZodType = z.object({ - id: z.string(), - department: z.string(), - completeCoords: z.string().optional().nullable(), - visible: z.boolean().optional().nullable(), - name: z.string().optional().nullable(), - address: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - city: z.string().optional().nullable(), - phone: z.string().optional().nullable(), - email: z.string().optional().nullable(), - marianne_text: z.string().optional().nullable(), - drac_text: z.string().optional().nullable(), - udap_text: z.string().optional().nullable() -}).strict(); - -export const UdapUpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - department: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - completeCoords: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - visible: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - phone: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - marianne_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - drac_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const UdapUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - department: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - completeCoords: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - visible: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - phone: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - marianne_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - drac_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const UserCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationCreateNestedManyWithoutUser_delegation_createdByTouserInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationCreateNestedManyWithoutUser_delegation_delegatedToTouserInputSchema).optional(), - report: z.lazy(() => ReportCreateNestedManyWithoutUserInputSchema).optional(), - udap: z.lazy(() => UdapCreateNestedOneWithoutUserInputSchema) -}).strict(); - -export const UserUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - udap_id: z.string(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUncheckedCreateNestedManyWithoutUser_delegation_createdByTouserInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUncheckedCreateNestedManyWithoutUser_delegation_delegatedToTouserInputSchema).optional(), - report: z.lazy(() => ReportUncheckedCreateNestedManyWithoutUserInputSchema).optional() -}).strict(); - -export const UserUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUpdateManyWithoutUser_delegation_createdByTouserNestedInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema).optional(), - report: z.lazy(() => ReportUpdateManyWithoutUserNestedInputSchema).optional(), - udap: z.lazy(() => UdapUpdateOneRequiredWithoutUserNestedInputSchema).optional() -}).strict(); - -export const UserUncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - udap_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUncheckedUpdateManyWithoutUser_delegation_createdByTouserNestedInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema).optional(), - report: z.lazy(() => ReportUncheckedUpdateManyWithoutUserNestedInputSchema).optional() -}).strict(); - -export const UserCreateManyInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - udap_id: z.string() -}).strict(); - -export const UserUpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const UserUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - udap_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 BoolNullableFilterSchema: z.ZodType = z.object({ - equals: z.boolean().optional().nullable(), - not: z.union([ z.boolean(),z.lazy(() => NestedBoolNullableFilterSchema) ]).optional().nullable(), -}).strict(); - -export const ClauseKeyValueUdap_idCompoundUniqueInputSchema: z.ZodType = z.object({ - key: z.string(), - value: z.string(), - udap_id: z.string() -}).strict(); - -export const ClauseCountOrderByAggregateInputSchema: z.ZodType = z.object({ - key: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - text: z.lazy(() => SortOrderSchema).optional(), - hidden: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ClauseMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - key: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - text: z.lazy(() => SortOrderSchema).optional(), - hidden: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ClauseMinOrderByAggregateInputSchema: z.ZodType = z.object({ - key: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - text: z.lazy(() => SortOrderSchema).optional(), - hidden: 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 BoolNullableWithAggregatesFilterSchema: z.ZodType = z.object({ - equals: z.boolean().optional().nullable(), - not: z.union([ z.boolean(),z.lazy(() => NestedBoolNullableWithAggregatesFilterSchema) ]).optional().nullable(), - _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), - _min: z.lazy(() => NestedBoolNullableFilterSchema).optional(), - _max: z.lazy(() => NestedBoolNullableFilterSchema).optional() -}).strict(); - -export const IntNullableFilterSchema: 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 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 Clause_v2CountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - key: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - position: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - text: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Clause_v2AvgOrderByAggregateInputSchema: z.ZodType = z.object({ - position: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Clause_v2MaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - key: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - position: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - text: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Clause_v2MinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - key: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - position: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - text: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Clause_v2SumOrderByAggregateInputSchema: z.ZodType = z.object({ - position: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const IntNullableWithAggregatesFilterSchema: 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(() => NestedIntNullableWithAggregatesFilterSchema) ]).optional().nullable(), - _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), - _avg: z.lazy(() => NestedFloatNullableFilterSchema).optional(), - _sum: z.lazy(() => NestedIntNullableFilterSchema).optional(), - _min: z.lazy(() => NestedIntNullableFilterSchema).optional(), - _max: z.lazy(() => NestedIntNullableFilterSchema).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 UserRelationFilterSchema: z.ZodType = z.object({ - is: z.lazy(() => UserWhereInputSchema).optional(), - isNot: z.lazy(() => UserWhereInputSchema).optional() -}).strict(); - -export const DelegationCreatedByDelegatedToCompoundUniqueInputSchema: z.ZodType = z.object({ - createdBy: z.string(), - delegatedTo: z.string() -}).strict(); - -export const DelegationCountOrderByAggregateInputSchema: z.ZodType = z.object({ - createdBy: z.lazy(() => SortOrderSchema).optional(), - delegatedTo: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const DelegationMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - createdBy: z.lazy(() => SortOrderSchema).optional(), - delegatedTo: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const DelegationMinOrderByAggregateInputSchema: z.ZodType = z.object({ - createdBy: z.lazy(() => SortOrderSchema).optional(), - delegatedTo: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Pdf_snapshotCountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - report_id: z.lazy(() => SortOrderSchema).optional(), - html: z.lazy(() => SortOrderSchema).optional(), - report: z.lazy(() => SortOrderSchema).optional(), - user_id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Pdf_snapshotMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - report_id: z.lazy(() => SortOrderSchema).optional(), - html: z.lazy(() => SortOrderSchema).optional(), - report: z.lazy(() => SortOrderSchema).optional(), - user_id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Pdf_snapshotMinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - report_id: z.lazy(() => SortOrderSchema).optional(), - html: z.lazy(() => SortOrderSchema).optional(), - report: z.lazy(() => SortOrderSchema).optional(), - user_id: z.lazy(() => SortOrderSchema).optional() -}).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 Picture_linesCountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - pictureId: z.lazy(() => SortOrderSchema).optional(), - lines: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Picture_linesMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - pictureId: z.lazy(() => SortOrderSchema).optional(), - lines: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Picture_linesMinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - pictureId: z.lazy(() => SortOrderSchema).optional(), - lines: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).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 ReportRelationFilterSchema: z.ZodType = z.object({ - is: z.lazy(() => ReportWhereInputSchema).optional().nullable(), - isNot: z.lazy(() => ReportWhereInputSchema).optional().nullable() -}).strict(); - -export const PicturesCountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - url: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - finalUrl: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const PicturesMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - url: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - finalUrl: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const PicturesMinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - url: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - finalUrl: z.lazy(() => SortOrderSchema).optional() -}).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 PicturesListRelationFilterSchema: z.ZodType = z.object({ - every: z.lazy(() => PicturesWhereInputSchema).optional(), - some: z.lazy(() => PicturesWhereInputSchema).optional(), - none: z.lazy(() => PicturesWhereInputSchema).optional() -}).strict(); - -export const Tmp_picturesListRelationFilterSchema: z.ZodType = z.object({ - every: z.lazy(() => Tmp_picturesWhereInputSchema).optional(), - some: z.lazy(() => Tmp_picturesWhereInputSchema).optional(), - none: z.lazy(() => Tmp_picturesWhereInputSchema).optional() -}).strict(); - -export const PicturesOrderByRelationAggregateInputSchema: z.ZodType = z.object({ - _count: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Tmp_picturesOrderByRelationAggregateInputSchema: z.ZodType = z.object({ - _count: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ReportCountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - title: z.lazy(() => SortOrderSchema).optional(), - projectDescription: z.lazy(() => SortOrderSchema).optional(), - redactedBy: z.lazy(() => SortOrderSchema).optional(), - meetDate: z.lazy(() => SortOrderSchema).optional(), - applicantName: z.lazy(() => SortOrderSchema).optional(), - applicantAddress: z.lazy(() => SortOrderSchema).optional(), - projectCadastralRef: z.lazy(() => SortOrderSchema).optional(), - projectSpaceType: z.lazy(() => SortOrderSchema).optional(), - decision: z.lazy(() => SortOrderSchema).optional(), - precisions: z.lazy(() => SortOrderSchema).optional(), - contacts: z.lazy(() => SortOrderSchema).optional(), - furtherInformation: z.lazy(() => SortOrderSchema).optional(), - createdBy: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - serviceInstructeur: z.lazy(() => SortOrderSchema).optional(), - pdf: z.lazy(() => SortOrderSchema).optional(), - disabled: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - redactedById: z.lazy(() => SortOrderSchema).optional(), - applicantEmail: z.lazy(() => SortOrderSchema).optional(), - city: z.lazy(() => SortOrderSchema).optional(), - zipCode: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ReportAvgOrderByAggregateInputSchema: z.ZodType = z.object({ - serviceInstructeur: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ReportMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - title: z.lazy(() => SortOrderSchema).optional(), - projectDescription: z.lazy(() => SortOrderSchema).optional(), - redactedBy: z.lazy(() => SortOrderSchema).optional(), - meetDate: z.lazy(() => SortOrderSchema).optional(), - applicantName: z.lazy(() => SortOrderSchema).optional(), - applicantAddress: z.lazy(() => SortOrderSchema).optional(), - projectCadastralRef: z.lazy(() => SortOrderSchema).optional(), - projectSpaceType: z.lazy(() => SortOrderSchema).optional(), - decision: z.lazy(() => SortOrderSchema).optional(), - precisions: z.lazy(() => SortOrderSchema).optional(), - contacts: z.lazy(() => SortOrderSchema).optional(), - furtherInformation: z.lazy(() => SortOrderSchema).optional(), - createdBy: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - serviceInstructeur: z.lazy(() => SortOrderSchema).optional(), - pdf: z.lazy(() => SortOrderSchema).optional(), - disabled: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - redactedById: z.lazy(() => SortOrderSchema).optional(), - applicantEmail: z.lazy(() => SortOrderSchema).optional(), - city: z.lazy(() => SortOrderSchema).optional(), - zipCode: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ReportMinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - title: z.lazy(() => SortOrderSchema).optional(), - projectDescription: z.lazy(() => SortOrderSchema).optional(), - redactedBy: z.lazy(() => SortOrderSchema).optional(), - meetDate: z.lazy(() => SortOrderSchema).optional(), - applicantName: z.lazy(() => SortOrderSchema).optional(), - applicantAddress: z.lazy(() => SortOrderSchema).optional(), - projectCadastralRef: z.lazy(() => SortOrderSchema).optional(), - projectSpaceType: z.lazy(() => SortOrderSchema).optional(), - decision: z.lazy(() => SortOrderSchema).optional(), - precisions: z.lazy(() => SortOrderSchema).optional(), - contacts: z.lazy(() => SortOrderSchema).optional(), - furtherInformation: z.lazy(() => SortOrderSchema).optional(), - createdBy: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional(), - serviceInstructeur: z.lazy(() => SortOrderSchema).optional(), - pdf: z.lazy(() => SortOrderSchema).optional(), - disabled: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional(), - redactedById: z.lazy(() => SortOrderSchema).optional(), - applicantEmail: z.lazy(() => SortOrderSchema).optional(), - city: z.lazy(() => SortOrderSchema).optional(), - zipCode: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ReportSumOrderByAggregateInputSchema: z.ZodType = z.object({ - serviceInstructeur: z.lazy(() => SortOrderSchema).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 IntFilterSchema: 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 Service_instructeursCountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - full_name: z.lazy(() => SortOrderSchema).optional(), - short_name: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - tel: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Service_instructeursAvgOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Service_instructeursMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - full_name: z.lazy(() => SortOrderSchema).optional(), - short_name: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - tel: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Service_instructeursMinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - full_name: z.lazy(() => SortOrderSchema).optional(), - short_name: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - tel: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Service_instructeursSumOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const IntWithAggregatesFilterSchema: 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(() => NestedIntWithAggregatesFilterSchema) ]).optional(), - _count: z.lazy(() => NestedIntFilterSchema).optional(), - _avg: z.lazy(() => NestedFloatFilterSchema).optional(), - _sum: z.lazy(() => NestedIntFilterSchema).optional(), - _min: z.lazy(() => NestedIntFilterSchema).optional(), - _max: z.lazy(() => NestedIntFilterSchema).optional() -}).strict(); - -export const Tmp_picturesCountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Tmp_picturesMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Tmp_picturesMinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - createdAt: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const UserListRelationFilterSchema: z.ZodType = z.object({ - every: z.lazy(() => UserWhereInputSchema).optional(), - some: z.lazy(() => UserWhereInputSchema).optional(), - none: z.lazy(() => UserWhereInputSchema).optional() -}).strict(); - -export const UserOrderByRelationAggregateInputSchema: z.ZodType = z.object({ - _count: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const UdapCountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - department: z.lazy(() => SortOrderSchema).optional(), - completeCoords: z.lazy(() => SortOrderSchema).optional(), - visible: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional(), - address: z.lazy(() => SortOrderSchema).optional(), - zipCode: z.lazy(() => SortOrderSchema).optional(), - city: z.lazy(() => SortOrderSchema).optional(), - phone: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - marianne_text: z.lazy(() => SortOrderSchema).optional(), - drac_text: z.lazy(() => SortOrderSchema).optional(), - udap_text: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const UdapMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - department: z.lazy(() => SortOrderSchema).optional(), - completeCoords: z.lazy(() => SortOrderSchema).optional(), - visible: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional(), - address: z.lazy(() => SortOrderSchema).optional(), - zipCode: z.lazy(() => SortOrderSchema).optional(), - city: z.lazy(() => SortOrderSchema).optional(), - phone: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - marianne_text: z.lazy(() => SortOrderSchema).optional(), - drac_text: z.lazy(() => SortOrderSchema).optional(), - udap_text: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const UdapMinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - department: z.lazy(() => SortOrderSchema).optional(), - completeCoords: z.lazy(() => SortOrderSchema).optional(), - visible: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional(), - address: z.lazy(() => SortOrderSchema).optional(), - zipCode: z.lazy(() => SortOrderSchema).optional(), - city: z.lazy(() => SortOrderSchema).optional(), - phone: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - marianne_text: z.lazy(() => SortOrderSchema).optional(), - drac_text: z.lazy(() => SortOrderSchema).optional(), - udap_text: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const DelegationListRelationFilterSchema: z.ZodType = z.object({ - every: z.lazy(() => DelegationWhereInputSchema).optional(), - some: z.lazy(() => DelegationWhereInputSchema).optional(), - none: z.lazy(() => DelegationWhereInputSchema).optional() -}).strict(); - -export const ReportListRelationFilterSchema: z.ZodType = z.object({ - every: z.lazy(() => ReportWhereInputSchema).optional(), - some: z.lazy(() => ReportWhereInputSchema).optional(), - none: z.lazy(() => ReportWhereInputSchema).optional() -}).strict(); - -export const UdapRelationFilterSchema: z.ZodType = z.object({ - is: z.lazy(() => UdapWhereInputSchema).optional(), - isNot: z.lazy(() => UdapWhereInputSchema).optional() -}).strict(); - -export const DelegationOrderByRelationAggregateInputSchema: z.ZodType = z.object({ - _count: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ReportOrderByRelationAggregateInputSchema: z.ZodType = z.object({ - _count: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const UserCountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const UserMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const UserMinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional(), - udap_id: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const StringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ - set: z.string().optional() -}).strict(); - -export const NullableBoolFieldUpdateOperationsInputSchema: z.ZodType = z.object({ - set: z.boolean().optional().nullable() -}).strict(); - -export const NullableIntFieldUpdateOperationsInputSchema: z.ZodType = z.object({ - set: z.number().optional().nullable(), - increment: z.number().optional(), - decrement: z.number().optional(), - multiply: z.number().optional(), - divide: z.number().optional() -}).strict(); - -export const NullableStringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ - set: z.string().optional().nullable() -}).strict(); - -export const UserCreateNestedOneWithoutDelegation_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UserCreateWithoutDelegation_delegation_createdByTouserInputSchema),z.lazy(() => UserUncheckedCreateWithoutDelegation_delegation_createdByTouserInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutDelegation_delegation_createdByTouserInputSchema).optional(), - connect: z.lazy(() => UserWhereUniqueInputSchema).optional() -}).strict(); - -export const UserCreateNestedOneWithoutDelegation_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UserCreateWithoutDelegation_delegation_delegatedToTouserInputSchema),z.lazy(() => UserUncheckedCreateWithoutDelegation_delegation_delegatedToTouserInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutDelegation_delegation_delegatedToTouserInputSchema).optional(), - connect: z.lazy(() => UserWhereUniqueInputSchema).optional() -}).strict(); - -export const UserUpdateOneRequiredWithoutDelegation_delegation_createdByTouserNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UserCreateWithoutDelegation_delegation_createdByTouserInputSchema),z.lazy(() => UserUncheckedCreateWithoutDelegation_delegation_createdByTouserInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutDelegation_delegation_createdByTouserInputSchema).optional(), - upsert: z.lazy(() => UserUpsertWithoutDelegation_delegation_createdByTouserInputSchema).optional(), - connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), - update: z.union([ z.lazy(() => UserUpdateWithoutDelegation_delegation_createdByTouserInputSchema),z.lazy(() => UserUncheckedUpdateWithoutDelegation_delegation_createdByTouserInputSchema) ]).optional(), -}).strict(); - -export const UserUpdateOneRequiredWithoutDelegation_delegation_delegatedToTouserNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UserCreateWithoutDelegation_delegation_delegatedToTouserInputSchema),z.lazy(() => UserUncheckedCreateWithoutDelegation_delegation_delegatedToTouserInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutDelegation_delegation_delegatedToTouserInputSchema).optional(), - upsert: z.lazy(() => UserUpsertWithoutDelegation_delegation_delegatedToTouserInputSchema).optional(), - connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), - update: z.union([ z.lazy(() => UserUpdateWithoutDelegation_delegation_delegatedToTouserInputSchema),z.lazy(() => UserUncheckedUpdateWithoutDelegation_delegation_delegatedToTouserInputSchema) ]).optional(), -}).strict(); - -export const NullableDateTimeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ - set: z.coerce.date().optional().nullable() -}).strict(); - -export const ReportCreateNestedOneWithoutPicturesInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ReportCreateWithoutPicturesInputSchema),z.lazy(() => ReportUncheckedCreateWithoutPicturesInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutPicturesInputSchema).optional(), - connect: z.lazy(() => ReportWhereUniqueInputSchema).optional() -}).strict(); - -export const ReportUpdateOneWithoutPicturesNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ReportCreateWithoutPicturesInputSchema),z.lazy(() => ReportUncheckedCreateWithoutPicturesInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutPicturesInputSchema).optional(), - upsert: z.lazy(() => ReportUpsertWithoutPicturesInputSchema).optional(), - disconnect: z.boolean().optional(), - delete: z.boolean().optional(), - connect: z.lazy(() => ReportWhereUniqueInputSchema).optional(), - update: z.union([ z.lazy(() => ReportUpdateWithoutPicturesInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutPicturesInputSchema) ]).optional(), -}).strict(); - -export const PicturesCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => PicturesCreateWithoutReportInputSchema),z.lazy(() => PicturesCreateWithoutReportInputSchema).array(),z.lazy(() => PicturesUncheckedCreateWithoutReportInputSchema),z.lazy(() => PicturesUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => PicturesCreateOrConnectWithoutReportInputSchema),z.lazy(() => PicturesCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => PicturesCreateManyReportInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => PicturesWhereUniqueInputSchema),z.lazy(() => PicturesWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const UserCreateNestedOneWithoutReportInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UserCreateWithoutReportInputSchema),z.lazy(() => UserUncheckedCreateWithoutReportInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutReportInputSchema).optional(), - connect: z.lazy(() => UserWhereUniqueInputSchema).optional() -}).strict(); - -export const Tmp_picturesCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Tmp_picturesCreateWithoutReportInputSchema),z.lazy(() => Tmp_picturesCreateWithoutReportInputSchema).array(),z.lazy(() => Tmp_picturesUncheckedCreateWithoutReportInputSchema),z.lazy(() => Tmp_picturesUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Tmp_picturesCreateOrConnectWithoutReportInputSchema),z.lazy(() => Tmp_picturesCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => Tmp_picturesCreateManyReportInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => Tmp_picturesWhereUniqueInputSchema),z.lazy(() => Tmp_picturesWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const PicturesUncheckedCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => PicturesCreateWithoutReportInputSchema),z.lazy(() => PicturesCreateWithoutReportInputSchema).array(),z.lazy(() => PicturesUncheckedCreateWithoutReportInputSchema),z.lazy(() => PicturesUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => PicturesCreateOrConnectWithoutReportInputSchema),z.lazy(() => PicturesCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => PicturesCreateManyReportInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => PicturesWhereUniqueInputSchema),z.lazy(() => PicturesWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const Tmp_picturesUncheckedCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Tmp_picturesCreateWithoutReportInputSchema),z.lazy(() => Tmp_picturesCreateWithoutReportInputSchema).array(),z.lazy(() => Tmp_picturesUncheckedCreateWithoutReportInputSchema),z.lazy(() => Tmp_picturesUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Tmp_picturesCreateOrConnectWithoutReportInputSchema),z.lazy(() => Tmp_picturesCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => Tmp_picturesCreateManyReportInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => Tmp_picturesWhereUniqueInputSchema),z.lazy(() => Tmp_picturesWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const DateTimeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ - set: z.coerce.date().optional() -}).strict(); - -export const PicturesUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => PicturesCreateWithoutReportInputSchema),z.lazy(() => PicturesCreateWithoutReportInputSchema).array(),z.lazy(() => PicturesUncheckedCreateWithoutReportInputSchema),z.lazy(() => PicturesUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => PicturesCreateOrConnectWithoutReportInputSchema),z.lazy(() => PicturesCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => PicturesUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => PicturesUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => PicturesCreateManyReportInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => PicturesWhereUniqueInputSchema),z.lazy(() => PicturesWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => PicturesWhereUniqueInputSchema),z.lazy(() => PicturesWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => PicturesWhereUniqueInputSchema),z.lazy(() => PicturesWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => PicturesWhereUniqueInputSchema),z.lazy(() => PicturesWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => PicturesUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => PicturesUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => PicturesUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => PicturesUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => PicturesScalarWhereInputSchema),z.lazy(() => PicturesScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const UserUpdateOneRequiredWithoutReportNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UserCreateWithoutReportInputSchema),z.lazy(() => UserUncheckedCreateWithoutReportInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutReportInputSchema).optional(), - upsert: z.lazy(() => UserUpsertWithoutReportInputSchema).optional(), - connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), - update: z.union([ z.lazy(() => UserUpdateWithoutReportInputSchema),z.lazy(() => UserUncheckedUpdateWithoutReportInputSchema) ]).optional(), -}).strict(); - -export const Tmp_picturesUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Tmp_picturesCreateWithoutReportInputSchema),z.lazy(() => Tmp_picturesCreateWithoutReportInputSchema).array(),z.lazy(() => Tmp_picturesUncheckedCreateWithoutReportInputSchema),z.lazy(() => Tmp_picturesUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Tmp_picturesCreateOrConnectWithoutReportInputSchema),z.lazy(() => Tmp_picturesCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => Tmp_picturesUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Tmp_picturesUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => Tmp_picturesCreateManyReportInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => Tmp_picturesWhereUniqueInputSchema),z.lazy(() => Tmp_picturesWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => Tmp_picturesWhereUniqueInputSchema),z.lazy(() => Tmp_picturesWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => Tmp_picturesWhereUniqueInputSchema),z.lazy(() => Tmp_picturesWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => Tmp_picturesWhereUniqueInputSchema),z.lazy(() => Tmp_picturesWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => Tmp_picturesUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Tmp_picturesUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => Tmp_picturesUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Tmp_picturesUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => Tmp_picturesScalarWhereInputSchema),z.lazy(() => Tmp_picturesScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const PicturesUncheckedUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => PicturesCreateWithoutReportInputSchema),z.lazy(() => PicturesCreateWithoutReportInputSchema).array(),z.lazy(() => PicturesUncheckedCreateWithoutReportInputSchema),z.lazy(() => PicturesUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => PicturesCreateOrConnectWithoutReportInputSchema),z.lazy(() => PicturesCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => PicturesUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => PicturesUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => PicturesCreateManyReportInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => PicturesWhereUniqueInputSchema),z.lazy(() => PicturesWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => PicturesWhereUniqueInputSchema),z.lazy(() => PicturesWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => PicturesWhereUniqueInputSchema),z.lazy(() => PicturesWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => PicturesWhereUniqueInputSchema),z.lazy(() => PicturesWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => PicturesUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => PicturesUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => PicturesUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => PicturesUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => PicturesScalarWhereInputSchema),z.lazy(() => PicturesScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const Tmp_picturesUncheckedUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Tmp_picturesCreateWithoutReportInputSchema),z.lazy(() => Tmp_picturesCreateWithoutReportInputSchema).array(),z.lazy(() => Tmp_picturesUncheckedCreateWithoutReportInputSchema),z.lazy(() => Tmp_picturesUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Tmp_picturesCreateOrConnectWithoutReportInputSchema),z.lazy(() => Tmp_picturesCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => Tmp_picturesUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Tmp_picturesUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => Tmp_picturesCreateManyReportInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => Tmp_picturesWhereUniqueInputSchema),z.lazy(() => Tmp_picturesWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => Tmp_picturesWhereUniqueInputSchema),z.lazy(() => Tmp_picturesWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => Tmp_picturesWhereUniqueInputSchema),z.lazy(() => Tmp_picturesWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => Tmp_picturesWhereUniqueInputSchema),z.lazy(() => Tmp_picturesWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => Tmp_picturesUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Tmp_picturesUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => Tmp_picturesUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Tmp_picturesUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => Tmp_picturesScalarWhereInputSchema),z.lazy(() => Tmp_picturesScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const IntFieldUpdateOperationsInputSchema: z.ZodType = z.object({ - set: z.number().optional(), - increment: z.number().optional(), - decrement: z.number().optional(), - multiply: z.number().optional(), - divide: z.number().optional() -}).strict(); - -export const ReportCreateNestedOneWithoutTmp_picturesInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ReportCreateWithoutTmp_picturesInputSchema),z.lazy(() => ReportUncheckedCreateWithoutTmp_picturesInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutTmp_picturesInputSchema).optional(), - connect: z.lazy(() => ReportWhereUniqueInputSchema).optional() -}).strict(); - -export const ReportUpdateOneWithoutTmp_picturesNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ReportCreateWithoutTmp_picturesInputSchema),z.lazy(() => ReportUncheckedCreateWithoutTmp_picturesInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutTmp_picturesInputSchema).optional(), - upsert: z.lazy(() => ReportUpsertWithoutTmp_picturesInputSchema).optional(), - disconnect: z.boolean().optional(), - delete: z.boolean().optional(), - connect: z.lazy(() => ReportWhereUniqueInputSchema).optional(), - update: z.union([ z.lazy(() => ReportUpdateWithoutTmp_picturesInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutTmp_picturesInputSchema) ]).optional(), -}).strict(); - -export const UserCreateNestedManyWithoutUdapInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UserCreateWithoutUdapInputSchema),z.lazy(() => UserCreateWithoutUdapInputSchema).array(),z.lazy(() => UserUncheckedCreateWithoutUdapInputSchema),z.lazy(() => UserUncheckedCreateWithoutUdapInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => UserCreateOrConnectWithoutUdapInputSchema),z.lazy(() => UserCreateOrConnectWithoutUdapInputSchema).array() ]).optional(), - createMany: z.lazy(() => UserCreateManyUdapInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => UserWhereUniqueInputSchema),z.lazy(() => UserWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const UserUncheckedCreateNestedManyWithoutUdapInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UserCreateWithoutUdapInputSchema),z.lazy(() => UserCreateWithoutUdapInputSchema).array(),z.lazy(() => UserUncheckedCreateWithoutUdapInputSchema),z.lazy(() => UserUncheckedCreateWithoutUdapInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => UserCreateOrConnectWithoutUdapInputSchema),z.lazy(() => UserCreateOrConnectWithoutUdapInputSchema).array() ]).optional(), - createMany: z.lazy(() => UserCreateManyUdapInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => UserWhereUniqueInputSchema),z.lazy(() => UserWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const UserUpdateManyWithoutUdapNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UserCreateWithoutUdapInputSchema),z.lazy(() => UserCreateWithoutUdapInputSchema).array(),z.lazy(() => UserUncheckedCreateWithoutUdapInputSchema),z.lazy(() => UserUncheckedCreateWithoutUdapInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => UserCreateOrConnectWithoutUdapInputSchema),z.lazy(() => UserCreateOrConnectWithoutUdapInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => UserUpsertWithWhereUniqueWithoutUdapInputSchema),z.lazy(() => UserUpsertWithWhereUniqueWithoutUdapInputSchema).array() ]).optional(), - createMany: z.lazy(() => UserCreateManyUdapInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => UserWhereUniqueInputSchema),z.lazy(() => UserWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => UserWhereUniqueInputSchema),z.lazy(() => UserWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => UserWhereUniqueInputSchema),z.lazy(() => UserWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => UserWhereUniqueInputSchema),z.lazy(() => UserWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => UserUpdateWithWhereUniqueWithoutUdapInputSchema),z.lazy(() => UserUpdateWithWhereUniqueWithoutUdapInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => UserUpdateManyWithWhereWithoutUdapInputSchema),z.lazy(() => UserUpdateManyWithWhereWithoutUdapInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => UserScalarWhereInputSchema),z.lazy(() => UserScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const UserUncheckedUpdateManyWithoutUdapNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UserCreateWithoutUdapInputSchema),z.lazy(() => UserCreateWithoutUdapInputSchema).array(),z.lazy(() => UserUncheckedCreateWithoutUdapInputSchema),z.lazy(() => UserUncheckedCreateWithoutUdapInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => UserCreateOrConnectWithoutUdapInputSchema),z.lazy(() => UserCreateOrConnectWithoutUdapInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => UserUpsertWithWhereUniqueWithoutUdapInputSchema),z.lazy(() => UserUpsertWithWhereUniqueWithoutUdapInputSchema).array() ]).optional(), - createMany: z.lazy(() => UserCreateManyUdapInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => UserWhereUniqueInputSchema),z.lazy(() => UserWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => UserWhereUniqueInputSchema),z.lazy(() => UserWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => UserWhereUniqueInputSchema),z.lazy(() => UserWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => UserWhereUniqueInputSchema),z.lazy(() => UserWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => UserUpdateWithWhereUniqueWithoutUdapInputSchema),z.lazy(() => UserUpdateWithWhereUniqueWithoutUdapInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => UserUpdateManyWithWhereWithoutUdapInputSchema),z.lazy(() => UserUpdateManyWithWhereWithoutUdapInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => UserScalarWhereInputSchema),z.lazy(() => UserScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const DelegationCreateNestedManyWithoutUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationCreateWithoutUser_delegation_createdByTouserInputSchema).array(),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - createMany: z.lazy(() => DelegationCreateManyUser_delegation_createdByTouserInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const DelegationCreateNestedManyWithoutUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema).array(),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - createMany: z.lazy(() => DelegationCreateManyUser_delegation_delegatedToTouserInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const ReportCreateNestedManyWithoutUserInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ReportCreateWithoutUserInputSchema),z.lazy(() => ReportCreateWithoutUserInputSchema).array(),z.lazy(() => ReportUncheckedCreateWithoutUserInputSchema),z.lazy(() => ReportUncheckedCreateWithoutUserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => ReportCreateOrConnectWithoutUserInputSchema),z.lazy(() => ReportCreateOrConnectWithoutUserInputSchema).array() ]).optional(), - createMany: z.lazy(() => ReportCreateManyUserInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => ReportWhereUniqueInputSchema),z.lazy(() => ReportWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const UdapCreateNestedOneWithoutUserInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UdapCreateWithoutUserInputSchema),z.lazy(() => UdapUncheckedCreateWithoutUserInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => UdapCreateOrConnectWithoutUserInputSchema).optional(), - connect: z.lazy(() => UdapWhereUniqueInputSchema).optional() -}).strict(); - -export const DelegationUncheckedCreateNestedManyWithoutUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationCreateWithoutUser_delegation_createdByTouserInputSchema).array(),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - createMany: z.lazy(() => DelegationCreateManyUser_delegation_createdByTouserInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const DelegationUncheckedCreateNestedManyWithoutUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema).array(),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - createMany: z.lazy(() => DelegationCreateManyUser_delegation_delegatedToTouserInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const ReportUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ReportCreateWithoutUserInputSchema),z.lazy(() => ReportCreateWithoutUserInputSchema).array(),z.lazy(() => ReportUncheckedCreateWithoutUserInputSchema),z.lazy(() => ReportUncheckedCreateWithoutUserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => ReportCreateOrConnectWithoutUserInputSchema),z.lazy(() => ReportCreateOrConnectWithoutUserInputSchema).array() ]).optional(), - createMany: z.lazy(() => ReportCreateManyUserInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => ReportWhereUniqueInputSchema),z.lazy(() => ReportWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const DelegationUpdateManyWithoutUser_delegation_createdByTouserNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationCreateWithoutUser_delegation_createdByTouserInputSchema).array(),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => DelegationUpsertWithWhereUniqueWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUpsertWithWhereUniqueWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - createMany: z.lazy(() => DelegationCreateManyUser_delegation_createdByTouserInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => DelegationUpdateWithWhereUniqueWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUpdateWithWhereUniqueWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => DelegationUpdateManyWithWhereWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUpdateManyWithWhereWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => DelegationScalarWhereInputSchema),z.lazy(() => DelegationScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const DelegationUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema).array(),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => DelegationUpsertWithWhereUniqueWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUpsertWithWhereUniqueWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - createMany: z.lazy(() => DelegationCreateManyUser_delegation_delegatedToTouserInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => DelegationUpdateWithWhereUniqueWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUpdateWithWhereUniqueWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => DelegationUpdateManyWithWhereWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUpdateManyWithWhereWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => DelegationScalarWhereInputSchema),z.lazy(() => DelegationScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const ReportUpdateManyWithoutUserNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ReportCreateWithoutUserInputSchema),z.lazy(() => ReportCreateWithoutUserInputSchema).array(),z.lazy(() => ReportUncheckedCreateWithoutUserInputSchema),z.lazy(() => ReportUncheckedCreateWithoutUserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => ReportCreateOrConnectWithoutUserInputSchema),z.lazy(() => ReportCreateOrConnectWithoutUserInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => ReportUpsertWithWhereUniqueWithoutUserInputSchema),z.lazy(() => ReportUpsertWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), - createMany: z.lazy(() => ReportCreateManyUserInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => ReportWhereUniqueInputSchema),z.lazy(() => ReportWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => ReportWhereUniqueInputSchema),z.lazy(() => ReportWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => ReportWhereUniqueInputSchema),z.lazy(() => ReportWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => ReportWhereUniqueInputSchema),z.lazy(() => ReportWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => ReportUpdateWithWhereUniqueWithoutUserInputSchema),z.lazy(() => ReportUpdateWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => ReportUpdateManyWithWhereWithoutUserInputSchema),z.lazy(() => ReportUpdateManyWithWhereWithoutUserInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => ReportScalarWhereInputSchema),z.lazy(() => ReportScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const UdapUpdateOneRequiredWithoutUserNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => UdapCreateWithoutUserInputSchema),z.lazy(() => UdapUncheckedCreateWithoutUserInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => UdapCreateOrConnectWithoutUserInputSchema).optional(), - upsert: z.lazy(() => UdapUpsertWithoutUserInputSchema).optional(), - connect: z.lazy(() => UdapWhereUniqueInputSchema).optional(), - update: z.union([ z.lazy(() => UdapUpdateWithoutUserInputSchema),z.lazy(() => UdapUncheckedUpdateWithoutUserInputSchema) ]).optional(), -}).strict(); - -export const DelegationUncheckedUpdateManyWithoutUser_delegation_createdByTouserNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationCreateWithoutUser_delegation_createdByTouserInputSchema).array(),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => DelegationUpsertWithWhereUniqueWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUpsertWithWhereUniqueWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - createMany: z.lazy(() => DelegationCreateManyUser_delegation_createdByTouserInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => DelegationUpdateWithWhereUniqueWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUpdateWithWhereUniqueWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => DelegationUpdateManyWithWhereWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUpdateManyWithWhereWithoutUser_delegation_createdByTouserInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => DelegationScalarWhereInputSchema),z.lazy(() => DelegationScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema).array(),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationCreateOrConnectWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => DelegationUpsertWithWhereUniqueWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUpsertWithWhereUniqueWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - createMany: z.lazy(() => DelegationCreateManyUser_delegation_delegatedToTouserInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => DelegationWhereUniqueInputSchema),z.lazy(() => DelegationWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => DelegationUpdateWithWhereUniqueWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUpdateWithWhereUniqueWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => DelegationUpdateManyWithWhereWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUpdateManyWithWhereWithoutUser_delegation_delegatedToTouserInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => DelegationScalarWhereInputSchema),z.lazy(() => DelegationScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const ReportUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ReportCreateWithoutUserInputSchema),z.lazy(() => ReportCreateWithoutUserInputSchema).array(),z.lazy(() => ReportUncheckedCreateWithoutUserInputSchema),z.lazy(() => ReportUncheckedCreateWithoutUserInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => ReportCreateOrConnectWithoutUserInputSchema),z.lazy(() => ReportCreateOrConnectWithoutUserInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => ReportUpsertWithWhereUniqueWithoutUserInputSchema),z.lazy(() => ReportUpsertWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), - createMany: z.lazy(() => ReportCreateManyUserInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => ReportWhereUniqueInputSchema),z.lazy(() => ReportWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => ReportWhereUniqueInputSchema),z.lazy(() => ReportWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => ReportWhereUniqueInputSchema),z.lazy(() => ReportWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => ReportWhereUniqueInputSchema),z.lazy(() => ReportWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => ReportUpdateWithWhereUniqueWithoutUserInputSchema),z.lazy(() => ReportUpdateWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => ReportUpdateManyWithWhereWithoutUserInputSchema),z.lazy(() => ReportUpdateManyWithWhereWithoutUserInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => ReportScalarWhereInputSchema),z.lazy(() => ReportScalarWhereInputSchema).array() ]).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 NestedBoolNullableFilterSchema: z.ZodType = z.object({ - equals: z.boolean().optional().nullable(), - not: z.union([ z.boolean(),z.lazy(() => NestedBoolNullableFilterSchema) ]).optional().nullable(), -}).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 NestedBoolNullableWithAggregatesFilterSchema: z.ZodType = z.object({ - equals: z.boolean().optional().nullable(), - not: z.union([ z.boolean(),z.lazy(() => NestedBoolNullableWithAggregatesFilterSchema) ]).optional().nullable(), - _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), - _min: z.lazy(() => NestedBoolNullableFilterSchema).optional(), - _max: z.lazy(() => NestedBoolNullableFilterSchema).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 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 NestedIntNullableWithAggregatesFilterSchema: 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(() => NestedIntNullableWithAggregatesFilterSchema) ]).optional().nullable(), - _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), - _avg: z.lazy(() => NestedFloatNullableFilterSchema).optional(), - _sum: z.lazy(() => NestedIntNullableFilterSchema).optional(), - _min: z.lazy(() => NestedIntNullableFilterSchema).optional(), - _max: z.lazy(() => NestedIntNullableFilterSchema).optional() -}).strict(); - -export const NestedFloatNullableFilterSchema: 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(() => NestedFloatNullableFilterSchema) ]).optional().nullable(), -}).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 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 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 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 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 NestedIntWithAggregatesFilterSchema: 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(() => NestedIntWithAggregatesFilterSchema) ]).optional(), - _count: z.lazy(() => NestedIntFilterSchema).optional(), - _avg: z.lazy(() => NestedFloatFilterSchema).optional(), - _sum: z.lazy(() => NestedIntFilterSchema).optional(), - _min: z.lazy(() => NestedIntFilterSchema).optional(), - _max: z.lazy(() => NestedIntFilterSchema).optional() -}).strict(); - -export const NestedFloatFilterSchema: 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(() => NestedFloatFilterSchema) ]).optional(), -}).strict(); - -export const UserCreateWithoutDelegation_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationCreateNestedManyWithoutUser_delegation_delegatedToTouserInputSchema).optional(), - report: z.lazy(() => ReportCreateNestedManyWithoutUserInputSchema).optional(), - udap: z.lazy(() => UdapCreateNestedOneWithoutUserInputSchema) -}).strict(); - -export const UserUncheckedCreateWithoutDelegation_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - udap_id: z.string(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUncheckedCreateNestedManyWithoutUser_delegation_delegatedToTouserInputSchema).optional(), - report: z.lazy(() => ReportUncheckedCreateNestedManyWithoutUserInputSchema).optional() -}).strict(); - -export const UserCreateOrConnectWithoutDelegation_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => UserWhereUniqueInputSchema), - create: z.union([ z.lazy(() => UserCreateWithoutDelegation_delegation_createdByTouserInputSchema),z.lazy(() => UserUncheckedCreateWithoutDelegation_delegation_createdByTouserInputSchema) ]), -}).strict(); - -export const UserCreateWithoutDelegation_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationCreateNestedManyWithoutUser_delegation_createdByTouserInputSchema).optional(), - report: z.lazy(() => ReportCreateNestedManyWithoutUserInputSchema).optional(), - udap: z.lazy(() => UdapCreateNestedOneWithoutUserInputSchema) -}).strict(); - -export const UserUncheckedCreateWithoutDelegation_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - udap_id: z.string(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUncheckedCreateNestedManyWithoutUser_delegation_createdByTouserInputSchema).optional(), - report: z.lazy(() => ReportUncheckedCreateNestedManyWithoutUserInputSchema).optional() -}).strict(); - -export const UserCreateOrConnectWithoutDelegation_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => UserWhereUniqueInputSchema), - create: z.union([ z.lazy(() => UserCreateWithoutDelegation_delegation_delegatedToTouserInputSchema),z.lazy(() => UserUncheckedCreateWithoutDelegation_delegation_delegatedToTouserInputSchema) ]), -}).strict(); - -export const UserUpsertWithoutDelegation_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => UserUpdateWithoutDelegation_delegation_createdByTouserInputSchema),z.lazy(() => UserUncheckedUpdateWithoutDelegation_delegation_createdByTouserInputSchema) ]), - create: z.union([ z.lazy(() => UserCreateWithoutDelegation_delegation_createdByTouserInputSchema),z.lazy(() => UserUncheckedCreateWithoutDelegation_delegation_createdByTouserInputSchema) ]), -}).strict(); - -export const UserUpdateWithoutDelegation_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema).optional(), - report: z.lazy(() => ReportUpdateManyWithoutUserNestedInputSchema).optional(), - udap: z.lazy(() => UdapUpdateOneRequiredWithoutUserNestedInputSchema).optional() -}).strict(); - -export const UserUncheckedUpdateWithoutDelegation_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - udap_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema).optional(), - report: z.lazy(() => ReportUncheckedUpdateManyWithoutUserNestedInputSchema).optional() -}).strict(); - -export const UserUpsertWithoutDelegation_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => UserUpdateWithoutDelegation_delegation_delegatedToTouserInputSchema),z.lazy(() => UserUncheckedUpdateWithoutDelegation_delegation_delegatedToTouserInputSchema) ]), - create: z.union([ z.lazy(() => UserCreateWithoutDelegation_delegation_delegatedToTouserInputSchema),z.lazy(() => UserUncheckedCreateWithoutDelegation_delegation_delegatedToTouserInputSchema) ]), -}).strict(); - -export const UserUpdateWithoutDelegation_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUpdateManyWithoutUser_delegation_createdByTouserNestedInputSchema).optional(), - report: z.lazy(() => ReportUpdateManyWithoutUserNestedInputSchema).optional(), - udap: z.lazy(() => UdapUpdateOneRequiredWithoutUserNestedInputSchema).optional() -}).strict(); - -export const UserUncheckedUpdateWithoutDelegation_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - udap_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUncheckedUpdateManyWithoutUser_delegation_createdByTouserNestedInputSchema).optional(), - report: z.lazy(() => ReportUncheckedUpdateManyWithoutUserNestedInputSchema).optional() -}).strict(); - -export const ReportCreateWithoutPicturesInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - projectDescription: z.string().optional().nullable(), - redactedBy: z.string().optional().nullable(), - meetDate: z.coerce.date().optional().nullable(), - applicantName: z.string().optional().nullable(), - applicantAddress: z.string().optional().nullable(), - projectCadastralRef: z.string().optional().nullable(), - projectSpaceType: z.string().optional().nullable(), - decision: z.string().optional().nullable(), - precisions: z.string().optional().nullable(), - contacts: z.string().optional().nullable(), - furtherInformation: z.string().optional().nullable(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().optional().nullable(), - pdf: z.string().optional().nullable(), - disabled: z.boolean().optional().nullable(), - udap_id: z.string().optional().nullable(), - redactedById: z.string().optional().nullable(), - applicantEmail: z.string().optional().nullable(), - city: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - user: z.lazy(() => UserCreateNestedOneWithoutReportInputSchema), - tmp_pictures: z.lazy(() => Tmp_picturesCreateNestedManyWithoutReportInputSchema).optional() -}).strict(); - -export const ReportUncheckedCreateWithoutPicturesInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - projectDescription: z.string().optional().nullable(), - redactedBy: z.string().optional().nullable(), - meetDate: z.coerce.date().optional().nullable(), - applicantName: z.string().optional().nullable(), - applicantAddress: z.string().optional().nullable(), - projectCadastralRef: z.string().optional().nullable(), - projectSpaceType: z.string().optional().nullable(), - decision: z.string().optional().nullable(), - precisions: z.string().optional().nullable(), - contacts: z.string().optional().nullable(), - furtherInformation: z.string().optional().nullable(), - createdBy: z.string(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().optional().nullable(), - pdf: z.string().optional().nullable(), - disabled: z.boolean().optional().nullable(), - udap_id: z.string().optional().nullable(), - redactedById: z.string().optional().nullable(), - applicantEmail: z.string().optional().nullable(), - city: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - tmp_pictures: z.lazy(() => Tmp_picturesUncheckedCreateNestedManyWithoutReportInputSchema).optional() -}).strict(); - -export const ReportCreateOrConnectWithoutPicturesInputSchema: z.ZodType = z.object({ - where: z.lazy(() => ReportWhereUniqueInputSchema), - create: z.union([ z.lazy(() => ReportCreateWithoutPicturesInputSchema),z.lazy(() => ReportUncheckedCreateWithoutPicturesInputSchema) ]), -}).strict(); - -export const ReportUpsertWithoutPicturesInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => ReportUpdateWithoutPicturesInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutPicturesInputSchema) ]), - create: z.union([ z.lazy(() => ReportCreateWithoutPicturesInputSchema),z.lazy(() => ReportUncheckedCreateWithoutPicturesInputSchema) ]), -}).strict(); - -export const ReportUpdateWithoutPicturesInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - user: z.lazy(() => UserUpdateOneRequiredWithoutReportNestedInputSchema).optional(), - tmp_pictures: z.lazy(() => Tmp_picturesUpdateManyWithoutReportNestedInputSchema).optional() -}).strict(); - -export const ReportUncheckedUpdateWithoutPicturesInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdBy: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - tmp_pictures: z.lazy(() => Tmp_picturesUncheckedUpdateManyWithoutReportNestedInputSchema).optional() -}).strict(); - -export const PicturesCreateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.string(), - url: z.string().optional().nullable(), - createdAt: z.coerce.date().optional().nullable(), - finalUrl: z.string().optional().nullable() -}).strict(); - -export const PicturesUncheckedCreateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.string(), - url: z.string().optional().nullable(), - createdAt: z.coerce.date().optional().nullable(), - finalUrl: z.string().optional().nullable() -}).strict(); - -export const PicturesCreateOrConnectWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => PicturesWhereUniqueInputSchema), - create: z.union([ z.lazy(() => PicturesCreateWithoutReportInputSchema),z.lazy(() => PicturesUncheckedCreateWithoutReportInputSchema) ]), -}).strict(); - -export const PicturesCreateManyReportInputEnvelopeSchema: z.ZodType = z.object({ - data: z.lazy(() => PicturesCreateManyReportInputSchema).array(), - skipDuplicates: z.boolean().optional() -}).strict(); - -export const UserCreateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationCreateNestedManyWithoutUser_delegation_createdByTouserInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationCreateNestedManyWithoutUser_delegation_delegatedToTouserInputSchema).optional(), - udap: z.lazy(() => UdapCreateNestedOneWithoutUserInputSchema) -}).strict(); - -export const UserUncheckedCreateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - udap_id: z.string(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUncheckedCreateNestedManyWithoutUser_delegation_createdByTouserInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUncheckedCreateNestedManyWithoutUser_delegation_delegatedToTouserInputSchema).optional() -}).strict(); - -export const UserCreateOrConnectWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => UserWhereUniqueInputSchema), - create: z.union([ z.lazy(() => UserCreateWithoutReportInputSchema),z.lazy(() => UserUncheckedCreateWithoutReportInputSchema) ]), -}).strict(); - -export const Tmp_picturesCreateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.string(), - createdAt: z.coerce.date().optional().nullable() -}).strict(); - -export const Tmp_picturesUncheckedCreateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.string(), - createdAt: z.coerce.date().optional().nullable() -}).strict(); - -export const Tmp_picturesCreateOrConnectWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Tmp_picturesWhereUniqueInputSchema), - create: z.union([ z.lazy(() => Tmp_picturesCreateWithoutReportInputSchema),z.lazy(() => Tmp_picturesUncheckedCreateWithoutReportInputSchema) ]), -}).strict(); - -export const Tmp_picturesCreateManyReportInputEnvelopeSchema: z.ZodType = z.object({ - data: z.lazy(() => Tmp_picturesCreateManyReportInputSchema).array(), - skipDuplicates: z.boolean().optional() -}).strict(); - -export const PicturesUpsertWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => PicturesWhereUniqueInputSchema), - update: z.union([ z.lazy(() => PicturesUpdateWithoutReportInputSchema),z.lazy(() => PicturesUncheckedUpdateWithoutReportInputSchema) ]), - create: z.union([ z.lazy(() => PicturesCreateWithoutReportInputSchema),z.lazy(() => PicturesUncheckedCreateWithoutReportInputSchema) ]), -}).strict(); - -export const PicturesUpdateWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => PicturesWhereUniqueInputSchema), - data: z.union([ z.lazy(() => PicturesUpdateWithoutReportInputSchema),z.lazy(() => PicturesUncheckedUpdateWithoutReportInputSchema) ]), -}).strict(); - -export const PicturesUpdateManyWithWhereWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => PicturesScalarWhereInputSchema), - data: z.union([ z.lazy(() => PicturesUpdateManyMutationInputSchema),z.lazy(() => PicturesUncheckedUpdateManyWithoutPicturesInputSchema) ]), -}).strict(); - -export const PicturesScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => PicturesScalarWhereInputSchema),z.lazy(() => PicturesScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => PicturesScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => PicturesScalarWhereInputSchema),z.lazy(() => PicturesScalarWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - reportId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - url: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - createdAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), - finalUrl: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), -}).strict(); - -export const UserUpsertWithoutReportInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => UserUpdateWithoutReportInputSchema),z.lazy(() => UserUncheckedUpdateWithoutReportInputSchema) ]), - create: z.union([ z.lazy(() => UserCreateWithoutReportInputSchema),z.lazy(() => UserUncheckedCreateWithoutReportInputSchema) ]), -}).strict(); - -export const UserUpdateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUpdateManyWithoutUser_delegation_createdByTouserNestedInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema).optional(), - udap: z.lazy(() => UdapUpdateOneRequiredWithoutUserNestedInputSchema).optional() -}).strict(); - -export const UserUncheckedUpdateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - udap_id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUncheckedUpdateManyWithoutUser_delegation_createdByTouserNestedInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema).optional() -}).strict(); - -export const Tmp_picturesUpsertWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Tmp_picturesWhereUniqueInputSchema), - update: z.union([ z.lazy(() => Tmp_picturesUpdateWithoutReportInputSchema),z.lazy(() => Tmp_picturesUncheckedUpdateWithoutReportInputSchema) ]), - create: z.union([ z.lazy(() => Tmp_picturesCreateWithoutReportInputSchema),z.lazy(() => Tmp_picturesUncheckedCreateWithoutReportInputSchema) ]), -}).strict(); - -export const Tmp_picturesUpdateWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Tmp_picturesWhereUniqueInputSchema), - data: z.union([ z.lazy(() => Tmp_picturesUpdateWithoutReportInputSchema),z.lazy(() => Tmp_picturesUncheckedUpdateWithoutReportInputSchema) ]), -}).strict(); - -export const Tmp_picturesUpdateManyWithWhereWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Tmp_picturesScalarWhereInputSchema), - data: z.union([ z.lazy(() => Tmp_picturesUpdateManyMutationInputSchema),z.lazy(() => Tmp_picturesUncheckedUpdateManyWithoutTmp_picturesInputSchema) ]), -}).strict(); - -export const Tmp_picturesScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Tmp_picturesScalarWhereInputSchema),z.lazy(() => Tmp_picturesScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => Tmp_picturesScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Tmp_picturesScalarWhereInputSchema),z.lazy(() => Tmp_picturesScalarWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - reportId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - createdAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), -}).strict(); - -export const ReportCreateWithoutTmp_picturesInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - projectDescription: z.string().optional().nullable(), - redactedBy: z.string().optional().nullable(), - meetDate: z.coerce.date().optional().nullable(), - applicantName: z.string().optional().nullable(), - applicantAddress: z.string().optional().nullable(), - projectCadastralRef: z.string().optional().nullable(), - projectSpaceType: z.string().optional().nullable(), - decision: z.string().optional().nullable(), - precisions: z.string().optional().nullable(), - contacts: z.string().optional().nullable(), - furtherInformation: z.string().optional().nullable(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().optional().nullable(), - pdf: z.string().optional().nullable(), - disabled: z.boolean().optional().nullable(), - udap_id: z.string().optional().nullable(), - redactedById: z.string().optional().nullable(), - applicantEmail: z.string().optional().nullable(), - city: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - pictures: z.lazy(() => PicturesCreateNestedManyWithoutReportInputSchema).optional(), - user: z.lazy(() => UserCreateNestedOneWithoutReportInputSchema) -}).strict(); - -export const ReportUncheckedCreateWithoutTmp_picturesInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - projectDescription: z.string().optional().nullable(), - redactedBy: z.string().optional().nullable(), - meetDate: z.coerce.date().optional().nullable(), - applicantName: z.string().optional().nullable(), - applicantAddress: z.string().optional().nullable(), - projectCadastralRef: z.string().optional().nullable(), - projectSpaceType: z.string().optional().nullable(), - decision: z.string().optional().nullable(), - precisions: z.string().optional().nullable(), - contacts: z.string().optional().nullable(), - furtherInformation: z.string().optional().nullable(), - createdBy: z.string(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().optional().nullable(), - pdf: z.string().optional().nullable(), - disabled: z.boolean().optional().nullable(), - udap_id: z.string().optional().nullable(), - redactedById: z.string().optional().nullable(), - applicantEmail: z.string().optional().nullable(), - city: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - pictures: z.lazy(() => PicturesUncheckedCreateNestedManyWithoutReportInputSchema).optional() -}).strict(); - -export const ReportCreateOrConnectWithoutTmp_picturesInputSchema: z.ZodType = z.object({ - where: z.lazy(() => ReportWhereUniqueInputSchema), - create: z.union([ z.lazy(() => ReportCreateWithoutTmp_picturesInputSchema),z.lazy(() => ReportUncheckedCreateWithoutTmp_picturesInputSchema) ]), -}).strict(); - -export const ReportUpsertWithoutTmp_picturesInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => ReportUpdateWithoutTmp_picturesInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutTmp_picturesInputSchema) ]), - create: z.union([ z.lazy(() => ReportCreateWithoutTmp_picturesInputSchema),z.lazy(() => ReportUncheckedCreateWithoutTmp_picturesInputSchema) ]), -}).strict(); - -export const ReportUpdateWithoutTmp_picturesInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pictures: z.lazy(() => PicturesUpdateManyWithoutReportNestedInputSchema).optional(), - user: z.lazy(() => UserUpdateOneRequiredWithoutReportNestedInputSchema).optional() -}).strict(); - -export const ReportUncheckedUpdateWithoutTmp_picturesInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdBy: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pictures: z.lazy(() => PicturesUncheckedUpdateManyWithoutReportNestedInputSchema).optional() -}).strict(); - -export const UserCreateWithoutUdapInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationCreateNestedManyWithoutUser_delegation_createdByTouserInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationCreateNestedManyWithoutUser_delegation_delegatedToTouserInputSchema).optional(), - report: z.lazy(() => ReportCreateNestedManyWithoutUserInputSchema).optional() -}).strict(); - -export const UserUncheckedCreateWithoutUdapInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUncheckedCreateNestedManyWithoutUser_delegation_createdByTouserInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUncheckedCreateNestedManyWithoutUser_delegation_delegatedToTouserInputSchema).optional(), - report: z.lazy(() => ReportUncheckedCreateNestedManyWithoutUserInputSchema).optional() -}).strict(); - -export const UserCreateOrConnectWithoutUdapInputSchema: z.ZodType = z.object({ - where: z.lazy(() => UserWhereUniqueInputSchema), - create: z.union([ z.lazy(() => UserCreateWithoutUdapInputSchema),z.lazy(() => UserUncheckedCreateWithoutUdapInputSchema) ]), -}).strict(); - -export const UserCreateManyUdapInputEnvelopeSchema: z.ZodType = z.object({ - data: z.lazy(() => UserCreateManyUdapInputSchema).array(), - skipDuplicates: z.boolean().optional() -}).strict(); - -export const UserUpsertWithWhereUniqueWithoutUdapInputSchema: z.ZodType = z.object({ - where: z.lazy(() => UserWhereUniqueInputSchema), - update: z.union([ z.lazy(() => UserUpdateWithoutUdapInputSchema),z.lazy(() => UserUncheckedUpdateWithoutUdapInputSchema) ]), - create: z.union([ z.lazy(() => UserCreateWithoutUdapInputSchema),z.lazy(() => UserUncheckedCreateWithoutUdapInputSchema) ]), -}).strict(); - -export const UserUpdateWithWhereUniqueWithoutUdapInputSchema: z.ZodType = z.object({ - where: z.lazy(() => UserWhereUniqueInputSchema), - data: z.union([ z.lazy(() => UserUpdateWithoutUdapInputSchema),z.lazy(() => UserUncheckedUpdateWithoutUdapInputSchema) ]), -}).strict(); - -export const UserUpdateManyWithWhereWithoutUdapInputSchema: z.ZodType = z.object({ - where: z.lazy(() => UserScalarWhereInputSchema), - data: z.union([ z.lazy(() => UserUpdateManyMutationInputSchema),z.lazy(() => UserUncheckedUpdateManyWithoutUserInputSchema) ]), -}).strict(); - -export const UserScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => UserScalarWhereInputSchema),z.lazy(() => UserScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => UserScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => UserScalarWhereInputSchema),z.lazy(() => UserScalarWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - udap_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), -}).strict(); - -export const DelegationCreateWithoutUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - user_delegation_delegatedToTouser: z.lazy(() => UserCreateNestedOneWithoutDelegation_delegation_delegatedToTouserInputSchema) -}).strict(); - -export const DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - delegatedTo: z.string() -}).strict(); - -export const DelegationCreateOrConnectWithoutUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => DelegationWhereUniqueInputSchema), - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema) ]), -}).strict(); - -export const DelegationCreateManyUser_delegation_createdByTouserInputEnvelopeSchema: z.ZodType = z.object({ - data: z.lazy(() => DelegationCreateManyUser_delegation_createdByTouserInputSchema).array(), - skipDuplicates: z.boolean().optional() -}).strict(); - -export const DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - user_delegation_createdByTouser: z.lazy(() => UserCreateNestedOneWithoutDelegation_delegation_createdByTouserInputSchema) -}).strict(); - -export const DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - createdBy: z.string() -}).strict(); - -export const DelegationCreateOrConnectWithoutUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => DelegationWhereUniqueInputSchema), - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema) ]), -}).strict(); - -export const DelegationCreateManyUser_delegation_delegatedToTouserInputEnvelopeSchema: z.ZodType = z.object({ - data: z.lazy(() => DelegationCreateManyUser_delegation_delegatedToTouserInputSchema).array(), - skipDuplicates: z.boolean().optional() -}).strict(); - -export const ReportCreateWithoutUserInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - projectDescription: z.string().optional().nullable(), - redactedBy: z.string().optional().nullable(), - meetDate: z.coerce.date().optional().nullable(), - applicantName: z.string().optional().nullable(), - applicantAddress: z.string().optional().nullable(), - projectCadastralRef: z.string().optional().nullable(), - projectSpaceType: z.string().optional().nullable(), - decision: z.string().optional().nullable(), - precisions: z.string().optional().nullable(), - contacts: z.string().optional().nullable(), - furtherInformation: z.string().optional().nullable(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().optional().nullable(), - pdf: z.string().optional().nullable(), - disabled: z.boolean().optional().nullable(), - udap_id: z.string().optional().nullable(), - redactedById: z.string().optional().nullable(), - applicantEmail: z.string().optional().nullable(), - city: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - pictures: z.lazy(() => PicturesCreateNestedManyWithoutReportInputSchema).optional(), - tmp_pictures: z.lazy(() => Tmp_picturesCreateNestedManyWithoutReportInputSchema).optional() -}).strict(); - -export const ReportUncheckedCreateWithoutUserInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - projectDescription: z.string().optional().nullable(), - redactedBy: z.string().optional().nullable(), - meetDate: z.coerce.date().optional().nullable(), - applicantName: z.string().optional().nullable(), - applicantAddress: z.string().optional().nullable(), - projectCadastralRef: z.string().optional().nullable(), - projectSpaceType: z.string().optional().nullable(), - decision: z.string().optional().nullable(), - precisions: z.string().optional().nullable(), - contacts: z.string().optional().nullable(), - furtherInformation: z.string().optional().nullable(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().optional().nullable(), - pdf: z.string().optional().nullable(), - disabled: z.boolean().optional().nullable(), - udap_id: z.string().optional().nullable(), - redactedById: z.string().optional().nullable(), - applicantEmail: z.string().optional().nullable(), - city: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - pictures: z.lazy(() => PicturesUncheckedCreateNestedManyWithoutReportInputSchema).optional(), - tmp_pictures: z.lazy(() => Tmp_picturesUncheckedCreateNestedManyWithoutReportInputSchema).optional() -}).strict(); - -export const ReportCreateOrConnectWithoutUserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => ReportWhereUniqueInputSchema), - create: z.union([ z.lazy(() => ReportCreateWithoutUserInputSchema),z.lazy(() => ReportUncheckedCreateWithoutUserInputSchema) ]), -}).strict(); - -export const ReportCreateManyUserInputEnvelopeSchema: z.ZodType = z.object({ - data: z.lazy(() => ReportCreateManyUserInputSchema).array(), - skipDuplicates: z.boolean().optional() -}).strict(); - -export const UdapCreateWithoutUserInputSchema: z.ZodType = z.object({ - id: z.string(), - department: z.string(), - completeCoords: z.string().optional().nullable(), - visible: z.boolean().optional().nullable(), - name: z.string().optional().nullable(), - address: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - city: z.string().optional().nullable(), - phone: z.string().optional().nullable(), - email: z.string().optional().nullable(), - marianne_text: z.string().optional().nullable(), - drac_text: z.string().optional().nullable(), - udap_text: z.string().optional().nullable() -}).strict(); - -export const UdapUncheckedCreateWithoutUserInputSchema: z.ZodType = z.object({ - id: z.string(), - department: z.string(), - completeCoords: z.string().optional().nullable(), - visible: z.boolean().optional().nullable(), - name: z.string().optional().nullable(), - address: z.string().optional().nullable(), - zipCode: z.string().optional().nullable(), - city: z.string().optional().nullable(), - phone: z.string().optional().nullable(), - email: z.string().optional().nullable(), - marianne_text: z.string().optional().nullable(), - drac_text: z.string().optional().nullable(), - udap_text: z.string().optional().nullable() -}).strict(); - -export const UdapCreateOrConnectWithoutUserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => UdapWhereUniqueInputSchema), - create: z.union([ z.lazy(() => UdapCreateWithoutUserInputSchema),z.lazy(() => UdapUncheckedCreateWithoutUserInputSchema) ]), -}).strict(); - -export const DelegationUpsertWithWhereUniqueWithoutUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => DelegationWhereUniqueInputSchema), - update: z.union([ z.lazy(() => DelegationUpdateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUncheckedUpdateWithoutUser_delegation_createdByTouserInputSchema) ]), - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInputSchema) ]), -}).strict(); - -export const DelegationUpdateWithWhereUniqueWithoutUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => DelegationWhereUniqueInputSchema), - data: z.union([ z.lazy(() => DelegationUpdateWithoutUser_delegation_createdByTouserInputSchema),z.lazy(() => DelegationUncheckedUpdateWithoutUser_delegation_createdByTouserInputSchema) ]), -}).strict(); - -export const DelegationUpdateManyWithWhereWithoutUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => DelegationScalarWhereInputSchema), - data: z.union([ z.lazy(() => DelegationUpdateManyMutationInputSchema),z.lazy(() => DelegationUncheckedUpdateManyWithoutDelegation_delegation_createdByTouserInputSchema) ]), -}).strict(); - -export const DelegationScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => DelegationScalarWhereInputSchema),z.lazy(() => DelegationScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => DelegationScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => DelegationScalarWhereInputSchema),z.lazy(() => DelegationScalarWhereInputSchema).array() ]).optional(), - createdBy: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - delegatedTo: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), -}).strict(); - -export const DelegationUpsertWithWhereUniqueWithoutUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => DelegationWhereUniqueInputSchema), - update: z.union([ z.lazy(() => DelegationUpdateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUncheckedUpdateWithoutUser_delegation_delegatedToTouserInputSchema) ]), - create: z.union([ z.lazy(() => DelegationCreateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInputSchema) ]), -}).strict(); - -export const DelegationUpdateWithWhereUniqueWithoutUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => DelegationWhereUniqueInputSchema), - data: z.union([ z.lazy(() => DelegationUpdateWithoutUser_delegation_delegatedToTouserInputSchema),z.lazy(() => DelegationUncheckedUpdateWithoutUser_delegation_delegatedToTouserInputSchema) ]), -}).strict(); - -export const DelegationUpdateManyWithWhereWithoutUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => DelegationScalarWhereInputSchema), - data: z.union([ z.lazy(() => DelegationUpdateManyMutationInputSchema),z.lazy(() => DelegationUncheckedUpdateManyWithoutDelegation_delegation_delegatedToTouserInputSchema) ]), -}).strict(); - -export const ReportUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => ReportWhereUniqueInputSchema), - update: z.union([ z.lazy(() => ReportUpdateWithoutUserInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutUserInputSchema) ]), - create: z.union([ z.lazy(() => ReportCreateWithoutUserInputSchema),z.lazy(() => ReportUncheckedCreateWithoutUserInputSchema) ]), -}).strict(); - -export const ReportUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => ReportWhereUniqueInputSchema), - data: z.union([ z.lazy(() => ReportUpdateWithoutUserInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutUserInputSchema) ]), -}).strict(); - -export const ReportUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = z.object({ - where: z.lazy(() => ReportScalarWhereInputSchema), - data: z.union([ z.lazy(() => ReportUpdateManyMutationInputSchema),z.lazy(() => ReportUncheckedUpdateManyWithoutReportInputSchema) ]), -}).strict(); - -export const ReportScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => ReportScalarWhereInputSchema),z.lazy(() => ReportScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => ReportScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => ReportScalarWhereInputSchema),z.lazy(() => ReportScalarWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - title: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - projectDescription: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - redactedBy: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - meetDate: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), - applicantName: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - applicantAddress: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - projectCadastralRef: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - createdBy: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), - serviceInstructeur: z.union([ z.lazy(() => IntNullableFilterSchema),z.number() ]).optional().nullable(), - pdf: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - disabled: z.union([ z.lazy(() => BoolNullableFilterSchema),z.boolean() ]).optional().nullable(), - udap_id: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - redactedById: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - applicantEmail: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - city: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), - zipCode: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), -}).strict(); - -export const UdapUpsertWithoutUserInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => UdapUpdateWithoutUserInputSchema),z.lazy(() => UdapUncheckedUpdateWithoutUserInputSchema) ]), - create: z.union([ z.lazy(() => UdapCreateWithoutUserInputSchema),z.lazy(() => UdapUncheckedCreateWithoutUserInputSchema) ]), -}).strict(); - -export const UdapUpdateWithoutUserInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - department: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - completeCoords: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - visible: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - phone: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - marianne_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - drac_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const UdapUncheckedUpdateWithoutUserInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - department: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - completeCoords: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - visible: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - address: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - phone: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - marianne_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - drac_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_text: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const PicturesCreateManyReportInputSchema: z.ZodType = z.object({ - id: z.string(), - url: z.string().optional().nullable(), - createdAt: z.coerce.date().optional().nullable(), - finalUrl: z.string().optional().nullable() -}).strict(); - -export const Tmp_picturesCreateManyReportInputSchema: z.ZodType = z.object({ - id: z.string(), - createdAt: z.coerce.date().optional().nullable() -}).strict(); - -export const PicturesUpdateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - url: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - finalUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const PicturesUncheckedUpdateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - url: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - finalUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const PicturesUncheckedUpdateManyWithoutPicturesInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - url: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - finalUrl: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Tmp_picturesUpdateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Tmp_picturesUncheckedUpdateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const Tmp_picturesUncheckedUpdateManyWithoutTmp_picturesInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -export const UserCreateManyUdapInputSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string() -}).strict(); - -export const UserUpdateWithoutUdapInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUpdateManyWithoutUser_delegation_createdByTouserNestedInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema).optional(), - report: z.lazy(() => ReportUpdateManyWithoutUserNestedInputSchema).optional() -}).strict(); - -export const UserUncheckedUpdateWithoutUdapInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - delegation_delegation_createdByTouser: z.lazy(() => DelegationUncheckedUpdateManyWithoutUser_delegation_createdByTouserNestedInputSchema).optional(), - delegation_delegation_delegatedToTouser: z.lazy(() => DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema).optional(), - report: z.lazy(() => ReportUncheckedUpdateManyWithoutUserNestedInputSchema).optional() -}).strict(); - -export const UserUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const DelegationCreateManyUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - delegatedTo: z.string() -}).strict(); - -export const DelegationCreateManyUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - createdBy: z.string() -}).strict(); - -export const ReportCreateManyUserInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - projectDescription: z.string().optional().nullable(), - redactedBy: z.string().optional().nullable(), - meetDate: z.coerce.date().optional().nullable(), - applicantName: z.string().optional().nullable(), - applicantAddress: z.string().optional().nullable(), - projectCadastralRef: z.string().optional().nullable(), - projectSpaceType: z.string().optional().nullable(), - decision: z.string().optional().nullable(), - precisions: z.string().optional().nullable(), - contacts: z.string().optional().nullable(), - furtherInformation: z.string().optional().nullable(), - createdAt: z.coerce.date(), - serviceInstructeur: z.number().int().gte(-2147483648).lte(2147483647).optional().nullable(), - pdf: z.string().optional().nullable(), - disabled: z.boolean().optional().nullable(), - udap_id: z.string().optional().nullable(), - redactedById: z.string().optional().nullable(), - applicantEmail: z.string().optional().nullable(), - city: z.string().optional().nullable(), - zipCode: z.string().optional().nullable() -}).strict(); - -export const DelegationUpdateWithoutUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - user_delegation_delegatedToTouser: z.lazy(() => UserUpdateOneRequiredWithoutDelegation_delegation_delegatedToTouserNestedInputSchema).optional() -}).strict(); - -export const DelegationUncheckedUpdateWithoutUser_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - delegatedTo: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const DelegationUncheckedUpdateManyWithoutDelegation_delegation_createdByTouserInputSchema: z.ZodType = z.object({ - delegatedTo: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const DelegationUpdateWithoutUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - user_delegation_createdByTouser: z.lazy(() => UserUpdateOneRequiredWithoutDelegation_delegation_createdByTouserNestedInputSchema).optional() -}).strict(); - -export const DelegationUncheckedUpdateWithoutUser_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - createdBy: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const DelegationUncheckedUpdateManyWithoutDelegation_delegation_delegatedToTouserInputSchema: z.ZodType = z.object({ - createdBy: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const ReportUpdateWithoutUserInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pictures: z.lazy(() => PicturesUpdateManyWithoutReportNestedInputSchema).optional(), - tmp_pictures: z.lazy(() => Tmp_picturesUpdateManyWithoutReportNestedInputSchema).optional() -}).strict(); - -export const ReportUncheckedUpdateWithoutUserInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number(),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pictures: z.lazy(() => PicturesUncheckedUpdateManyWithoutReportNestedInputSchema).optional(), - tmp_pictures: z.lazy(() => Tmp_picturesUncheckedUpdateManyWithoutReportNestedInputSchema).optional() -}).strict(); - -export const ReportUncheckedUpdateManyWithoutReportInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectDescription: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedBy: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - meetDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantName: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantAddress: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectCadastralRef: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - projectSpaceType: 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(), - furtherInformation: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), - serviceInstructeur: z.union([ z.number().int().gte(-2147483648).lte(2147483647),z.lazy(() => NullableIntFieldUpdateOperationsInputSchema) ]).optional().nullable(), - pdf: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), - udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), -}).strict(); - -///////////////////////////////////////// -// ARGS -///////////////////////////////////////// - -export const ClauseFindFirstArgsSchema: z.ZodType = z.object({ - select: ClauseSelectSchema.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() - -export const ClauseFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: ClauseSelectSchema.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() - -export const ClauseFindManyArgsSchema: z.ZodType = z.object({ - select: ClauseSelectSchema.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() - -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() - -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() - -export const ClauseFindUniqueArgsSchema: z.ZodType = z.object({ - select: ClauseSelectSchema.optional(), - where: ClauseWhereUniqueInputSchema, -}).strict() - -export const ClauseFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: ClauseSelectSchema.optional(), - where: ClauseWhereUniqueInputSchema, -}).strict() - -export const Clause_v2FindFirstArgsSchema: z.ZodType = z.object({ - select: Clause_v2SelectSchema.optional(), - where: Clause_v2WhereInputSchema.optional(), - orderBy: z.union([ Clause_v2OrderByWithRelationInputSchema.array(),Clause_v2OrderByWithRelationInputSchema ]).optional(), - cursor: Clause_v2WhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Clause_v2ScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Clause_v2FindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: Clause_v2SelectSchema.optional(), - where: Clause_v2WhereInputSchema.optional(), - orderBy: z.union([ Clause_v2OrderByWithRelationInputSchema.array(),Clause_v2OrderByWithRelationInputSchema ]).optional(), - cursor: Clause_v2WhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Clause_v2ScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Clause_v2FindManyArgsSchema: z.ZodType = z.object({ - select: Clause_v2SelectSchema.optional(), - where: Clause_v2WhereInputSchema.optional(), - orderBy: z.union([ Clause_v2OrderByWithRelationInputSchema.array(),Clause_v2OrderByWithRelationInputSchema ]).optional(), - cursor: Clause_v2WhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Clause_v2ScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Clause_v2AggregateArgsSchema: z.ZodType = z.object({ - where: Clause_v2WhereInputSchema.optional(), - orderBy: z.union([ Clause_v2OrderByWithRelationInputSchema.array(),Clause_v2OrderByWithRelationInputSchema ]).optional(), - cursor: Clause_v2WhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() - -export const Clause_v2GroupByArgsSchema: z.ZodType = z.object({ - where: Clause_v2WhereInputSchema.optional(), - orderBy: z.union([ Clause_v2OrderByWithAggregationInputSchema.array(),Clause_v2OrderByWithAggregationInputSchema ]).optional(), - by: Clause_v2ScalarFieldEnumSchema.array(), - having: Clause_v2ScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() - -export const Clause_v2FindUniqueArgsSchema: z.ZodType = z.object({ - select: Clause_v2SelectSchema.optional(), - where: Clause_v2WhereUniqueInputSchema, -}).strict() - -export const Clause_v2FindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: Clause_v2SelectSchema.optional(), - where: Clause_v2WhereUniqueInputSchema, -}).strict() - -export const DelegationFindFirstArgsSchema: z.ZodType = z.object({ - select: DelegationSelectSchema.optional(), - include: DelegationIncludeSchema.optional(), - where: DelegationWhereInputSchema.optional(), - orderBy: z.union([ DelegationOrderByWithRelationInputSchema.array(),DelegationOrderByWithRelationInputSchema ]).optional(), - cursor: DelegationWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: DelegationScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const DelegationFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: DelegationSelectSchema.optional(), - include: DelegationIncludeSchema.optional(), - where: DelegationWhereInputSchema.optional(), - orderBy: z.union([ DelegationOrderByWithRelationInputSchema.array(),DelegationOrderByWithRelationInputSchema ]).optional(), - cursor: DelegationWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: DelegationScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const DelegationFindManyArgsSchema: z.ZodType = z.object({ - select: DelegationSelectSchema.optional(), - include: DelegationIncludeSchema.optional(), - where: DelegationWhereInputSchema.optional(), - orderBy: z.union([ DelegationOrderByWithRelationInputSchema.array(),DelegationOrderByWithRelationInputSchema ]).optional(), - cursor: DelegationWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: DelegationScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const DelegationAggregateArgsSchema: z.ZodType = z.object({ - where: DelegationWhereInputSchema.optional(), - orderBy: z.union([ DelegationOrderByWithRelationInputSchema.array(),DelegationOrderByWithRelationInputSchema ]).optional(), - cursor: DelegationWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const DelegationGroupByArgsSchema: z.ZodType = z.object({ - where: DelegationWhereInputSchema.optional(), - orderBy: z.union([ DelegationOrderByWithAggregationInputSchema.array(),DelegationOrderByWithAggregationInputSchema ]).optional(), - by: DelegationScalarFieldEnumSchema.array(), - having: DelegationScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const DelegationFindUniqueArgsSchema: z.ZodType = z.object({ - select: DelegationSelectSchema.optional(), - include: DelegationIncludeSchema.optional(), - where: DelegationWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const DelegationFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: DelegationSelectSchema.optional(), - include: DelegationIncludeSchema.optional(), - where: DelegationWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const Pdf_snapshotFindFirstArgsSchema: z.ZodType = z.object({ - select: Pdf_snapshotSelectSchema.optional(), - where: Pdf_snapshotWhereInputSchema.optional(), - orderBy: z.union([ Pdf_snapshotOrderByWithRelationInputSchema.array(),Pdf_snapshotOrderByWithRelationInputSchema ]).optional(), - cursor: Pdf_snapshotWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Pdf_snapshotScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Pdf_snapshotFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: Pdf_snapshotSelectSchema.optional(), - where: Pdf_snapshotWhereInputSchema.optional(), - orderBy: z.union([ Pdf_snapshotOrderByWithRelationInputSchema.array(),Pdf_snapshotOrderByWithRelationInputSchema ]).optional(), - cursor: Pdf_snapshotWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Pdf_snapshotScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Pdf_snapshotFindManyArgsSchema: z.ZodType = z.object({ - select: Pdf_snapshotSelectSchema.optional(), - where: Pdf_snapshotWhereInputSchema.optional(), - orderBy: z.union([ Pdf_snapshotOrderByWithRelationInputSchema.array(),Pdf_snapshotOrderByWithRelationInputSchema ]).optional(), - cursor: Pdf_snapshotWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Pdf_snapshotScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Pdf_snapshotAggregateArgsSchema: z.ZodType = z.object({ - where: Pdf_snapshotWhereInputSchema.optional(), - orderBy: z.union([ Pdf_snapshotOrderByWithRelationInputSchema.array(),Pdf_snapshotOrderByWithRelationInputSchema ]).optional(), - cursor: Pdf_snapshotWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() - -export const Pdf_snapshotGroupByArgsSchema: z.ZodType = z.object({ - where: Pdf_snapshotWhereInputSchema.optional(), - orderBy: z.union([ Pdf_snapshotOrderByWithAggregationInputSchema.array(),Pdf_snapshotOrderByWithAggregationInputSchema ]).optional(), - by: Pdf_snapshotScalarFieldEnumSchema.array(), - having: Pdf_snapshotScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() - -export const Pdf_snapshotFindUniqueArgsSchema: z.ZodType = z.object({ - select: Pdf_snapshotSelectSchema.optional(), - where: Pdf_snapshotWhereUniqueInputSchema, -}).strict() - -export const Pdf_snapshotFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: Pdf_snapshotSelectSchema.optional(), - where: Pdf_snapshotWhereUniqueInputSchema, -}).strict() - -export const Picture_linesFindFirstArgsSchema: z.ZodType = z.object({ - select: Picture_linesSelectSchema.optional(), - where: Picture_linesWhereInputSchema.optional(), - orderBy: z.union([ Picture_linesOrderByWithRelationInputSchema.array(),Picture_linesOrderByWithRelationInputSchema ]).optional(), - cursor: Picture_linesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Picture_linesScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Picture_linesFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: Picture_linesSelectSchema.optional(), - where: Picture_linesWhereInputSchema.optional(), - orderBy: z.union([ Picture_linesOrderByWithRelationInputSchema.array(),Picture_linesOrderByWithRelationInputSchema ]).optional(), - cursor: Picture_linesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Picture_linesScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Picture_linesFindManyArgsSchema: z.ZodType = z.object({ - select: Picture_linesSelectSchema.optional(), - where: Picture_linesWhereInputSchema.optional(), - orderBy: z.union([ Picture_linesOrderByWithRelationInputSchema.array(),Picture_linesOrderByWithRelationInputSchema ]).optional(), - cursor: Picture_linesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Picture_linesScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Picture_linesAggregateArgsSchema: z.ZodType = z.object({ - where: Picture_linesWhereInputSchema.optional(), - orderBy: z.union([ Picture_linesOrderByWithRelationInputSchema.array(),Picture_linesOrderByWithRelationInputSchema ]).optional(), - cursor: Picture_linesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() - -export const Picture_linesGroupByArgsSchema: z.ZodType = z.object({ - where: Picture_linesWhereInputSchema.optional(), - orderBy: z.union([ Picture_linesOrderByWithAggregationInputSchema.array(),Picture_linesOrderByWithAggregationInputSchema ]).optional(), - by: Picture_linesScalarFieldEnumSchema.array(), - having: Picture_linesScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() - -export const Picture_linesFindUniqueArgsSchema: z.ZodType = z.object({ - select: Picture_linesSelectSchema.optional(), - where: Picture_linesWhereUniqueInputSchema, -}).strict() - -export const Picture_linesFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: Picture_linesSelectSchema.optional(), - where: Picture_linesWhereUniqueInputSchema, -}).strict() - -export const PicturesFindFirstArgsSchema: z.ZodType = z.object({ - select: PicturesSelectSchema.optional(), - include: PicturesIncludeSchema.optional(), - where: PicturesWhereInputSchema.optional(), - orderBy: z.union([ PicturesOrderByWithRelationInputSchema.array(),PicturesOrderByWithRelationInputSchema ]).optional(), - cursor: PicturesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: PicturesScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const PicturesFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: PicturesSelectSchema.optional(), - include: PicturesIncludeSchema.optional(), - where: PicturesWhereInputSchema.optional(), - orderBy: z.union([ PicturesOrderByWithRelationInputSchema.array(),PicturesOrderByWithRelationInputSchema ]).optional(), - cursor: PicturesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: PicturesScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const PicturesFindManyArgsSchema: z.ZodType = z.object({ - select: PicturesSelectSchema.optional(), - include: PicturesIncludeSchema.optional(), - where: PicturesWhereInputSchema.optional(), - orderBy: z.union([ PicturesOrderByWithRelationInputSchema.array(),PicturesOrderByWithRelationInputSchema ]).optional(), - cursor: PicturesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: PicturesScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const PicturesAggregateArgsSchema: z.ZodType = z.object({ - where: PicturesWhereInputSchema.optional(), - orderBy: z.union([ PicturesOrderByWithRelationInputSchema.array(),PicturesOrderByWithRelationInputSchema ]).optional(), - cursor: PicturesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const PicturesGroupByArgsSchema: z.ZodType = z.object({ - where: PicturesWhereInputSchema.optional(), - orderBy: z.union([ PicturesOrderByWithAggregationInputSchema.array(),PicturesOrderByWithAggregationInputSchema ]).optional(), - by: PicturesScalarFieldEnumSchema.array(), - having: PicturesScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const PicturesFindUniqueArgsSchema: z.ZodType = z.object({ - select: PicturesSelectSchema.optional(), - include: PicturesIncludeSchema.optional(), - where: PicturesWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const PicturesFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: PicturesSelectSchema.optional(), - include: PicturesIncludeSchema.optional(), - where: PicturesWhereUniqueInputSchema, -}).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 Service_instructeursFindFirstArgsSchema: z.ZodType = z.object({ - select: Service_instructeursSelectSchema.optional(), - where: Service_instructeursWhereInputSchema.optional(), - orderBy: z.union([ Service_instructeursOrderByWithRelationInputSchema.array(),Service_instructeursOrderByWithRelationInputSchema ]).optional(), - cursor: Service_instructeursWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Service_instructeursScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Service_instructeursFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: Service_instructeursSelectSchema.optional(), - where: Service_instructeursWhereInputSchema.optional(), - orderBy: z.union([ Service_instructeursOrderByWithRelationInputSchema.array(),Service_instructeursOrderByWithRelationInputSchema ]).optional(), - cursor: Service_instructeursWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Service_instructeursScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Service_instructeursFindManyArgsSchema: z.ZodType = z.object({ - select: Service_instructeursSelectSchema.optional(), - where: Service_instructeursWhereInputSchema.optional(), - orderBy: z.union([ Service_instructeursOrderByWithRelationInputSchema.array(),Service_instructeursOrderByWithRelationInputSchema ]).optional(), - cursor: Service_instructeursWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Service_instructeursScalarFieldEnumSchema.array().optional(), -}).strict() - -export const Service_instructeursAggregateArgsSchema: z.ZodType = z.object({ - where: Service_instructeursWhereInputSchema.optional(), - orderBy: z.union([ Service_instructeursOrderByWithRelationInputSchema.array(),Service_instructeursOrderByWithRelationInputSchema ]).optional(), - cursor: Service_instructeursWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() - -export const Service_instructeursGroupByArgsSchema: z.ZodType = z.object({ - where: Service_instructeursWhereInputSchema.optional(), - orderBy: z.union([ Service_instructeursOrderByWithAggregationInputSchema.array(),Service_instructeursOrderByWithAggregationInputSchema ]).optional(), - by: Service_instructeursScalarFieldEnumSchema.array(), - having: Service_instructeursScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() - -export const Service_instructeursFindUniqueArgsSchema: z.ZodType = z.object({ - select: Service_instructeursSelectSchema.optional(), - where: Service_instructeursWhereUniqueInputSchema, -}).strict() - -export const Service_instructeursFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: Service_instructeursSelectSchema.optional(), - where: Service_instructeursWhereUniqueInputSchema, -}).strict() - -export const Tmp_picturesFindFirstArgsSchema: z.ZodType = z.object({ - select: Tmp_picturesSelectSchema.optional(), - include: Tmp_picturesIncludeSchema.optional(), - where: Tmp_picturesWhereInputSchema.optional(), - orderBy: z.union([ Tmp_picturesOrderByWithRelationInputSchema.array(),Tmp_picturesOrderByWithRelationInputSchema ]).optional(), - cursor: Tmp_picturesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Tmp_picturesScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const Tmp_picturesFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: Tmp_picturesSelectSchema.optional(), - include: Tmp_picturesIncludeSchema.optional(), - where: Tmp_picturesWhereInputSchema.optional(), - orderBy: z.union([ Tmp_picturesOrderByWithRelationInputSchema.array(),Tmp_picturesOrderByWithRelationInputSchema ]).optional(), - cursor: Tmp_picturesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Tmp_picturesScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const Tmp_picturesFindManyArgsSchema: z.ZodType = z.object({ - select: Tmp_picturesSelectSchema.optional(), - include: Tmp_picturesIncludeSchema.optional(), - where: Tmp_picturesWhereInputSchema.optional(), - orderBy: z.union([ Tmp_picturesOrderByWithRelationInputSchema.array(),Tmp_picturesOrderByWithRelationInputSchema ]).optional(), - cursor: Tmp_picturesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Tmp_picturesScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const Tmp_picturesAggregateArgsSchema: z.ZodType = z.object({ - where: Tmp_picturesWhereInputSchema.optional(), - orderBy: z.union([ Tmp_picturesOrderByWithRelationInputSchema.array(),Tmp_picturesOrderByWithRelationInputSchema ]).optional(), - cursor: Tmp_picturesWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const Tmp_picturesGroupByArgsSchema: z.ZodType = z.object({ - where: Tmp_picturesWhereInputSchema.optional(), - orderBy: z.union([ Tmp_picturesOrderByWithAggregationInputSchema.array(),Tmp_picturesOrderByWithAggregationInputSchema ]).optional(), - by: Tmp_picturesScalarFieldEnumSchema.array(), - having: Tmp_picturesScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const Tmp_picturesFindUniqueArgsSchema: z.ZodType = z.object({ - select: Tmp_picturesSelectSchema.optional(), - include: Tmp_picturesIncludeSchema.optional(), - where: Tmp_picturesWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const Tmp_picturesFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: Tmp_picturesSelectSchema.optional(), - include: Tmp_picturesIncludeSchema.optional(), - where: Tmp_picturesWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const UdapFindFirstArgsSchema: z.ZodType = z.object({ - select: UdapSelectSchema.optional(), - include: UdapIncludeSchema.optional(), - where: UdapWhereInputSchema.optional(), - orderBy: z.union([ UdapOrderByWithRelationInputSchema.array(),UdapOrderByWithRelationInputSchema ]).optional(), - cursor: UdapWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: UdapScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const UdapFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: UdapSelectSchema.optional(), - include: UdapIncludeSchema.optional(), - where: UdapWhereInputSchema.optional(), - orderBy: z.union([ UdapOrderByWithRelationInputSchema.array(),UdapOrderByWithRelationInputSchema ]).optional(), - cursor: UdapWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: UdapScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const UdapFindManyArgsSchema: z.ZodType = z.object({ - select: UdapSelectSchema.optional(), - include: UdapIncludeSchema.optional(), - where: UdapWhereInputSchema.optional(), - orderBy: z.union([ UdapOrderByWithRelationInputSchema.array(),UdapOrderByWithRelationInputSchema ]).optional(), - cursor: UdapWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: UdapScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const UdapAggregateArgsSchema: z.ZodType = z.object({ - where: UdapWhereInputSchema.optional(), - orderBy: z.union([ UdapOrderByWithRelationInputSchema.array(),UdapOrderByWithRelationInputSchema ]).optional(), - cursor: UdapWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const UdapGroupByArgsSchema: z.ZodType = z.object({ - where: UdapWhereInputSchema.optional(), - orderBy: z.union([ UdapOrderByWithAggregationInputSchema.array(),UdapOrderByWithAggregationInputSchema ]).optional(), - by: UdapScalarFieldEnumSchema.array(), - having: UdapScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const UdapFindUniqueArgsSchema: z.ZodType = z.object({ - select: UdapSelectSchema.optional(), - include: UdapIncludeSchema.optional(), - where: UdapWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const UdapFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: UdapSelectSchema.optional(), - include: UdapIncludeSchema.optional(), - where: UdapWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const UserFindFirstArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - include: UserIncludeSchema.optional(), - where: UserWhereInputSchema.optional(), - orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), - cursor: UserWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: UserScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const UserFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - include: UserIncludeSchema.optional(), - where: UserWhereInputSchema.optional(), - orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), - cursor: UserWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: UserScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const UserFindManyArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - include: UserIncludeSchema.optional(), - where: UserWhereInputSchema.optional(), - orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), - cursor: UserWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: UserScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const UserAggregateArgsSchema: z.ZodType = z.object({ - where: UserWhereInputSchema.optional(), - orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), - cursor: UserWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const UserGroupByArgsSchema: z.ZodType = z.object({ - where: UserWhereInputSchema.optional(), - orderBy: z.union([ UserOrderByWithAggregationInputSchema.array(),UserOrderByWithAggregationInputSchema ]).optional(), - by: UserScalarFieldEnumSchema.array(), - having: UserScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const UserFindUniqueArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - include: UserIncludeSchema.optional(), - where: UserWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const UserFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - include: UserIncludeSchema.optional(), - where: UserWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const ClauseCreateArgsSchema: z.ZodType = z.object({ - select: ClauseSelectSchema.optional(), - data: z.union([ ClauseCreateInputSchema,ClauseUncheckedCreateInputSchema ]), -}).strict() - -export const ClauseUpsertArgsSchema: z.ZodType = z.object({ - select: ClauseSelectSchema.optional(), - where: ClauseWhereUniqueInputSchema, - create: z.union([ ClauseCreateInputSchema,ClauseUncheckedCreateInputSchema ]), - update: z.union([ ClauseUpdateInputSchema,ClauseUncheckedUpdateInputSchema ]), -}).strict() - -export const ClauseCreateManyArgsSchema: z.ZodType = z.object({ - data: ClauseCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() - -export const ClauseDeleteArgsSchema: z.ZodType = z.object({ - select: ClauseSelectSchema.optional(), - where: ClauseWhereUniqueInputSchema, -}).strict() - -export const ClauseUpdateArgsSchema: z.ZodType = z.object({ - select: ClauseSelectSchema.optional(), - data: z.union([ ClauseUpdateInputSchema,ClauseUncheckedUpdateInputSchema ]), - where: ClauseWhereUniqueInputSchema, -}).strict() - -export const ClauseUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ ClauseUpdateManyMutationInputSchema,ClauseUncheckedUpdateManyInputSchema ]), - where: ClauseWhereInputSchema.optional(), -}).strict() - -export const ClauseDeleteManyArgsSchema: z.ZodType = z.object({ - where: ClauseWhereInputSchema.optional(), -}).strict() - -export const Clause_v2CreateArgsSchema: z.ZodType = z.object({ - select: Clause_v2SelectSchema.optional(), - data: z.union([ Clause_v2CreateInputSchema,Clause_v2UncheckedCreateInputSchema ]), -}).strict() - -export const Clause_v2UpsertArgsSchema: z.ZodType = z.object({ - select: Clause_v2SelectSchema.optional(), - where: Clause_v2WhereUniqueInputSchema, - create: z.union([ Clause_v2CreateInputSchema,Clause_v2UncheckedCreateInputSchema ]), - update: z.union([ Clause_v2UpdateInputSchema,Clause_v2UncheckedUpdateInputSchema ]), -}).strict() - -export const Clause_v2CreateManyArgsSchema: z.ZodType = z.object({ - data: Clause_v2CreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() - -export const Clause_v2DeleteArgsSchema: z.ZodType = z.object({ - select: Clause_v2SelectSchema.optional(), - where: Clause_v2WhereUniqueInputSchema, -}).strict() - -export const Clause_v2UpdateArgsSchema: z.ZodType = z.object({ - select: Clause_v2SelectSchema.optional(), - data: z.union([ Clause_v2UpdateInputSchema,Clause_v2UncheckedUpdateInputSchema ]), - where: Clause_v2WhereUniqueInputSchema, -}).strict() - -export const Clause_v2UpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ Clause_v2UpdateManyMutationInputSchema,Clause_v2UncheckedUpdateManyInputSchema ]), - where: Clause_v2WhereInputSchema.optional(), -}).strict() - -export const Clause_v2DeleteManyArgsSchema: z.ZodType = z.object({ - where: Clause_v2WhereInputSchema.optional(), -}).strict() - -export const DelegationCreateArgsSchema: z.ZodType = z.object({ - select: DelegationSelectSchema.optional(), - include: DelegationIncludeSchema.optional(), - data: z.union([ DelegationCreateInputSchema,DelegationUncheckedCreateInputSchema ]), -}).strict() as z.ZodType - -export const DelegationUpsertArgsSchema: z.ZodType = z.object({ - select: DelegationSelectSchema.optional(), - include: DelegationIncludeSchema.optional(), - where: DelegationWhereUniqueInputSchema, - create: z.union([ DelegationCreateInputSchema,DelegationUncheckedCreateInputSchema ]), - update: z.union([ DelegationUpdateInputSchema,DelegationUncheckedUpdateInputSchema ]), -}).strict() as z.ZodType - -export const DelegationCreateManyArgsSchema: z.ZodType = z.object({ - data: DelegationCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() as z.ZodType - -export const DelegationDeleteArgsSchema: z.ZodType = z.object({ - select: DelegationSelectSchema.optional(), - include: DelegationIncludeSchema.optional(), - where: DelegationWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const DelegationUpdateArgsSchema: z.ZodType = z.object({ - select: DelegationSelectSchema.optional(), - include: DelegationIncludeSchema.optional(), - data: z.union([ DelegationUpdateInputSchema,DelegationUncheckedUpdateInputSchema ]), - where: DelegationWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const DelegationUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ DelegationUpdateManyMutationInputSchema,DelegationUncheckedUpdateManyInputSchema ]), - where: DelegationWhereInputSchema.optional(), -}).strict() as z.ZodType - -export const DelegationDeleteManyArgsSchema: z.ZodType = z.object({ - where: DelegationWhereInputSchema.optional(), -}).strict() as z.ZodType - -export const Pdf_snapshotCreateArgsSchema: z.ZodType = z.object({ - select: Pdf_snapshotSelectSchema.optional(), - data: z.union([ Pdf_snapshotCreateInputSchema,Pdf_snapshotUncheckedCreateInputSchema ]), -}).strict() - -export const Pdf_snapshotUpsertArgsSchema: z.ZodType = z.object({ - select: Pdf_snapshotSelectSchema.optional(), - where: Pdf_snapshotWhereUniqueInputSchema, - create: z.union([ Pdf_snapshotCreateInputSchema,Pdf_snapshotUncheckedCreateInputSchema ]), - update: z.union([ Pdf_snapshotUpdateInputSchema,Pdf_snapshotUncheckedUpdateInputSchema ]), -}).strict() - -export const Pdf_snapshotCreateManyArgsSchema: z.ZodType = z.object({ - data: Pdf_snapshotCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() - -export const Pdf_snapshotDeleteArgsSchema: z.ZodType = z.object({ - select: Pdf_snapshotSelectSchema.optional(), - where: Pdf_snapshotWhereUniqueInputSchema, -}).strict() - -export const Pdf_snapshotUpdateArgsSchema: z.ZodType = z.object({ - select: Pdf_snapshotSelectSchema.optional(), - data: z.union([ Pdf_snapshotUpdateInputSchema,Pdf_snapshotUncheckedUpdateInputSchema ]), - where: Pdf_snapshotWhereUniqueInputSchema, -}).strict() - -export const Pdf_snapshotUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ Pdf_snapshotUpdateManyMutationInputSchema,Pdf_snapshotUncheckedUpdateManyInputSchema ]), - where: Pdf_snapshotWhereInputSchema.optional(), -}).strict() - -export const Pdf_snapshotDeleteManyArgsSchema: z.ZodType = z.object({ - where: Pdf_snapshotWhereInputSchema.optional(), -}).strict() - -export const Picture_linesCreateArgsSchema: z.ZodType = z.object({ - select: Picture_linesSelectSchema.optional(), - data: z.union([ Picture_linesCreateInputSchema,Picture_linesUncheckedCreateInputSchema ]), -}).strict() - -export const Picture_linesUpsertArgsSchema: z.ZodType = z.object({ - select: Picture_linesSelectSchema.optional(), - where: Picture_linesWhereUniqueInputSchema, - create: z.union([ Picture_linesCreateInputSchema,Picture_linesUncheckedCreateInputSchema ]), - update: z.union([ Picture_linesUpdateInputSchema,Picture_linesUncheckedUpdateInputSchema ]), -}).strict() - -export const Picture_linesCreateManyArgsSchema: z.ZodType = z.object({ - data: Picture_linesCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() - -export const Picture_linesDeleteArgsSchema: z.ZodType = z.object({ - select: Picture_linesSelectSchema.optional(), - where: Picture_linesWhereUniqueInputSchema, -}).strict() - -export const Picture_linesUpdateArgsSchema: z.ZodType = z.object({ - select: Picture_linesSelectSchema.optional(), - data: z.union([ Picture_linesUpdateInputSchema,Picture_linesUncheckedUpdateInputSchema ]), - where: Picture_linesWhereUniqueInputSchema, -}).strict() - -export const Picture_linesUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ Picture_linesUpdateManyMutationInputSchema,Picture_linesUncheckedUpdateManyInputSchema ]), - where: Picture_linesWhereInputSchema.optional(), -}).strict() - -export const Picture_linesDeleteManyArgsSchema: z.ZodType = z.object({ - where: Picture_linesWhereInputSchema.optional(), -}).strict() - -export const PicturesCreateArgsSchema: z.ZodType = z.object({ - select: PicturesSelectSchema.optional(), - include: PicturesIncludeSchema.optional(), - data: z.union([ PicturesCreateInputSchema,PicturesUncheckedCreateInputSchema ]), -}).strict() as z.ZodType - -export const PicturesUpsertArgsSchema: z.ZodType = z.object({ - select: PicturesSelectSchema.optional(), - include: PicturesIncludeSchema.optional(), - where: PicturesWhereUniqueInputSchema, - create: z.union([ PicturesCreateInputSchema,PicturesUncheckedCreateInputSchema ]), - update: z.union([ PicturesUpdateInputSchema,PicturesUncheckedUpdateInputSchema ]), -}).strict() as z.ZodType - -export const PicturesCreateManyArgsSchema: z.ZodType = z.object({ - data: PicturesCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() as z.ZodType - -export const PicturesDeleteArgsSchema: z.ZodType = z.object({ - select: PicturesSelectSchema.optional(), - include: PicturesIncludeSchema.optional(), - where: PicturesWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const PicturesUpdateArgsSchema: z.ZodType = z.object({ - select: PicturesSelectSchema.optional(), - include: PicturesIncludeSchema.optional(), - data: z.union([ PicturesUpdateInputSchema,PicturesUncheckedUpdateInputSchema ]), - where: PicturesWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const PicturesUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ PicturesUpdateManyMutationInputSchema,PicturesUncheckedUpdateManyInputSchema ]), - where: PicturesWhereInputSchema.optional(), -}).strict() as z.ZodType - -export const PicturesDeleteManyArgsSchema: z.ZodType = z.object({ - where: PicturesWhereInputSchema.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 Service_instructeursCreateArgsSchema: z.ZodType = z.object({ - select: Service_instructeursSelectSchema.optional(), - data: z.union([ Service_instructeursCreateInputSchema,Service_instructeursUncheckedCreateInputSchema ]), -}).strict() - -export const Service_instructeursUpsertArgsSchema: z.ZodType = z.object({ - select: Service_instructeursSelectSchema.optional(), - where: Service_instructeursWhereUniqueInputSchema, - create: z.union([ Service_instructeursCreateInputSchema,Service_instructeursUncheckedCreateInputSchema ]), - update: z.union([ Service_instructeursUpdateInputSchema,Service_instructeursUncheckedUpdateInputSchema ]), -}).strict() - -export const Service_instructeursCreateManyArgsSchema: z.ZodType = z.object({ - data: Service_instructeursCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() - -export const Service_instructeursDeleteArgsSchema: z.ZodType = z.object({ - select: Service_instructeursSelectSchema.optional(), - where: Service_instructeursWhereUniqueInputSchema, -}).strict() - -export const Service_instructeursUpdateArgsSchema: z.ZodType = z.object({ - select: Service_instructeursSelectSchema.optional(), - data: z.union([ Service_instructeursUpdateInputSchema,Service_instructeursUncheckedUpdateInputSchema ]), - where: Service_instructeursWhereUniqueInputSchema, -}).strict() - -export const Service_instructeursUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ Service_instructeursUpdateManyMutationInputSchema,Service_instructeursUncheckedUpdateManyInputSchema ]), - where: Service_instructeursWhereInputSchema.optional(), -}).strict() - -export const Service_instructeursDeleteManyArgsSchema: z.ZodType = z.object({ - where: Service_instructeursWhereInputSchema.optional(), -}).strict() - -export const Tmp_picturesCreateArgsSchema: z.ZodType = z.object({ - select: Tmp_picturesSelectSchema.optional(), - include: Tmp_picturesIncludeSchema.optional(), - data: z.union([ Tmp_picturesCreateInputSchema,Tmp_picturesUncheckedCreateInputSchema ]), -}).strict() as z.ZodType - -export const Tmp_picturesUpsertArgsSchema: z.ZodType = z.object({ - select: Tmp_picturesSelectSchema.optional(), - include: Tmp_picturesIncludeSchema.optional(), - where: Tmp_picturesWhereUniqueInputSchema, - create: z.union([ Tmp_picturesCreateInputSchema,Tmp_picturesUncheckedCreateInputSchema ]), - update: z.union([ Tmp_picturesUpdateInputSchema,Tmp_picturesUncheckedUpdateInputSchema ]), -}).strict() as z.ZodType - -export const Tmp_picturesCreateManyArgsSchema: z.ZodType = z.object({ - data: Tmp_picturesCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() as z.ZodType - -export const Tmp_picturesDeleteArgsSchema: z.ZodType = z.object({ - select: Tmp_picturesSelectSchema.optional(), - include: Tmp_picturesIncludeSchema.optional(), - where: Tmp_picturesWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const Tmp_picturesUpdateArgsSchema: z.ZodType = z.object({ - select: Tmp_picturesSelectSchema.optional(), - include: Tmp_picturesIncludeSchema.optional(), - data: z.union([ Tmp_picturesUpdateInputSchema,Tmp_picturesUncheckedUpdateInputSchema ]), - where: Tmp_picturesWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const Tmp_picturesUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ Tmp_picturesUpdateManyMutationInputSchema,Tmp_picturesUncheckedUpdateManyInputSchema ]), - where: Tmp_picturesWhereInputSchema.optional(), -}).strict() as z.ZodType - -export const Tmp_picturesDeleteManyArgsSchema: z.ZodType = z.object({ - where: Tmp_picturesWhereInputSchema.optional(), -}).strict() as z.ZodType - -export const UdapCreateArgsSchema: z.ZodType = z.object({ - select: UdapSelectSchema.optional(), - include: UdapIncludeSchema.optional(), - data: z.union([ UdapCreateInputSchema,UdapUncheckedCreateInputSchema ]), -}).strict() as z.ZodType - -export const UdapUpsertArgsSchema: z.ZodType = z.object({ - select: UdapSelectSchema.optional(), - include: UdapIncludeSchema.optional(), - where: UdapWhereUniqueInputSchema, - create: z.union([ UdapCreateInputSchema,UdapUncheckedCreateInputSchema ]), - update: z.union([ UdapUpdateInputSchema,UdapUncheckedUpdateInputSchema ]), -}).strict() as z.ZodType - -export const UdapCreateManyArgsSchema: z.ZodType = z.object({ - data: UdapCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() as z.ZodType - -export const UdapDeleteArgsSchema: z.ZodType = z.object({ - select: UdapSelectSchema.optional(), - include: UdapIncludeSchema.optional(), - where: UdapWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const UdapUpdateArgsSchema: z.ZodType = z.object({ - select: UdapSelectSchema.optional(), - include: UdapIncludeSchema.optional(), - data: z.union([ UdapUpdateInputSchema,UdapUncheckedUpdateInputSchema ]), - where: UdapWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const UdapUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ UdapUpdateManyMutationInputSchema,UdapUncheckedUpdateManyInputSchema ]), - where: UdapWhereInputSchema.optional(), -}).strict() as z.ZodType - -export const UdapDeleteManyArgsSchema: z.ZodType = z.object({ - where: UdapWhereInputSchema.optional(), -}).strict() as z.ZodType - -export const UserCreateArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - include: UserIncludeSchema.optional(), - data: z.union([ UserCreateInputSchema,UserUncheckedCreateInputSchema ]), -}).strict() as z.ZodType - -export const UserUpsertArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - include: UserIncludeSchema.optional(), - where: UserWhereUniqueInputSchema, - create: z.union([ UserCreateInputSchema,UserUncheckedCreateInputSchema ]), - update: z.union([ UserUpdateInputSchema,UserUncheckedUpdateInputSchema ]), -}).strict() as z.ZodType - -export const UserCreateManyArgsSchema: z.ZodType = z.object({ - data: UserCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() as z.ZodType - -export const UserDeleteArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - include: UserIncludeSchema.optional(), - where: UserWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const UserUpdateArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - include: UserIncludeSchema.optional(), - data: z.union([ UserUpdateInputSchema,UserUncheckedUpdateInputSchema ]), - where: UserWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const UserUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ UserUpdateManyMutationInputSchema,UserUncheckedUpdateManyInputSchema ]), - where: UserWhereInputSchema.optional(), -}).strict() as z.ZodType - -export const UserDeleteManyArgsSchema: z.ZodType = z.object({ - where: UserWhereInputSchema.optional(), -}).strict() as z.ZodType - -interface ClauseGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.ClauseArgs - readonly type: Omit, "Please either choose `select` or `include`"> -} - -interface Clause_v2GetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.Clause_v2Args - readonly type: Omit, "Please either choose `select` or `include`"> -} - -interface DelegationGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.DelegationArgs - readonly type: Omit, "Please either choose `select` or `include`"> -} - -interface Pdf_snapshotGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.Pdf_snapshotArgs - readonly type: Omit, "Please either choose `select` or `include`"> -} - -interface Picture_linesGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.Picture_linesArgs - readonly type: Omit, "Please either choose `select` or `include`"> -} - -interface PicturesGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.PicturesArgs - 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 Service_instructeursGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.Service_instructeursArgs - readonly type: Omit, "Please either choose `select` or `include`"> -} - -interface Tmp_picturesGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.Tmp_picturesArgs - readonly type: Omit, "Please either choose `select` or `include`"> -} - -interface UdapGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.UdapArgs - readonly type: Omit, "Please either choose `select` or `include`"> -} - -interface UserGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.UserArgs - readonly type: Omit, "Please either choose `select` or `include`"> -} - -export const tableSchemas = { - clause: { - fields: new Map([ - [ - "key", - "TEXT" - ], - [ - "value", - "TEXT" - ], - [ - "udap_id", - "TEXT" - ], - [ - "text", - "TEXT" - ], - [ - "hidden", - "BOOL" - ] - ]), - relations: [ - ], - 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'], - never, - Prisma.ClauseFindFirstArgs['orderBy'], - Prisma.ClauseScalarFieldEnum, - ClauseGetPayload - >, - clause_v2: { - fields: new Map([ - [ - "id", - "TEXT" - ], - [ - "key", - "TEXT" - ], - [ - "value", - "TEXT" - ], - [ - "position", - "INT4" - ], - [ - "udap_id", - "TEXT" - ], - [ - "text", - "TEXT" - ] - ]), - relations: [ - ], - modelSchema: (Clause_v2CreateInputSchema as any) - .partial() - .or((Clause_v2UncheckedCreateInputSchema as any).partial()), - createSchema: Clause_v2CreateArgsSchema, - createManySchema: Clause_v2CreateManyArgsSchema, - findUniqueSchema: Clause_v2FindUniqueArgsSchema, - findSchema: Clause_v2FindFirstArgsSchema, - updateSchema: Clause_v2UpdateArgsSchema, - updateManySchema: Clause_v2UpdateManyArgsSchema, - upsertSchema: Clause_v2UpsertArgsSchema, - deleteSchema: Clause_v2DeleteArgsSchema, - deleteManySchema: Clause_v2DeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.Clause_v2CreateArgs['data'], - Prisma.Clause_v2UpdateArgs['data'], - Prisma.Clause_v2FindFirstArgs['select'], - Prisma.Clause_v2FindFirstArgs['where'], - Prisma.Clause_v2FindUniqueArgs['where'], - never, - Prisma.Clause_v2FindFirstArgs['orderBy'], - Prisma.Clause_v2ScalarFieldEnum, - Clause_v2GetPayload - >, - delegation: { - fields: new Map([ - [ - "createdBy", - "TEXT" - ], - [ - "delegatedTo", - "TEXT" - ] - ]), - relations: [ - new Relation("user_delegation_createdByTouser", "createdBy", "id", "user", "delegation_createdByTouser", "one"), - new Relation("user_delegation_delegatedToTouser", "delegatedTo", "id", "user", "delegation_delegatedToTouser", "one"), - ], - modelSchema: (DelegationCreateInputSchema as any) - .partial() - .or((DelegationUncheckedCreateInputSchema as any).partial()), - createSchema: DelegationCreateArgsSchema, - createManySchema: DelegationCreateManyArgsSchema, - findUniqueSchema: DelegationFindUniqueArgsSchema, - findSchema: DelegationFindFirstArgsSchema, - updateSchema: DelegationUpdateArgsSchema, - updateManySchema: DelegationUpdateManyArgsSchema, - upsertSchema: DelegationUpsertArgsSchema, - deleteSchema: DelegationDeleteArgsSchema, - deleteManySchema: DelegationDeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.DelegationCreateArgs['data'], - Prisma.DelegationUpdateArgs['data'], - Prisma.DelegationFindFirstArgs['select'], - Prisma.DelegationFindFirstArgs['where'], - Prisma.DelegationFindUniqueArgs['where'], - Omit, - Prisma.DelegationFindFirstArgs['orderBy'], - Prisma.DelegationScalarFieldEnum, - DelegationGetPayload - >, - pdf_snapshot: { - fields: new Map([ - [ - "id", - "TEXT" - ], - [ - "report_id", - "TEXT" - ], - [ - "html", - "TEXT" - ], - [ - "report", - "TEXT" - ], - [ - "user_id", - "TEXT" - ] - ]), - relations: [ - ], - modelSchema: (Pdf_snapshotCreateInputSchema as any) - .partial() - .or((Pdf_snapshotUncheckedCreateInputSchema as any).partial()), - createSchema: Pdf_snapshotCreateArgsSchema, - createManySchema: Pdf_snapshotCreateManyArgsSchema, - findUniqueSchema: Pdf_snapshotFindUniqueArgsSchema, - findSchema: Pdf_snapshotFindFirstArgsSchema, - updateSchema: Pdf_snapshotUpdateArgsSchema, - updateManySchema: Pdf_snapshotUpdateManyArgsSchema, - upsertSchema: Pdf_snapshotUpsertArgsSchema, - deleteSchema: Pdf_snapshotDeleteArgsSchema, - deleteManySchema: Pdf_snapshotDeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.Pdf_snapshotCreateArgs['data'], - Prisma.Pdf_snapshotUpdateArgs['data'], - Prisma.Pdf_snapshotFindFirstArgs['select'], - Prisma.Pdf_snapshotFindFirstArgs['where'], - Prisma.Pdf_snapshotFindUniqueArgs['where'], - never, - Prisma.Pdf_snapshotFindFirstArgs['orderBy'], - Prisma.Pdf_snapshotScalarFieldEnum, - Pdf_snapshotGetPayload - >, - picture_lines: { - fields: new Map([ - [ - "id", - "TEXT" - ], - [ - "pictureId", - "TEXT" - ], - [ - "lines", - "TEXT" - ], - [ - "createdAt", - "TIMESTAMP" - ] - ]), - relations: [ - ], - modelSchema: (Picture_linesCreateInputSchema as any) - .partial() - .or((Picture_linesUncheckedCreateInputSchema as any).partial()), - createSchema: Picture_linesCreateArgsSchema, - createManySchema: Picture_linesCreateManyArgsSchema, - findUniqueSchema: Picture_linesFindUniqueArgsSchema, - findSchema: Picture_linesFindFirstArgsSchema, - updateSchema: Picture_linesUpdateArgsSchema, - updateManySchema: Picture_linesUpdateManyArgsSchema, - upsertSchema: Picture_linesUpsertArgsSchema, - deleteSchema: Picture_linesDeleteArgsSchema, - deleteManySchema: Picture_linesDeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.Picture_linesCreateArgs['data'], - Prisma.Picture_linesUpdateArgs['data'], - Prisma.Picture_linesFindFirstArgs['select'], - Prisma.Picture_linesFindFirstArgs['where'], - Prisma.Picture_linesFindUniqueArgs['where'], - never, - Prisma.Picture_linesFindFirstArgs['orderBy'], - Prisma.Picture_linesScalarFieldEnum, - Picture_linesGetPayload - >, - pictures: { - fields: new Map([ - [ - "id", - "TEXT" - ], - [ - "reportId", - "TEXT" - ], - [ - "url", - "TEXT" - ], - [ - "createdAt", - "TIMESTAMP" - ], - [ - "finalUrl", - "TEXT" - ] - ]), - relations: [ - new Relation("report", "reportId", "id", "report", "PicturesToReport", "one"), - ], - modelSchema: (PicturesCreateInputSchema as any) - .partial() - .or((PicturesUncheckedCreateInputSchema as any).partial()), - createSchema: PicturesCreateArgsSchema, - createManySchema: PicturesCreateManyArgsSchema, - findUniqueSchema: PicturesFindUniqueArgsSchema, - findSchema: PicturesFindFirstArgsSchema, - updateSchema: PicturesUpdateArgsSchema, - updateManySchema: PicturesUpdateManyArgsSchema, - upsertSchema: PicturesUpsertArgsSchema, - deleteSchema: PicturesDeleteArgsSchema, - deleteManySchema: PicturesDeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.PicturesCreateArgs['data'], - Prisma.PicturesUpdateArgs['data'], - Prisma.PicturesFindFirstArgs['select'], - Prisma.PicturesFindFirstArgs['where'], - Prisma.PicturesFindUniqueArgs['where'], - Omit, - Prisma.PicturesFindFirstArgs['orderBy'], - Prisma.PicturesScalarFieldEnum, - PicturesGetPayload - >, - report: { - fields: new Map([ - [ - "id", - "TEXT" - ], - [ - "title", - "TEXT" - ], - [ - "projectDescription", - "TEXT" - ], - [ - "redactedBy", - "TEXT" - ], - [ - "meetDate", - "TIMESTAMP" - ], - [ - "applicantName", - "TEXT" - ], - [ - "applicantAddress", - "TEXT" - ], - [ - "projectCadastralRef", - "TEXT" - ], - [ - "projectSpaceType", - "TEXT" - ], - [ - "decision", - "TEXT" - ], - [ - "precisions", - "TEXT" - ], - [ - "contacts", - "TEXT" - ], - [ - "furtherInformation", - "TEXT" - ], - [ - "createdBy", - "TEXT" - ], - [ - "createdAt", - "TIMESTAMP" - ], - [ - "serviceInstructeur", - "INT4" - ], - [ - "pdf", - "TEXT" - ], - [ - "disabled", - "BOOL" - ], - [ - "udap_id", - "TEXT" - ], - [ - "redactedById", - "TEXT" - ], - [ - "applicantEmail", - "TEXT" - ], - [ - "city", - "TEXT" - ], - [ - "zipCode", - "TEXT" - ] - ]), - relations: [ - new Relation("pictures", "", "", "pictures", "PicturesToReport", "many"), - new Relation("user", "createdBy", "id", "user", "ReportToUser", "one"), - new Relation("tmp_pictures", "", "", "tmp_pictures", "ReportToTmp_pictures", "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 - >, - service_instructeurs: { - fields: new Map([ - [ - "id", - "INT4" - ], - [ - "full_name", - "TEXT" - ], - [ - "short_name", - "TEXT" - ], - [ - "email", - "TEXT" - ], - [ - "tel", - "TEXT" - ], - [ - "udap_id", - "TEXT" - ] - ]), - relations: [ - ], - modelSchema: (Service_instructeursCreateInputSchema as any) - .partial() - .or((Service_instructeursUncheckedCreateInputSchema as any).partial()), - createSchema: Service_instructeursCreateArgsSchema, - createManySchema: Service_instructeursCreateManyArgsSchema, - findUniqueSchema: Service_instructeursFindUniqueArgsSchema, - findSchema: Service_instructeursFindFirstArgsSchema, - updateSchema: Service_instructeursUpdateArgsSchema, - updateManySchema: Service_instructeursUpdateManyArgsSchema, - upsertSchema: Service_instructeursUpsertArgsSchema, - deleteSchema: Service_instructeursDeleteArgsSchema, - deleteManySchema: Service_instructeursDeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.Service_instructeursCreateArgs['data'], - Prisma.Service_instructeursUpdateArgs['data'], - Prisma.Service_instructeursFindFirstArgs['select'], - Prisma.Service_instructeursFindFirstArgs['where'], - Prisma.Service_instructeursFindUniqueArgs['where'], - never, - Prisma.Service_instructeursFindFirstArgs['orderBy'], - Prisma.Service_instructeursScalarFieldEnum, - Service_instructeursGetPayload - >, - tmp_pictures: { - fields: new Map([ - [ - "id", - "TEXT" - ], - [ - "reportId", - "TEXT" - ], - [ - "createdAt", - "TIMESTAMP" - ] - ]), - relations: [ - new Relation("report", "reportId", "id", "report", "ReportToTmp_pictures", "one"), - ], - modelSchema: (Tmp_picturesCreateInputSchema as any) - .partial() - .or((Tmp_picturesUncheckedCreateInputSchema as any).partial()), - createSchema: Tmp_picturesCreateArgsSchema, - createManySchema: Tmp_picturesCreateManyArgsSchema, - findUniqueSchema: Tmp_picturesFindUniqueArgsSchema, - findSchema: Tmp_picturesFindFirstArgsSchema, - updateSchema: Tmp_picturesUpdateArgsSchema, - updateManySchema: Tmp_picturesUpdateManyArgsSchema, - upsertSchema: Tmp_picturesUpsertArgsSchema, - deleteSchema: Tmp_picturesDeleteArgsSchema, - deleteManySchema: Tmp_picturesDeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.Tmp_picturesCreateArgs['data'], - Prisma.Tmp_picturesUpdateArgs['data'], - Prisma.Tmp_picturesFindFirstArgs['select'], - Prisma.Tmp_picturesFindFirstArgs['where'], - Prisma.Tmp_picturesFindUniqueArgs['where'], - Omit, - Prisma.Tmp_picturesFindFirstArgs['orderBy'], - Prisma.Tmp_picturesScalarFieldEnum, - Tmp_picturesGetPayload - >, - udap: { - fields: new Map([ - [ - "id", - "TEXT" - ], - [ - "department", - "TEXT" - ], - [ - "completeCoords", - "TEXT" - ], - [ - "visible", - "BOOL" - ], - [ - "name", - "TEXT" - ], - [ - "address", - "TEXT" - ], - [ - "zipCode", - "TEXT" - ], - [ - "city", - "TEXT" - ], - [ - "phone", - "TEXT" - ], - [ - "email", - "TEXT" - ], - [ - "marianne_text", - "TEXT" - ], - [ - "drac_text", - "TEXT" - ], - [ - "udap_text", - "TEXT" - ] - ]), - relations: [ - new Relation("user", "", "", "user", "UdapToUser", "many"), - ], - modelSchema: (UdapCreateInputSchema as any) - .partial() - .or((UdapUncheckedCreateInputSchema as any).partial()), - createSchema: UdapCreateArgsSchema, - createManySchema: UdapCreateManyArgsSchema, - findUniqueSchema: UdapFindUniqueArgsSchema, - findSchema: UdapFindFirstArgsSchema, - updateSchema: UdapUpdateArgsSchema, - updateManySchema: UdapUpdateManyArgsSchema, - upsertSchema: UdapUpsertArgsSchema, - deleteSchema: UdapDeleteArgsSchema, - deleteManySchema: UdapDeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.UdapCreateArgs['data'], - Prisma.UdapUpdateArgs['data'], - Prisma.UdapFindFirstArgs['select'], - Prisma.UdapFindFirstArgs['where'], - Prisma.UdapFindUniqueArgs['where'], - Omit, - Prisma.UdapFindFirstArgs['orderBy'], - Prisma.UdapScalarFieldEnum, - UdapGetPayload - >, - user: { - fields: new Map([ - [ - "id", - "TEXT" - ], - [ - "name", - "TEXT" - ], - [ - "udap_id", - "TEXT" - ] - ]), - relations: [ - new Relation("delegation_delegation_createdByTouser", "", "", "delegation", "delegation_createdByTouser", "many"), - new Relation("delegation_delegation_delegatedToTouser", "", "", "delegation", "delegation_delegatedToTouser", "many"), - new Relation("report", "", "", "report", "ReportToUser", "many"), - new Relation("udap", "udap_id", "id", "udap", "UdapToUser", "one"), - ], - modelSchema: (UserCreateInputSchema as any) - .partial() - .or((UserUncheckedCreateInputSchema as any).partial()), - createSchema: UserCreateArgsSchema, - createManySchema: UserCreateManyArgsSchema, - findUniqueSchema: UserFindUniqueArgsSchema, - findSchema: UserFindFirstArgsSchema, - updateSchema: UserUpdateArgsSchema, - updateManySchema: UserUpdateManyArgsSchema, - upsertSchema: UserUpsertArgsSchema, - deleteSchema: UserDeleteArgsSchema, - deleteManySchema: UserDeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.UserCreateArgs['data'], - Prisma.UserUpdateArgs['data'], - Prisma.UserFindFirstArgs['select'], - Prisma.UserFindFirstArgs['where'], - Prisma.UserFindUniqueArgs['where'], - Omit, - Prisma.UserFindFirstArgs['orderBy'], - Prisma.UserScalarFieldEnum, - UserGetPayload - >, -} - -export const schema = new DbSchema(tableSchemas, migrations, pgMigrations) -export type Electric = ElectricClient diff --git a/packages/electric-client/src/generated/client/migrations.ts b/packages/electric-client/src/generated/client/migrations.ts deleted file mode 100644 index 92007b7e..00000000 --- a/packages/electric-client/src/generated/client/migrations.ts +++ /dev/null @@ -1,291 +0,0 @@ -export default [ - { - "statements": [ - "CREATE TABLE \"udap\" (\n \"id\" TEXT NOT NULL,\n \"department\" TEXT NOT NULL,\n \"completeCoords\" TEXT,\n \"visible\" INTEGER,\n \"name\" TEXT,\n \"address\" TEXT,\n \"zipCode\" TEXT,\n \"city\" TEXT,\n \"phone\" TEXT,\n \"email\" TEXT,\n \"marianne_text\" TEXT,\n \"drac_text\" TEXT,\n \"udap_text\" TEXT,\n CONSTRAINT \"udap_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", - "CREATE TABLE \"user\" (\n \"id\" TEXT NOT NULL,\n \"name\" TEXT NOT NULL,\n \"udap_id\" TEXT NOT NULL,\n CONSTRAINT \"user_udap_id_fkey\" FOREIGN KEY (\"udap_id\") REFERENCES \"udap\" (\"id\") ON DELETE SET NULL,\n CONSTRAINT \"user_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", - "CREATE TABLE \"delegation\" (\n \"createdBy\" TEXT NOT NULL,\n \"delegatedTo\" TEXT NOT NULL,\n CONSTRAINT \"delegation_createdBy_fkey\" FOREIGN KEY (\"createdBy\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE,\n CONSTRAINT \"delegation_delegatedTo_fkey\" FOREIGN KEY (\"delegatedTo\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE,\n CONSTRAINT \"delegation_pkey\" PRIMARY KEY (\"createdBy\", \"delegatedTo\")\n) WITHOUT ROWID;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, tablename, flag) VALUES ('main', 'udap', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_udap_primarykey;", - "CREATE TRIGGER update_ensure_main_udap_primarykey\n BEFORE UPDATE ON \"main\".\"udap\"\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_udap_into_oplog;", - "CREATE TRIGGER insert_main_udap_into_oplog\n AFTER INSERT ON \"main\".\"udap\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'udap')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'udap', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('address', new.\"address\", 'city', new.\"city\", 'completeCoords', new.\"completeCoords\", 'department', new.\"department\", 'drac_text', new.\"drac_text\", 'email', new.\"email\", 'id', new.\"id\", 'marianne_text', new.\"marianne_text\", 'name', new.\"name\", 'phone', new.\"phone\", 'udap_text', new.\"udap_text\", 'visible', new.\"visible\", 'zipCode', new.\"zipCode\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_udap_into_oplog;", - "CREATE TRIGGER update_main_udap_into_oplog\n AFTER UPDATE ON \"main\".\"udap\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'udap')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'udap', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('address', new.\"address\", 'city', new.\"city\", 'completeCoords', new.\"completeCoords\", 'department', new.\"department\", 'drac_text', new.\"drac_text\", 'email', new.\"email\", 'id', new.\"id\", 'marianne_text', new.\"marianne_text\", 'name', new.\"name\", 'phone', new.\"phone\", 'udap_text', new.\"udap_text\", 'visible', new.\"visible\", 'zipCode', new.\"zipCode\"), json_object('address', old.\"address\", 'city', old.\"city\", 'completeCoords', old.\"completeCoords\", 'department', old.\"department\", 'drac_text', old.\"drac_text\", 'email', old.\"email\", 'id', old.\"id\", 'marianne_text', old.\"marianne_text\", 'name', old.\"name\", 'phone', old.\"phone\", 'udap_text', old.\"udap_text\", 'visible', old.\"visible\", 'zipCode', old.\"zipCode\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_udap_into_oplog;", - "CREATE TRIGGER delete_main_udap_into_oplog\n AFTER DELETE ON \"main\".\"udap\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'udap')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'udap', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('address', old.\"address\", 'city', old.\"city\", 'completeCoords', old.\"completeCoords\", 'department', old.\"department\", 'drac_text', old.\"drac_text\", 'email', old.\"email\", 'id', old.\"id\", 'marianne_text', old.\"marianne_text\", 'name', old.\"name\", 'phone', old.\"phone\", 'udap_text', old.\"udap_text\", 'visible', old.\"visible\", 'zipCode', old.\"zipCode\"), NULL);\nEND;", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, tablename, flag) VALUES ('main', 'user', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_user_primarykey;", - "CREATE TRIGGER update_ensure_main_user_primarykey\n BEFORE UPDATE ON \"main\".\"user\"\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_user_into_oplog;", - "CREATE TRIGGER insert_main_user_into_oplog\n AFTER INSERT ON \"main\".\"user\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'user')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'user', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('id', new.\"id\", 'name', new.\"name\", 'udap_id', new.\"udap_id\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_user_into_oplog;", - "CREATE TRIGGER update_main_user_into_oplog\n AFTER UPDATE ON \"main\".\"user\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'user')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'user', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('id', new.\"id\", 'name', new.\"name\", 'udap_id', new.\"udap_id\"), json_object('id', old.\"id\", 'name', old.\"name\", 'udap_id', old.\"udap_id\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_user_into_oplog;", - "CREATE TRIGGER delete_main_user_into_oplog\n AFTER DELETE ON \"main\".\"user\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'user')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'user', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('id', old.\"id\", 'name', old.\"name\", 'udap_id', old.\"udap_id\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_user_udap_id_into_oplog;", - "CREATE TRIGGER compensation_insert_main_user_udap_id_into_oplog\n AFTER INSERT ON \"main\".\"user\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'user') 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', 'udap', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"udap\" WHERE \"id\" = new.\"udap_id\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_user_udap_id_into_oplog;", - "CREATE TRIGGER compensation_update_main_user_udap_id_into_oplog\n AFTER UPDATE ON \"main\".\"user\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'user') 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', 'udap', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"udap\" WHERE \"id\" = new.\"udap_id\";\nEND;", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, tablename, flag) VALUES ('main', 'delegation', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_delegation_primarykey;", - "CREATE TRIGGER update_ensure_main_delegation_primarykey\n BEFORE UPDATE ON \"main\".\"delegation\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"createdBy\" != new.\"createdBy\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column createdBy as it belongs to the primary key')\n WHEN old.\"delegatedTo\" != new.\"delegatedTo\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column delegatedTo as it belongs to the primary key')\n END;\nEND;", - "DROP TRIGGER IF EXISTS insert_main_delegation_into_oplog;", - "CREATE TRIGGER insert_main_delegation_into_oplog\n AFTER INSERT ON \"main\".\"delegation\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'delegation')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'delegation', 'INSERT', json_patch('{}', json_object('createdBy', new.\"createdBy\", 'delegatedTo', new.\"delegatedTo\")), json_object('createdBy', new.\"createdBy\", 'delegatedTo', new.\"delegatedTo\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_delegation_into_oplog;", - "CREATE TRIGGER update_main_delegation_into_oplog\n AFTER UPDATE ON \"main\".\"delegation\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'delegation')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'delegation', 'UPDATE', json_patch('{}', json_object('createdBy', new.\"createdBy\", 'delegatedTo', new.\"delegatedTo\")), json_object('createdBy', new.\"createdBy\", 'delegatedTo', new.\"delegatedTo\"), json_object('createdBy', old.\"createdBy\", 'delegatedTo', old.\"delegatedTo\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_delegation_into_oplog;", - "CREATE TRIGGER delete_main_delegation_into_oplog\n AFTER DELETE ON \"main\".\"delegation\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'delegation')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'delegation', 'DELETE', json_patch('{}', json_object('createdBy', old.\"createdBy\", 'delegatedTo', old.\"delegatedTo\")), NULL, json_object('createdBy', old.\"createdBy\", 'delegatedTo', old.\"delegatedTo\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_delegation_createdBy_into_oplog;", - "CREATE TRIGGER compensation_insert_main_delegation_createdBy_into_oplog\n AFTER INSERT ON \"main\".\"delegation\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'delegation') 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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_delegation_createdBy_into_oplog;", - "CREATE TRIGGER compensation_update_main_delegation_createdBy_into_oplog\n AFTER UPDATE ON \"main\".\"delegation\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'delegation') 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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_delegation_delegatedTo_into_oplog;", - "CREATE TRIGGER compensation_insert_main_delegation_delegatedTo_into_oplog\n AFTER INSERT ON \"main\".\"delegation\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'delegation') 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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"delegatedTo\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_delegation_delegatedTo_into_oplog;", - "CREATE TRIGGER compensation_update_main_delegation_delegatedTo_into_oplog\n AFTER UPDATE ON \"main\".\"delegation\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'delegation') 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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"delegatedTo\";\nEND;" - ], - "version": "1" - }, - { - "statements": [ - "CREATE TABLE \"report\" (\n \"id\" TEXT NOT NULL,\n \"title\" TEXT,\n \"projectDescription\" TEXT,\n \"redactedBy\" TEXT,\n \"meetDate\" TEXT,\n \"applicantName\" TEXT,\n \"applicantAddress\" TEXT,\n \"projectCadastralRef\" TEXT,\n \"projectSpaceType\" TEXT,\n \"decision\" TEXT,\n \"precisions\" TEXT,\n \"contacts\" TEXT,\n \"furtherInformation\" TEXT,\n \"createdBy\" TEXT NOT NULL,\n \"createdAt\" TEXT NOT NULL,\n \"serviceInstructeur\" INTEGER,\n \"pdf\" TEXT,\n \"disabled\" INTEGER,\n \"udap_id\" TEXT,\n CONSTRAINT \"report_createdBy_fkey\" FOREIGN KEY (\"createdBy\") REFERENCES \"user\" (\"id\") ON DELETE SET NULL,\n CONSTRAINT \"report_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('applicantAddress', new.\"applicantAddress\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"), 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('applicantAddress', new.\"applicantAddress\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"), json_object('applicantAddress', old.\"applicantAddress\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"), 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('applicantAddress', old.\"applicantAddress\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_report_createdBy_into_oplog;", - "CREATE TRIGGER compensation_insert_main_report_createdBy_into_oplog\n AFTER INSERT ON \"main\".\"report\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = '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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_report_createdBy_into_oplog;", - "CREATE TRIGGER compensation_update_main_report_createdBy_into_oplog\n AFTER UPDATE ON \"main\".\"report\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = '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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;" - ], - "version": "2" - }, - { - "statements": [ - "CREATE TABLE \"clause\" (\n \"key\" TEXT NOT NULL,\n \"value\" TEXT NOT NULL,\n \"udap_id\" TEXT NOT NULL,\n \"text\" TEXT NOT NULL,\n CONSTRAINT \"clause_pkey\" PRIMARY KEY (\"key\", \"value\", \"udap_id\")\n) WITHOUT ROWID;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, 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.\"key\" != new.\"key\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column key as it belongs to the primary key')\n WHEN old.\"udap_id\" != new.\"udap_id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column udap_id as it belongs to the primary key')\n WHEN old.\"value\" != new.\"value\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column value 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 namespace = 'main' AND tablename = 'clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'INSERT', json_patch('{}', json_object('key', new.\"key\", 'udap_id', new.\"udap_id\", 'value', new.\"value\")), json_object('key', new.\"key\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", '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 namespace = 'main' AND tablename = 'clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'UPDATE', json_patch('{}', json_object('key', new.\"key\", 'udap_id', new.\"udap_id\", 'value', new.\"value\")), json_object('key', new.\"key\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", 'value', new.\"value\"), json_object('key', old.\"key\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", '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 namespace = 'main' AND tablename = 'clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'DELETE', json_patch('{}', json_object('key', old.\"key\", 'udap_id', old.\"udap_id\", 'value', old.\"value\")), NULL, json_object('key', old.\"key\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", 'value', old.\"value\"), NULL);\nEND;" - ], - "version": "4" - }, - { - "statements": [ - "CREATE TABLE \"service_instructeurs\" (\n \"id\" INTEGER NOT NULL,\n \"full_name\" TEXT NOT NULL,\n \"short_name\" TEXT NOT NULL,\n \"email\" TEXT,\n \"tel\" TEXT,\n \"udap_id\" TEXT,\n CONSTRAINT \"service_instructeurs_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, tablename, flag) VALUES ('main', 'service_instructeurs', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_service_instructeurs_primarykey;", - "CREATE TRIGGER update_ensure_main_service_instructeurs_primarykey\n BEFORE UPDATE ON \"main\".\"service_instructeurs\"\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_service_instructeurs_into_oplog;", - "CREATE TRIGGER insert_main_service_instructeurs_into_oplog\n AFTER INSERT ON \"main\".\"service_instructeurs\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'service_instructeurs')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'service_instructeurs', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('email', new.\"email\", 'full_name', new.\"full_name\", 'id', new.\"id\", 'short_name', new.\"short_name\", 'tel', new.\"tel\", 'udap_id', new.\"udap_id\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_service_instructeurs_into_oplog;", - "CREATE TRIGGER update_main_service_instructeurs_into_oplog\n AFTER UPDATE ON \"main\".\"service_instructeurs\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'service_instructeurs')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'service_instructeurs', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('email', new.\"email\", 'full_name', new.\"full_name\", 'id', new.\"id\", 'short_name', new.\"short_name\", 'tel', new.\"tel\", 'udap_id', new.\"udap_id\"), json_object('email', old.\"email\", 'full_name', old.\"full_name\", 'id', old.\"id\", 'short_name', old.\"short_name\", 'tel', old.\"tel\", 'udap_id', old.\"udap_id\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_service_instructeurs_into_oplog;", - "CREATE TRIGGER delete_main_service_instructeurs_into_oplog\n AFTER DELETE ON \"main\".\"service_instructeurs\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'service_instructeurs')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'service_instructeurs', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('email', old.\"email\", 'full_name', old.\"full_name\", 'id', old.\"id\", 'short_name', old.\"short_name\", 'tel', old.\"tel\", 'udap_id', old.\"udap_id\"), NULL);\nEND;" - ], - "version": "7" - }, - { - "statements": [ - "ALTER TABLE \"report\" ADD COLUMN \"redactedById\" TEXT;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('applicantAddress', new.\"applicantAddress\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"), 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('applicantAddress', new.\"applicantAddress\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"), json_object('applicantAddress', old.\"applicantAddress\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"), 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('applicantAddress', old.\"applicantAddress\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_report_createdBy_into_oplog;", - "CREATE TRIGGER compensation_insert_main_report_createdBy_into_oplog\n AFTER INSERT ON \"main\".\"report\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = '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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_report_createdBy_into_oplog;", - "CREATE TRIGGER compensation_update_main_report_createdBy_into_oplog\n AFTER UPDATE ON \"main\".\"report\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = '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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;" - ], - "version": "9" - }, - { - "statements": [ - "ALTER TABLE \"report\" ADD COLUMN \"applicantEmail\" TEXT;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"), 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"), json_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"), 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_report_createdBy_into_oplog;", - "CREATE TRIGGER compensation_insert_main_report_createdBy_into_oplog\n AFTER INSERT ON \"main\".\"report\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = '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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_report_createdBy_into_oplog;", - "CREATE TRIGGER compensation_update_main_report_createdBy_into_oplog\n AFTER UPDATE ON \"main\".\"report\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = '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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;" - ], - "version": "901" - }, - { - "statements": [ - "CREATE TABLE \"clause_v2\" (\n \"id\" TEXT NOT NULL,\n \"key\" TEXT NOT NULL,\n \"value\" TEXT NOT NULL,\n \"position\" INTEGER,\n \"udap_id\" TEXT,\n \"text\" TEXT NOT NULL,\n CONSTRAINT \"clause_v2_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, tablename, flag) VALUES ('main', 'clause_v2', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_clause_v2_primarykey;", - "CREATE TRIGGER update_ensure_main_clause_v2_primarykey\n BEFORE UPDATE ON \"main\".\"clause_v2\"\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_v2_into_oplog;", - "CREATE TRIGGER insert_main_clause_v2_into_oplog\n AFTER INSERT ON \"main\".\"clause_v2\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'clause_v2')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause_v2', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('id', new.\"id\", 'key', new.\"key\", 'position', new.\"position\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", 'value', new.\"value\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_clause_v2_into_oplog;", - "CREATE TRIGGER update_main_clause_v2_into_oplog\n AFTER UPDATE ON \"main\".\"clause_v2\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'clause_v2')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause_v2', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('id', new.\"id\", 'key', new.\"key\", 'position', new.\"position\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", 'value', new.\"value\"), json_object('id', old.\"id\", 'key', old.\"key\", 'position', old.\"position\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", 'value', old.\"value\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_clause_v2_into_oplog;", - "CREATE TRIGGER delete_main_clause_v2_into_oplog\n AFTER DELETE ON \"main\".\"clause_v2\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'clause_v2')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause_v2', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('id', old.\"id\", 'key', old.\"key\", 'position', old.\"position\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", 'value', old.\"value\"), NULL);\nEND;" - ], - "version": "902" - }, - { - "statements": [ - "ALTER TABLE \"clause\" ADD COLUMN \"hidden\" INTEGER;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, 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.\"key\" != new.\"key\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column key as it belongs to the primary key')\n WHEN old.\"udap_id\" != new.\"udap_id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column udap_id as it belongs to the primary key')\n WHEN old.\"value\" != new.\"value\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column value 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 namespace = 'main' AND tablename = 'clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'INSERT', json_patch('{}', json_object('key', new.\"key\", 'udap_id', new.\"udap_id\", 'value', new.\"value\")), json_object('hidden', new.\"hidden\", 'key', new.\"key\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", '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 namespace = 'main' AND tablename = 'clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'UPDATE', json_patch('{}', json_object('key', new.\"key\", 'udap_id', new.\"udap_id\", 'value', new.\"value\")), json_object('hidden', new.\"hidden\", 'key', new.\"key\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", 'value', new.\"value\"), json_object('hidden', old.\"hidden\", 'key', old.\"key\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", '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 namespace = 'main' AND tablename = 'clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'DELETE', json_patch('{}', json_object('key', old.\"key\", 'udap_id', old.\"udap_id\", 'value', old.\"value\")), NULL, json_object('hidden', old.\"hidden\", 'key', old.\"key\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", 'value', old.\"value\"), NULL);\nEND;" - ], - "version": "903" - }, - { - "statements": [ - "CREATE TABLE \"pdf_snapshot\" (\n \"id\" TEXT NOT NULL,\n \"report_id\" TEXT,\n \"html\" TEXT,\n \"report\" TEXT,\n \"user_id\" TEXT,\n CONSTRAINT \"pdf_snapshot_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, tablename, flag) VALUES ('main', 'pdf_snapshot', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_pdf_snapshot_primarykey;", - "CREATE TRIGGER update_ensure_main_pdf_snapshot_primarykey\n BEFORE UPDATE ON \"main\".\"pdf_snapshot\"\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_pdf_snapshot_into_oplog;", - "CREATE TRIGGER insert_main_pdf_snapshot_into_oplog\n AFTER INSERT ON \"main\".\"pdf_snapshot\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pdf_snapshot')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'pdf_snapshot', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('html', new.\"html\", 'id', new.\"id\", 'report', new.\"report\", 'report_id', new.\"report_id\", 'user_id', new.\"user_id\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_pdf_snapshot_into_oplog;", - "CREATE TRIGGER update_main_pdf_snapshot_into_oplog\n AFTER UPDATE ON \"main\".\"pdf_snapshot\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pdf_snapshot')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'pdf_snapshot', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('html', new.\"html\", 'id', new.\"id\", 'report', new.\"report\", 'report_id', new.\"report_id\", 'user_id', new.\"user_id\"), json_object('html', old.\"html\", 'id', old.\"id\", 'report', old.\"report\", 'report_id', old.\"report_id\", 'user_id', old.\"user_id\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_pdf_snapshot_into_oplog;", - "CREATE TRIGGER delete_main_pdf_snapshot_into_oplog\n AFTER DELETE ON \"main\".\"pdf_snapshot\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pdf_snapshot')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'pdf_snapshot', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('html', old.\"html\", 'id', old.\"id\", 'report', old.\"report\", 'report_id', old.\"report_id\", 'user_id', old.\"user_id\"), NULL);\nEND;" - ], - "version": "904" - }, - { - "statements": [ - "ALTER TABLE \"report\" ADD COLUMN \"city\" TEXT;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'city', new.\"city\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"), 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'city', new.\"city\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"), json_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'city', old.\"city\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"), 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'city', old.\"city\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_report_createdBy_into_oplog;", - "CREATE TRIGGER compensation_insert_main_report_createdBy_into_oplog\n AFTER INSERT ON \"main\".\"report\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = '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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_report_createdBy_into_oplog;", - "CREATE TRIGGER compensation_update_main_report_createdBy_into_oplog\n AFTER UPDATE ON \"main\".\"report\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = '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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;" - ], - "version": "905" - }, - { - "statements": [ - "ALTER TABLE \"report\" ADD COLUMN \"zipCode\" TEXT;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'city', new.\"city\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\", 'zipCode', new.\"zipCode\"), 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'city', new.\"city\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\", 'zipCode', new.\"zipCode\"), json_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'city', old.\"city\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\", 'zipCode', old.\"zipCode\"), 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 namespace = 'main' AND tablename = 'report')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'city', old.\"city\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\", 'zipCode', old.\"zipCode\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_report_createdBy_into_oplog;", - "CREATE TRIGGER compensation_insert_main_report_createdBy_into_oplog\n AFTER INSERT ON \"main\".\"report\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = '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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_report_createdBy_into_oplog;", - "CREATE TRIGGER compensation_update_main_report_createdBy_into_oplog\n AFTER UPDATE ON \"main\".\"report\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = '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', 'user', 'COMPENSATION', json_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;" - ], - "version": "906" - }, - { - "statements": [ - "CREATE TABLE \"pictures\" (\n \"id\" TEXT NOT NULL,\n \"reportId\" TEXT,\n \"url\" TEXT,\n \"createdAt\" TEXT,\n CONSTRAINT \"pictures_reportId_fkey\" FOREIGN KEY (\"reportId\") REFERENCES \"report\" (\"id\") ON DELETE CASCADE,\n CONSTRAINT \"pictures_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, tablename, flag) VALUES ('main', 'pictures', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_pictures_primarykey;", - "CREATE TRIGGER update_ensure_main_pictures_primarykey\n BEFORE UPDATE ON \"main\".\"pictures\"\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_pictures_into_oplog;", - "CREATE TRIGGER insert_main_pictures_into_oplog\n AFTER INSERT ON \"main\".\"pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pictures')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'pictures', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'reportId', new.\"reportId\", 'url', new.\"url\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_pictures_into_oplog;", - "CREATE TRIGGER update_main_pictures_into_oplog\n AFTER UPDATE ON \"main\".\"pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pictures')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'pictures', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'reportId', new.\"reportId\", 'url', new.\"url\"), json_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'reportId', old.\"reportId\", 'url', old.\"url\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_pictures_into_oplog;", - "CREATE TRIGGER delete_main_pictures_into_oplog\n AFTER DELETE ON \"main\".\"pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pictures')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'pictures', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'reportId', old.\"reportId\", 'url', old.\"url\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_pictures_reportId_into_oplog;", - "CREATE TRIGGER compensation_insert_main_pictures_reportId_into_oplog\n AFTER INSERT ON \"main\".\"pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pictures') 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_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"reportId\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_pictures_reportId_into_oplog;", - "CREATE TRIGGER compensation_update_main_pictures_reportId_into_oplog\n AFTER UPDATE ON \"main\".\"pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pictures') 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_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"reportId\";\nEND;" - ], - "version": "907" - }, - { - "statements": [ - "CREATE TABLE \"tmp_pictures\" (\n \"id\" TEXT NOT NULL,\n \"reportId\" TEXT,\n \"createdAt\" TEXT,\n CONSTRAINT \"tmp_pictures_reportId_fkey\" FOREIGN KEY (\"reportId\") REFERENCES \"report\" (\"id\") ON DELETE CASCADE,\n CONSTRAINT \"tmp_pictures_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, tablename, flag) VALUES ('main', 'tmp_pictures', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_tmp_pictures_primarykey;", - "CREATE TRIGGER update_ensure_main_tmp_pictures_primarykey\n BEFORE UPDATE ON \"main\".\"tmp_pictures\"\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_tmp_pictures_into_oplog;", - "CREATE TRIGGER insert_main_tmp_pictures_into_oplog\n AFTER INSERT ON \"main\".\"tmp_pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'tmp_pictures')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'tmp_pictures', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'reportId', new.\"reportId\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_tmp_pictures_into_oplog;", - "CREATE TRIGGER update_main_tmp_pictures_into_oplog\n AFTER UPDATE ON \"main\".\"tmp_pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'tmp_pictures')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'tmp_pictures', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'reportId', new.\"reportId\"), json_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'reportId', old.\"reportId\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_tmp_pictures_into_oplog;", - "CREATE TRIGGER delete_main_tmp_pictures_into_oplog\n AFTER DELETE ON \"main\".\"tmp_pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'tmp_pictures')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'tmp_pictures', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'reportId', old.\"reportId\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_tmp_pictures_reportId_into_oplog;", - "CREATE TRIGGER compensation_insert_main_tmp_pictures_reportId_into_oplog\n AFTER INSERT ON \"main\".\"tmp_pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'tmp_pictures') 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_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"reportId\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_tmp_pictures_reportId_into_oplog;", - "CREATE TRIGGER compensation_update_main_tmp_pictures_reportId_into_oplog\n AFTER UPDATE ON \"main\".\"tmp_pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'tmp_pictures') 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_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"reportId\";\nEND;" - ], - "version": "908" - }, - { - "statements": [ - "CREATE TABLE \"picture_lines\" (\n \"id\" TEXT NOT NULL,\n \"pictureId\" TEXT,\n \"lines\" TEXT NOT NULL,\n \"createdAt\" TEXT,\n CONSTRAINT \"picture_lines_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, tablename, flag) VALUES ('main', 'picture_lines', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_picture_lines_primarykey;", - "CREATE TRIGGER update_ensure_main_picture_lines_primarykey\n BEFORE UPDATE ON \"main\".\"picture_lines\"\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_picture_lines_into_oplog;", - "CREATE TRIGGER insert_main_picture_lines_into_oplog\n AFTER INSERT ON \"main\".\"picture_lines\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'picture_lines')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'picture_lines', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'lines', new.\"lines\", 'pictureId', new.\"pictureId\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_picture_lines_into_oplog;", - "CREATE TRIGGER update_main_picture_lines_into_oplog\n AFTER UPDATE ON \"main\".\"picture_lines\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'picture_lines')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'picture_lines', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'lines', new.\"lines\", 'pictureId', new.\"pictureId\"), json_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'lines', old.\"lines\", 'pictureId', old.\"pictureId\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_picture_lines_into_oplog;", - "CREATE TRIGGER delete_main_picture_lines_into_oplog\n AFTER DELETE ON \"main\".\"picture_lines\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'picture_lines')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'picture_lines', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'lines', old.\"lines\", 'pictureId', old.\"pictureId\"), NULL);\nEND;" - ], - "version": "909" - }, - { - "statements": [ - "ALTER TABLE \"pictures\" ADD COLUMN \"finalUrl\" TEXT;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings (namespace, tablename, flag) VALUES ('main', 'pictures', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_pictures_primarykey;", - "CREATE TRIGGER update_ensure_main_pictures_primarykey\n BEFORE UPDATE ON \"main\".\"pictures\"\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_pictures_into_oplog;", - "CREATE TRIGGER insert_main_pictures_into_oplog\n AFTER INSERT ON \"main\".\"pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pictures')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'pictures', 'INSERT', json_patch('{}', json_object('id', new.\"id\")), json_object('createdAt', new.\"createdAt\", 'finalUrl', new.\"finalUrl\", 'id', new.\"id\", 'reportId', new.\"reportId\", 'url', new.\"url\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_pictures_into_oplog;", - "CREATE TRIGGER update_main_pictures_into_oplog\n AFTER UPDATE ON \"main\".\"pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pictures')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'pictures', 'UPDATE', json_patch('{}', json_object('id', new.\"id\")), json_object('createdAt', new.\"createdAt\", 'finalUrl', new.\"finalUrl\", 'id', new.\"id\", 'reportId', new.\"reportId\", 'url', new.\"url\"), json_object('createdAt', old.\"createdAt\", 'finalUrl', old.\"finalUrl\", 'id', old.\"id\", 'reportId', old.\"reportId\", 'url', old.\"url\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_pictures_into_oplog;", - "CREATE TRIGGER delete_main_pictures_into_oplog\n AFTER DELETE ON \"main\".\"pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pictures')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'pictures', 'DELETE', json_patch('{}', json_object('id', old.\"id\")), NULL, json_object('createdAt', old.\"createdAt\", 'finalUrl', old.\"finalUrl\", 'id', old.\"id\", 'reportId', old.\"reportId\", 'url', old.\"url\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_pictures_reportId_into_oplog;", - "CREATE TRIGGER compensation_insert_main_pictures_reportId_into_oplog\n AFTER INSERT ON \"main\".\"pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pictures') 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_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"reportId\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_pictures_reportId_into_oplog;", - "CREATE TRIGGER compensation_update_main_pictures_reportId_into_oplog\n AFTER UPDATE ON \"main\".\"pictures\"\n WHEN 1 = (SELECT flag from _electric_trigger_settings WHERE namespace = 'main' AND tablename = 'pictures') 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_patch('{}', json_object('id', \"id\")), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"reportId\";\nEND;" - ], - "version": "910" - } -] \ No newline at end of file diff --git a/packages/electric-client/src/generated/client/pg-migrations.ts b/packages/electric-client/src/generated/client/pg-migrations.ts deleted file mode 100644 index aedcf057..00000000 --- a/packages/electric-client/src/generated/client/pg-migrations.ts +++ /dev/null @@ -1,381 +0,0 @@ -export default [ - { - "statements": [ - "CREATE TABLE udap (\n id text NOT NULL,\n department text NOT NULL,\n \"completeCoords\" text,\n visible boolean,\n name text,\n address text,\n \"zipCode\" text,\n city text,\n phone text,\n email text,\n marianne_text text,\n drac_text text,\n udap_text text,\n CONSTRAINT udap_pkey PRIMARY KEY (id)\n)", - "CREATE TABLE \"user\" (\n id text NOT NULL,\n name text NOT NULL,\n udap_id text NOT NULL,\n CONSTRAINT user_pkey PRIMARY KEY (id),\n CONSTRAINT user_udap_id_fkey FOREIGN KEY (udap_id) REFERENCES udap(id) ON DELETE SET NULL\n)", - "CREATE TABLE delegation (\n \"createdBy\" text NOT NULL,\n \"delegatedTo\" text NOT NULL,\n CONSTRAINT delegation_pkey PRIMARY KEY (\"createdBy\", \"delegatedTo\"),\n CONSTRAINT \"delegation_createdBy_fkey\" FOREIGN KEY (\"createdBy\") REFERENCES \"user\"(id) ON DELETE CASCADE,\n CONSTRAINT \"delegation_delegatedTo_fkey\" FOREIGN KEY (\"delegatedTo\") REFERENCES \"user\"(id) ON DELETE CASCADE\n)", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'udap', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_udap_primarykey ON \"public\".\"udap\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_udap_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_udap_primarykey\n BEFORE UPDATE ON \"public\".\"udap\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_udap_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_udap_into_oplog ON \"public\".\"udap\";", - " CREATE OR REPLACE FUNCTION insert_public_udap_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'udap';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'udap',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('address', new.\"address\", 'city', new.\"city\", 'completeCoords', new.\"completeCoords\", 'department', new.\"department\", 'drac_text', new.\"drac_text\", 'email', new.\"email\", 'id', new.\"id\", 'marianne_text', new.\"marianne_text\", 'name', new.\"name\", 'phone', new.\"phone\", 'udap_text', new.\"udap_text\", 'visible', new.\"visible\", 'zipCode', new.\"zipCode\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_udap_into_oplog\n AFTER INSERT ON \"public\".\"udap\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_udap_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_udap_into_oplog ON \"public\".\"udap\";", - " CREATE OR REPLACE FUNCTION update_public_udap_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'udap';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'udap',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('address', new.\"address\", 'city', new.\"city\", 'completeCoords', new.\"completeCoords\", 'department', new.\"department\", 'drac_text', new.\"drac_text\", 'email', new.\"email\", 'id', new.\"id\", 'marianne_text', new.\"marianne_text\", 'name', new.\"name\", 'phone', new.\"phone\", 'udap_text', new.\"udap_text\", 'visible', new.\"visible\", 'zipCode', new.\"zipCode\"),\n jsonb_build_object('address', old.\"address\", 'city', old.\"city\", 'completeCoords', old.\"completeCoords\", 'department', old.\"department\", 'drac_text', old.\"drac_text\", 'email', old.\"email\", 'id', old.\"id\", 'marianne_text', old.\"marianne_text\", 'name', old.\"name\", 'phone', old.\"phone\", 'udap_text', old.\"udap_text\", 'visible', old.\"visible\", 'zipCode', old.\"zipCode\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_udap_into_oplog\n AFTER UPDATE ON \"public\".\"udap\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_udap_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_udap_into_oplog ON \"public\".\"udap\";", - " CREATE OR REPLACE FUNCTION delete_public_udap_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'udap';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'udap',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('address', old.\"address\", 'city', old.\"city\", 'completeCoords', old.\"completeCoords\", 'department', old.\"department\", 'drac_text', old.\"drac_text\", 'email', old.\"email\", 'id', old.\"id\", 'marianne_text', old.\"marianne_text\", 'name', old.\"name\", 'phone', old.\"phone\", 'udap_text', old.\"udap_text\", 'visible', old.\"visible\", 'zipCode', old.\"zipCode\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_udap_into_oplog\n AFTER DELETE ON \"public\".\"udap\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_udap_into_oplog_function();", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'user', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_user_primarykey ON \"public\".\"user\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_user_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_user_primarykey\n BEFORE UPDATE ON \"public\".\"user\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_user_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_user_into_oplog ON \"public\".\"user\";", - " CREATE OR REPLACE FUNCTION insert_public_user_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'user';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'user',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('id', new.\"id\", 'name', new.\"name\", 'udap_id', new.\"udap_id\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_user_into_oplog\n AFTER INSERT ON \"public\".\"user\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_user_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_user_into_oplog ON \"public\".\"user\";", - " CREATE OR REPLACE FUNCTION update_public_user_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'user';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'user',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('id', new.\"id\", 'name', new.\"name\", 'udap_id', new.\"udap_id\"),\n jsonb_build_object('id', old.\"id\", 'name', old.\"name\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_user_into_oplog\n AFTER UPDATE ON \"public\".\"user\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_user_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_user_into_oplog ON \"public\".\"user\";", - " CREATE OR REPLACE FUNCTION delete_public_user_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'user';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'user',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('id', old.\"id\", 'name', old.\"name\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_user_into_oplog\n AFTER DELETE ON \"public\".\"user\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_user_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_user_udap_id_into_oplog ON \"public\".\"user\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_user_udap_id_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'user';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'udap',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"udap\"\n WHERE \"id\" = NEW.\"udap_id\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_user_udap_id_into_oplog\n AFTER INSERT ON \"public\".\"user\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_user_udap_id_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_user_udap_id_into_oplog ON \"public\".\"user\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_user_udap_id_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'user';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'udap',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"udap\"\n WHERE \"id\" = NEW.\"udap_id\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_user_udap_id_into_oplog\n AFTER UPDATE ON \"public\".\"user\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_user_udap_id_into_oplog_function();", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'delegation', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_delegation_primarykey ON \"public\".\"delegation\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_delegation_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"createdBy\" IS DISTINCT FROM NEW.\"createdBy\" THEN\n RAISE EXCEPTION 'Cannot change the value of column createdBy as it belongs to the primary key';\n END IF;\n IF OLD.\"delegatedTo\" IS DISTINCT FROM NEW.\"delegatedTo\" THEN\n RAISE EXCEPTION 'Cannot change the value of column delegatedTo as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_delegation_primarykey\n BEFORE UPDATE ON \"public\".\"delegation\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_delegation_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_delegation_into_oplog ON \"public\".\"delegation\";", - " CREATE OR REPLACE FUNCTION insert_public_delegation_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'delegation';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'delegation',\n 'INSERT',\n json_strip_nulls(json_build_object('createdBy', new.\"createdBy\", 'delegatedTo', new.\"delegatedTo\")),\n jsonb_build_object('createdBy', new.\"createdBy\", 'delegatedTo', new.\"delegatedTo\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_delegation_into_oplog\n AFTER INSERT ON \"public\".\"delegation\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_delegation_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_delegation_into_oplog ON \"public\".\"delegation\";", - " CREATE OR REPLACE FUNCTION update_public_delegation_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'delegation';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'delegation',\n 'UPDATE',\n json_strip_nulls(json_build_object('createdBy', new.\"createdBy\", 'delegatedTo', new.\"delegatedTo\")),\n jsonb_build_object('createdBy', new.\"createdBy\", 'delegatedTo', new.\"delegatedTo\"),\n jsonb_build_object('createdBy', old.\"createdBy\", 'delegatedTo', old.\"delegatedTo\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_delegation_into_oplog\n AFTER UPDATE ON \"public\".\"delegation\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_delegation_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_delegation_into_oplog ON \"public\".\"delegation\";", - " CREATE OR REPLACE FUNCTION delete_public_delegation_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'delegation';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'delegation',\n 'DELETE',\n json_strip_nulls(json_build_object('createdBy', old.\"createdBy\", 'delegatedTo', old.\"delegatedTo\")),\n NULL,\n jsonb_build_object('createdBy', old.\"createdBy\", 'delegatedTo', old.\"delegatedTo\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_delegation_into_oplog\n AFTER DELETE ON \"public\".\"delegation\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_delegation_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_delegation_createdBy_into_oplog ON \"public\".\"delegation\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_delegation_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'delegation';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_delegation_createdBy_into_oplog\n AFTER INSERT ON \"public\".\"delegation\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_delegation_createdBy_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_delegation_createdBy_into_oplog ON \"public\".\"delegation\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_delegation_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'delegation';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_delegation_createdBy_into_oplog\n AFTER UPDATE ON \"public\".\"delegation\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_delegation_createdBy_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_delegation_delegatedTo_into_oplog ON \"public\".\"delegation\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_delegation_delegatedTo_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'delegation';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"delegatedTo\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_delegation_delegatedTo_into_oplog\n AFTER INSERT ON \"public\".\"delegation\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_delegation_delegatedTo_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_delegation_delegatedTo_into_oplog ON \"public\".\"delegation\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_delegation_delegatedTo_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'delegation';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"delegatedTo\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_delegation_delegatedTo_into_oplog\n AFTER UPDATE ON \"public\".\"delegation\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_delegation_delegatedTo_into_oplog_function();" - ], - "version": "1" - }, - { - "statements": [ - "CREATE TABLE report (\n id text NOT NULL,\n title text,\n \"projectDescription\" text,\n \"redactedBy\" text,\n \"meetDate\" timestamp without time zone,\n \"applicantName\" text,\n \"applicantAddress\" text,\n \"projectCadastralRef\" text,\n \"projectSpaceType\" text,\n decision text,\n precisions text,\n contacts text,\n \"furtherInformation\" text,\n \"createdBy\" text NOT NULL,\n \"createdAt\" timestamp without time zone NOT NULL,\n \"serviceInstructeur\" integer,\n pdf text,\n disabled boolean,\n udap_id text,\n CONSTRAINT report_pkey PRIMARY KEY (id),\n CONSTRAINT \"report_createdBy_fkey\" FOREIGN KEY (\"createdBy\") REFERENCES \"user\"(id) ON DELETE SET NULL\n)", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'report', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_report_primarykey ON \"public\".\"report\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_report_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_report_primarykey\n BEFORE UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_report_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION insert_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('applicantAddress', new.\"applicantAddress\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_report_into_oplog\n AFTER INSERT ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION update_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('applicantAddress', new.\"applicantAddress\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"),\n jsonb_build_object('applicantAddress', old.\"applicantAddress\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_report_into_oplog\n AFTER UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION delete_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('applicantAddress', old.\"applicantAddress\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_report_into_oplog\n AFTER DELETE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_report_createdBy_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_report_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_report_createdBy_into_oplog\n AFTER INSERT ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_report_createdBy_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_report_createdBy_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_report_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_report_createdBy_into_oplog\n AFTER UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_report_createdBy_into_oplog_function();" - ], - "version": "2" - }, - { - "statements": [ - "CREATE TABLE clause (\n key text NOT NULL,\n value text NOT NULL,\n udap_id text NOT NULL,\n text text NOT NULL,\n CONSTRAINT clause_pkey PRIMARY KEY (key, value, udap_id)\n)", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'clause', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_clause_primarykey ON \"public\".\"clause\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_clause_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"key\" IS DISTINCT FROM NEW.\"key\" THEN\n RAISE EXCEPTION 'Cannot change the value of column key as it belongs to the primary key';\n END IF;\n IF OLD.\"udap_id\" IS DISTINCT FROM NEW.\"udap_id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column udap_id as it belongs to the primary key';\n END IF;\n IF OLD.\"value\" IS DISTINCT FROM NEW.\"value\" THEN\n RAISE EXCEPTION 'Cannot change the value of column value as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_clause_primarykey\n BEFORE UPDATE ON \"public\".\"clause\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_clause_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_clause_into_oplog ON \"public\".\"clause\";", - " CREATE OR REPLACE FUNCTION insert_public_clause_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'clause';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'clause',\n 'INSERT',\n json_strip_nulls(json_build_object('key', new.\"key\", 'udap_id', new.\"udap_id\", 'value', new.\"value\")),\n jsonb_build_object('key', new.\"key\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", 'value', new.\"value\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_clause_into_oplog\n AFTER INSERT ON \"public\".\"clause\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_clause_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_clause_into_oplog ON \"public\".\"clause\";", - " CREATE OR REPLACE FUNCTION update_public_clause_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'clause';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'clause',\n 'UPDATE',\n json_strip_nulls(json_build_object('key', new.\"key\", 'udap_id', new.\"udap_id\", 'value', new.\"value\")),\n jsonb_build_object('key', new.\"key\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", 'value', new.\"value\"),\n jsonb_build_object('key', old.\"key\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", 'value', old.\"value\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_clause_into_oplog\n AFTER UPDATE ON \"public\".\"clause\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_clause_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_clause_into_oplog ON \"public\".\"clause\";", - " CREATE OR REPLACE FUNCTION delete_public_clause_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'clause';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'clause',\n 'DELETE',\n json_strip_nulls(json_build_object('key', old.\"key\", 'udap_id', old.\"udap_id\", 'value', old.\"value\")),\n NULL,\n jsonb_build_object('key', old.\"key\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", 'value', old.\"value\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_clause_into_oplog\n AFTER DELETE ON \"public\".\"clause\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_clause_into_oplog_function();" - ], - "version": "4" - }, - { - "statements": [ - "CREATE TABLE service_instructeurs (\n id integer NOT NULL,\n full_name text NOT NULL,\n short_name text NOT NULL,\n email text,\n tel text,\n udap_id text,\n CONSTRAINT service_instructeurs_pkey PRIMARY KEY (id)\n)", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'service_instructeurs', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_service_instructeurs_primarykey ON \"public\".\"service_instructeurs\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_service_instructeurs_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_service_instructeurs_primarykey\n BEFORE UPDATE ON \"public\".\"service_instructeurs\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_service_instructeurs_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_service_instructeurs_into_oplog ON \"public\".\"service_instructeurs\";", - " CREATE OR REPLACE FUNCTION insert_public_service_instructeurs_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'service_instructeurs';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'service_instructeurs',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('email', new.\"email\", 'full_name', new.\"full_name\", 'id', new.\"id\", 'short_name', new.\"short_name\", 'tel', new.\"tel\", 'udap_id', new.\"udap_id\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_service_instructeurs_into_oplog\n AFTER INSERT ON \"public\".\"service_instructeurs\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_service_instructeurs_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_service_instructeurs_into_oplog ON \"public\".\"service_instructeurs\";", - " CREATE OR REPLACE FUNCTION update_public_service_instructeurs_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'service_instructeurs';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'service_instructeurs',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('email', new.\"email\", 'full_name', new.\"full_name\", 'id', new.\"id\", 'short_name', new.\"short_name\", 'tel', new.\"tel\", 'udap_id', new.\"udap_id\"),\n jsonb_build_object('email', old.\"email\", 'full_name', old.\"full_name\", 'id', old.\"id\", 'short_name', old.\"short_name\", 'tel', old.\"tel\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_service_instructeurs_into_oplog\n AFTER UPDATE ON \"public\".\"service_instructeurs\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_service_instructeurs_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_service_instructeurs_into_oplog ON \"public\".\"service_instructeurs\";", - " CREATE OR REPLACE FUNCTION delete_public_service_instructeurs_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'service_instructeurs';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'service_instructeurs',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('email', old.\"email\", 'full_name', old.\"full_name\", 'id', old.\"id\", 'short_name', old.\"short_name\", 'tel', old.\"tel\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_service_instructeurs_into_oplog\n AFTER DELETE ON \"public\".\"service_instructeurs\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_service_instructeurs_into_oplog_function();" - ], - "version": "7" - }, - { - "statements": [ - "ALTER TABLE \"report\" ADD COLUMN \"redactedById\" TEXT", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'report', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_report_primarykey ON \"public\".\"report\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_report_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_report_primarykey\n BEFORE UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_report_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION insert_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('applicantAddress', new.\"applicantAddress\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_report_into_oplog\n AFTER INSERT ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION update_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('applicantAddress', new.\"applicantAddress\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"),\n jsonb_build_object('applicantAddress', old.\"applicantAddress\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_report_into_oplog\n AFTER UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION delete_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('applicantAddress', old.\"applicantAddress\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_report_into_oplog\n AFTER DELETE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_report_createdBy_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_report_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_report_createdBy_into_oplog\n AFTER INSERT ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_report_createdBy_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_report_createdBy_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_report_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_report_createdBy_into_oplog\n AFTER UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_report_createdBy_into_oplog_function();" - ], - "version": "9" - }, - { - "statements": [ - "ALTER TABLE \"report\" ADD COLUMN \"applicantEmail\" TEXT", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'report', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_report_primarykey ON \"public\".\"report\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_report_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_report_primarykey\n BEFORE UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_report_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION insert_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_report_into_oplog\n AFTER INSERT ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION update_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"),\n jsonb_build_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_report_into_oplog\n AFTER UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION delete_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_report_into_oplog\n AFTER DELETE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_report_createdBy_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_report_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_report_createdBy_into_oplog\n AFTER INSERT ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_report_createdBy_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_report_createdBy_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_report_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_report_createdBy_into_oplog\n AFTER UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_report_createdBy_into_oplog_function();" - ], - "version": "901" - }, - { - "statements": [ - "CREATE TABLE clause_v2 (\n id text NOT NULL,\n key text NOT NULL,\n value text NOT NULL,\n \"position\" integer,\n udap_id text,\n text text NOT NULL,\n CONSTRAINT clause_v2_pkey PRIMARY KEY (id)\n)", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'clause_v2', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_clause_v2_primarykey ON \"public\".\"clause_v2\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_clause_v2_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_clause_v2_primarykey\n BEFORE UPDATE ON \"public\".\"clause_v2\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_clause_v2_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_clause_v2_into_oplog ON \"public\".\"clause_v2\";", - " CREATE OR REPLACE FUNCTION insert_public_clause_v2_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'clause_v2';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'clause_v2',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('id', new.\"id\", 'key', new.\"key\", 'position', new.\"position\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", 'value', new.\"value\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_clause_v2_into_oplog\n AFTER INSERT ON \"public\".\"clause_v2\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_clause_v2_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_clause_v2_into_oplog ON \"public\".\"clause_v2\";", - " CREATE OR REPLACE FUNCTION update_public_clause_v2_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'clause_v2';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'clause_v2',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('id', new.\"id\", 'key', new.\"key\", 'position', new.\"position\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", 'value', new.\"value\"),\n jsonb_build_object('id', old.\"id\", 'key', old.\"key\", 'position', old.\"position\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", 'value', old.\"value\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_clause_v2_into_oplog\n AFTER UPDATE ON \"public\".\"clause_v2\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_clause_v2_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_clause_v2_into_oplog ON \"public\".\"clause_v2\";", - " CREATE OR REPLACE FUNCTION delete_public_clause_v2_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'clause_v2';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'clause_v2',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('id', old.\"id\", 'key', old.\"key\", 'position', old.\"position\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", 'value', old.\"value\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_clause_v2_into_oplog\n AFTER DELETE ON \"public\".\"clause_v2\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_clause_v2_into_oplog_function();" - ], - "version": "902" - }, - { - "statements": [ - "ALTER TABLE clause ADD COLUMN \"hidden\" BOOLEAN", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'clause', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_clause_primarykey ON \"public\".\"clause\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_clause_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"key\" IS DISTINCT FROM NEW.\"key\" THEN\n RAISE EXCEPTION 'Cannot change the value of column key as it belongs to the primary key';\n END IF;\n IF OLD.\"udap_id\" IS DISTINCT FROM NEW.\"udap_id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column udap_id as it belongs to the primary key';\n END IF;\n IF OLD.\"value\" IS DISTINCT FROM NEW.\"value\" THEN\n RAISE EXCEPTION 'Cannot change the value of column value as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_clause_primarykey\n BEFORE UPDATE ON \"public\".\"clause\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_clause_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_clause_into_oplog ON \"public\".\"clause\";", - " CREATE OR REPLACE FUNCTION insert_public_clause_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'clause';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'clause',\n 'INSERT',\n json_strip_nulls(json_build_object('key', new.\"key\", 'udap_id', new.\"udap_id\", 'value', new.\"value\")),\n jsonb_build_object('hidden', new.\"hidden\", 'key', new.\"key\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", 'value', new.\"value\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_clause_into_oplog\n AFTER INSERT ON \"public\".\"clause\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_clause_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_clause_into_oplog ON \"public\".\"clause\";", - " CREATE OR REPLACE FUNCTION update_public_clause_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'clause';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'clause',\n 'UPDATE',\n json_strip_nulls(json_build_object('key', new.\"key\", 'udap_id', new.\"udap_id\", 'value', new.\"value\")),\n jsonb_build_object('hidden', new.\"hidden\", 'key', new.\"key\", 'text', new.\"text\", 'udap_id', new.\"udap_id\", 'value', new.\"value\"),\n jsonb_build_object('hidden', old.\"hidden\", 'key', old.\"key\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", 'value', old.\"value\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_clause_into_oplog\n AFTER UPDATE ON \"public\".\"clause\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_clause_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_clause_into_oplog ON \"public\".\"clause\";", - " CREATE OR REPLACE FUNCTION delete_public_clause_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'clause';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'clause',\n 'DELETE',\n json_strip_nulls(json_build_object('key', old.\"key\", 'udap_id', old.\"udap_id\", 'value', old.\"value\")),\n NULL,\n jsonb_build_object('hidden', old.\"hidden\", 'key', old.\"key\", 'text', old.\"text\", 'udap_id', old.\"udap_id\", 'value', old.\"value\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_clause_into_oplog\n AFTER DELETE ON \"public\".\"clause\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_clause_into_oplog_function();" - ], - "version": "903" - }, - { - "statements": [ - "CREATE TABLE pdf_snapshot (\n id text NOT NULL,\n report_id text,\n html text,\n report text,\n user_id text,\n CONSTRAINT pdf_snapshot_pkey PRIMARY KEY (id)\n)", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'pdf_snapshot', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_pdf_snapshot_primarykey ON \"public\".\"pdf_snapshot\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_pdf_snapshot_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_pdf_snapshot_primarykey\n BEFORE UPDATE ON \"public\".\"pdf_snapshot\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_pdf_snapshot_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_pdf_snapshot_into_oplog ON \"public\".\"pdf_snapshot\";", - " CREATE OR REPLACE FUNCTION insert_public_pdf_snapshot_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pdf_snapshot';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'pdf_snapshot',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('html', new.\"html\", 'id', new.\"id\", 'report', new.\"report\", 'report_id', new.\"report_id\", 'user_id', new.\"user_id\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_pdf_snapshot_into_oplog\n AFTER INSERT ON \"public\".\"pdf_snapshot\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_pdf_snapshot_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_pdf_snapshot_into_oplog ON \"public\".\"pdf_snapshot\";", - " CREATE OR REPLACE FUNCTION update_public_pdf_snapshot_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pdf_snapshot';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'pdf_snapshot',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('html', new.\"html\", 'id', new.\"id\", 'report', new.\"report\", 'report_id', new.\"report_id\", 'user_id', new.\"user_id\"),\n jsonb_build_object('html', old.\"html\", 'id', old.\"id\", 'report', old.\"report\", 'report_id', old.\"report_id\", 'user_id', old.\"user_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_pdf_snapshot_into_oplog\n AFTER UPDATE ON \"public\".\"pdf_snapshot\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_pdf_snapshot_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_pdf_snapshot_into_oplog ON \"public\".\"pdf_snapshot\";", - " CREATE OR REPLACE FUNCTION delete_public_pdf_snapshot_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pdf_snapshot';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'pdf_snapshot',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('html', old.\"html\", 'id', old.\"id\", 'report', old.\"report\", 'report_id', old.\"report_id\", 'user_id', old.\"user_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_pdf_snapshot_into_oplog\n AFTER DELETE ON \"public\".\"pdf_snapshot\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_pdf_snapshot_into_oplog_function();" - ], - "version": "904" - }, - { - "statements": [ - "ALTER TABLE \"report\" ADD COLUMN \"city\" TEXT", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'report', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_report_primarykey ON \"public\".\"report\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_report_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_report_primarykey\n BEFORE UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_report_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION insert_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'city', new.\"city\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_report_into_oplog\n AFTER INSERT ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION update_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'city', new.\"city\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\"),\n jsonb_build_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'city', old.\"city\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_report_into_oplog\n AFTER UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION delete_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'city', old.\"city\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_report_into_oplog\n AFTER DELETE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_report_createdBy_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_report_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_report_createdBy_into_oplog\n AFTER INSERT ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_report_createdBy_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_report_createdBy_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_report_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_report_createdBy_into_oplog\n AFTER UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_report_createdBy_into_oplog_function();" - ], - "version": "905" - }, - { - "statements": [ - "ALTER TABLE \"report\" ADD COLUMN \"zipCode\" TEXT", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'report', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_report_primarykey ON \"public\".\"report\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_report_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_report_primarykey\n BEFORE UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_report_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION insert_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'city', new.\"city\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\", 'zipCode', new.\"zipCode\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_report_into_oplog\n AFTER INSERT ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION update_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('applicantAddress', new.\"applicantAddress\", 'applicantEmail', new.\"applicantEmail\", 'applicantName', new.\"applicantName\", 'city', new.\"city\", 'contacts', new.\"contacts\", 'createdAt', new.\"createdAt\", 'createdBy', new.\"createdBy\", 'decision', new.\"decision\", 'disabled', new.\"disabled\", 'furtherInformation', new.\"furtherInformation\", 'id', new.\"id\", 'meetDate', new.\"meetDate\", 'pdf', new.\"pdf\", 'precisions', new.\"precisions\", 'projectCadastralRef', new.\"projectCadastralRef\", 'projectDescription', new.\"projectDescription\", 'projectSpaceType', new.\"projectSpaceType\", 'redactedBy', new.\"redactedBy\", 'redactedById', new.\"redactedById\", 'serviceInstructeur', new.\"serviceInstructeur\", 'title', new.\"title\", 'udap_id', new.\"udap_id\", 'zipCode', new.\"zipCode\"),\n jsonb_build_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'city', old.\"city\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\", 'zipCode', old.\"zipCode\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_report_into_oplog\n AFTER UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_report_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION delete_public_report_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'report',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('applicantAddress', old.\"applicantAddress\", 'applicantEmail', old.\"applicantEmail\", 'applicantName', old.\"applicantName\", 'city', old.\"city\", 'contacts', old.\"contacts\", 'createdAt', old.\"createdAt\", 'createdBy', old.\"createdBy\", 'decision', old.\"decision\", 'disabled', old.\"disabled\", 'furtherInformation', old.\"furtherInformation\", 'id', old.\"id\", 'meetDate', old.\"meetDate\", 'pdf', old.\"pdf\", 'precisions', old.\"precisions\", 'projectCadastralRef', old.\"projectCadastralRef\", 'projectDescription', old.\"projectDescription\", 'projectSpaceType', old.\"projectSpaceType\", 'redactedBy', old.\"redactedBy\", 'redactedById', old.\"redactedById\", 'serviceInstructeur', old.\"serviceInstructeur\", 'title', old.\"title\", 'udap_id', old.\"udap_id\", 'zipCode', old.\"zipCode\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_report_into_oplog\n AFTER DELETE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_report_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_report_createdBy_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_report_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_report_createdBy_into_oplog\n AFTER INSERT ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_report_createdBy_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_report_createdBy_into_oplog ON \"public\".\"report\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_report_createdBy_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'report';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'user',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"user\"\n WHERE \"id\" = NEW.\"createdBy\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_report_createdBy_into_oplog\n AFTER UPDATE ON \"public\".\"report\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_report_createdBy_into_oplog_function();" - ], - "version": "906" - }, - { - "statements": [ - "CREATE TABLE pictures (\n id text NOT NULL,\n \"reportId\" text,\n url text,\n \"createdAt\" timestamp without time zone,\n CONSTRAINT pictures_pkey PRIMARY KEY (id),\n CONSTRAINT \"pictures_reportId_fkey\" FOREIGN KEY (\"reportId\") REFERENCES report(id) ON DELETE CASCADE\n)", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'pictures', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_pictures_primarykey ON \"public\".\"pictures\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_pictures_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_pictures_primarykey\n BEFORE UPDATE ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_pictures_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_pictures_into_oplog ON \"public\".\"pictures\";", - " CREATE OR REPLACE FUNCTION insert_public_pictures_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pictures';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'pictures',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'reportId', new.\"reportId\", 'url', new.\"url\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_pictures_into_oplog\n AFTER INSERT ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_pictures_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_pictures_into_oplog ON \"public\".\"pictures\";", - " CREATE OR REPLACE FUNCTION update_public_pictures_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pictures';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'pictures',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'reportId', new.\"reportId\", 'url', new.\"url\"),\n jsonb_build_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'reportId', old.\"reportId\", 'url', old.\"url\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_pictures_into_oplog\n AFTER UPDATE ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_pictures_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_pictures_into_oplog ON \"public\".\"pictures\";", - " CREATE OR REPLACE FUNCTION delete_public_pictures_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pictures';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'pictures',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'reportId', old.\"reportId\", 'url', old.\"url\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_pictures_into_oplog\n AFTER DELETE ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_pictures_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_pictures_reportId_into_oplog ON \"public\".\"pictures\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_pictures_reportId_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pictures';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'report',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"report\"\n WHERE \"id\" = NEW.\"reportId\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_pictures_reportId_into_oplog\n AFTER INSERT ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_pictures_reportId_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_pictures_reportId_into_oplog ON \"public\".\"pictures\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_pictures_reportId_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pictures';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'report',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"report\"\n WHERE \"id\" = NEW.\"reportId\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_pictures_reportId_into_oplog\n AFTER UPDATE ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_pictures_reportId_into_oplog_function();" - ], - "version": "907" - }, - { - "statements": [ - "CREATE TABLE tmp_pictures (\n id text NOT NULL,\n \"reportId\" text,\n \"createdAt\" timestamp without time zone,\n CONSTRAINT tmp_pictures_pkey PRIMARY KEY (id),\n CONSTRAINT \"tmp_pictures_reportId_fkey\" FOREIGN KEY (\"reportId\") REFERENCES report(id) ON DELETE CASCADE\n)", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'tmp_pictures', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_tmp_pictures_primarykey ON \"public\".\"tmp_pictures\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_tmp_pictures_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_tmp_pictures_primarykey\n BEFORE UPDATE ON \"public\".\"tmp_pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_tmp_pictures_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_tmp_pictures_into_oplog ON \"public\".\"tmp_pictures\";", - " CREATE OR REPLACE FUNCTION insert_public_tmp_pictures_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'tmp_pictures';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'tmp_pictures',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'reportId', new.\"reportId\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_tmp_pictures_into_oplog\n AFTER INSERT ON \"public\".\"tmp_pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_tmp_pictures_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_tmp_pictures_into_oplog ON \"public\".\"tmp_pictures\";", - " CREATE OR REPLACE FUNCTION update_public_tmp_pictures_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'tmp_pictures';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'tmp_pictures',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'reportId', new.\"reportId\"),\n jsonb_build_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'reportId', old.\"reportId\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_tmp_pictures_into_oplog\n AFTER UPDATE ON \"public\".\"tmp_pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_tmp_pictures_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_tmp_pictures_into_oplog ON \"public\".\"tmp_pictures\";", - " CREATE OR REPLACE FUNCTION delete_public_tmp_pictures_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'tmp_pictures';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'tmp_pictures',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'reportId', old.\"reportId\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_tmp_pictures_into_oplog\n AFTER DELETE ON \"public\".\"tmp_pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_tmp_pictures_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_tmp_pictures_reportId_into_oplog ON \"public\".\"tmp_pictures\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_tmp_pictures_reportId_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'tmp_pictures';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'report',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"report\"\n WHERE \"id\" = NEW.\"reportId\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_tmp_pictures_reportId_into_oplog\n AFTER INSERT ON \"public\".\"tmp_pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_tmp_pictures_reportId_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_tmp_pictures_reportId_into_oplog ON \"public\".\"tmp_pictures\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_tmp_pictures_reportId_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'tmp_pictures';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'report',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"report\"\n WHERE \"id\" = NEW.\"reportId\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_tmp_pictures_reportId_into_oplog\n AFTER UPDATE ON \"public\".\"tmp_pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_tmp_pictures_reportId_into_oplog_function();" - ], - "version": "908" - }, - { - "statements": [ - "CREATE TABLE picture_lines (\n id text NOT NULL,\n \"pictureId\" text,\n lines text NOT NULL,\n \"createdAt\" timestamp without time zone,\n CONSTRAINT picture_lines_pkey PRIMARY KEY (id)\n)", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'picture_lines', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_picture_lines_primarykey ON \"public\".\"picture_lines\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_picture_lines_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_picture_lines_primarykey\n BEFORE UPDATE ON \"public\".\"picture_lines\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_picture_lines_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_picture_lines_into_oplog ON \"public\".\"picture_lines\";", - " CREATE OR REPLACE FUNCTION insert_public_picture_lines_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'picture_lines';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'picture_lines',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'lines', new.\"lines\", 'pictureId', new.\"pictureId\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_picture_lines_into_oplog\n AFTER INSERT ON \"public\".\"picture_lines\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_picture_lines_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_picture_lines_into_oplog ON \"public\".\"picture_lines\";", - " CREATE OR REPLACE FUNCTION update_public_picture_lines_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'picture_lines';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'picture_lines',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('createdAt', new.\"createdAt\", 'id', new.\"id\", 'lines', new.\"lines\", 'pictureId', new.\"pictureId\"),\n jsonb_build_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'lines', old.\"lines\", 'pictureId', old.\"pictureId\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_picture_lines_into_oplog\n AFTER UPDATE ON \"public\".\"picture_lines\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_picture_lines_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_picture_lines_into_oplog ON \"public\".\"picture_lines\";", - " CREATE OR REPLACE FUNCTION delete_public_picture_lines_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'picture_lines';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'picture_lines',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('createdAt', old.\"createdAt\", 'id', old.\"id\", 'lines', old.\"lines\", 'pictureId', old.\"pictureId\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_picture_lines_into_oplog\n AFTER DELETE ON \"public\".\"picture_lines\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_picture_lines_into_oplog_function();" - ], - "version": "909" - }, - { - "statements": [ - "ALTER TABLE pictures ADD COLUMN \"finalUrl\" TEXT", - "INSERT INTO \"public\".\"_electric_trigger_settings\" (\"namespace\", \"tablename\", \"flag\")\n VALUES ('public', 'pictures', 1)\n ON CONFLICT DO NOTHING;", - "DROP TRIGGER IF EXISTS update_ensure_public_pictures_primarykey ON \"public\".\"pictures\";", - "CREATE OR REPLACE FUNCTION update_ensure_public_pictures_primarykey_function()\nRETURNS TRIGGER AS $$\nBEGIN\n IF OLD.\"id\" IS DISTINCT FROM NEW.\"id\" THEN\n RAISE EXCEPTION 'Cannot change the value of column id as it belongs to the primary key';\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_ensure_public_pictures_primarykey\n BEFORE UPDATE ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION update_ensure_public_pictures_primarykey_function();", - "DROP TRIGGER IF EXISTS insert_public_pictures_into_oplog ON \"public\".\"pictures\";", - " CREATE OR REPLACE FUNCTION insert_public_pictures_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pictures';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'pictures',\n 'INSERT',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('createdAt', new.\"createdAt\", 'finalUrl', new.\"finalUrl\", 'id', new.\"id\", 'reportId', new.\"reportId\", 'url', new.\"url\"),\n NULL,\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER insert_public_pictures_into_oplog\n AFTER INSERT ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION insert_public_pictures_into_oplog_function();", - "DROP TRIGGER IF EXISTS update_public_pictures_into_oplog ON \"public\".\"pictures\";", - " CREATE OR REPLACE FUNCTION update_public_pictures_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pictures';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'pictures',\n 'UPDATE',\n json_strip_nulls(json_build_object('id', new.\"id\")),\n jsonb_build_object('createdAt', new.\"createdAt\", 'finalUrl', new.\"finalUrl\", 'id', new.\"id\", 'reportId', new.\"reportId\", 'url', new.\"url\"),\n jsonb_build_object('createdAt', old.\"createdAt\", 'finalUrl', old.\"finalUrl\", 'id', old.\"id\", 'reportId', old.\"reportId\", 'url', old.\"url\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER update_public_pictures_into_oplog\n AFTER UPDATE ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION update_public_pictures_into_oplog_function();", - "DROP TRIGGER IF EXISTS delete_public_pictures_into_oplog ON \"public\".\"pictures\";", - " CREATE OR REPLACE FUNCTION delete_public_pictures_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n BEGIN\n -- Get the flag value from _electric_trigger_settings\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pictures';\n\n IF flag_value = 1 THEN\n -- Insert into _electric_oplog\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n VALUES (\n 'public',\n 'pictures',\n 'DELETE',\n json_strip_nulls(json_build_object('id', old.\"id\")),\n NULL,\n jsonb_build_object('createdAt', old.\"createdAt\", 'finalUrl', old.\"finalUrl\", 'id', old.\"id\", 'reportId', old.\"reportId\", 'url', old.\"url\"),\n NULL\n );\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER delete_public_pictures_into_oplog\n AFTER DELETE ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION delete_public_pictures_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_insert_public_pictures_reportId_into_oplog ON \"public\".\"pictures\";", - " CREATE OR REPLACE FUNCTION compensation_insert_public_pictures_reportId_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pictures';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'report',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"report\"\n WHERE \"id\" = NEW.\"reportId\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_insert_public_pictures_reportId_into_oplog\n AFTER INSERT ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_insert_public_pictures_reportId_into_oplog_function();", - "DROP TRIGGER IF EXISTS compensation_update_public_pictures_reportId_into_oplog ON \"public\".\"pictures\";", - " CREATE OR REPLACE FUNCTION compensation_update_public_pictures_reportId_into_oplog_function()\n RETURNS TRIGGER AS $$\n BEGIN\n DECLARE\n flag_value INTEGER;\n meta_value INTEGER;\n BEGIN\n SELECT flag INTO flag_value FROM \"public\"._electric_trigger_settings WHERE namespace = 'public' AND tablename = 'pictures';\n\n SELECT value INTO meta_value FROM \"public\"._electric_meta WHERE key = 'compensations';\n\n IF flag_value = 1 AND meta_value = 1 THEN\n INSERT INTO \"public\"._electric_oplog (namespace, tablename, optype, \"primaryKey\", \"newRow\", \"oldRow\", timestamp)\n SELECT\n 'public',\n 'report',\n 'COMPENSATION',\n json_strip_nulls(json_strip_nulls(json_build_object('id', \"id\"))),\n jsonb_build_object('id', \"id\"),\n NULL,\n NULL\n FROM \"public\".\"report\"\n WHERE \"id\" = NEW.\"reportId\";\n END IF;\n\n RETURN NEW;\n END;\n END;\n $$ LANGUAGE plpgsql;", - "CREATE TRIGGER compensation_update_public_pictures_reportId_into_oplog\n AFTER UPDATE ON \"public\".\"pictures\"\n FOR EACH ROW\n EXECUTE FUNCTION compensation_update_public_pictures_reportId_into_oplog_function();" - ], - "version": "910" - } -] \ 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 deleted file mode 100644 index c38511a0..00000000 --- a/packages/electric-client/src/generated/client/prismaClient.d.ts +++ /dev/null @@ -1,16158 +0,0 @@ - -/** - * 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 ClausePayload = { - name: "Clause" - objects: {} - scalars: $Extensions.GetResult<{ - key: string - value: string - udap_id: string - text: string - hidden: boolean | null - }, ExtArgs["result"]["clause"]> - composites: {} -} - -/** - * Model Clause - * - */ -export type Clause = runtime.Types.DefaultSelection -export type Clause_v2Payload = { - name: "Clause_v2" - objects: {} - scalars: $Extensions.GetResult<{ - id: string - key: string - value: string - /** - * @zod.number.int().gte(-2147483648).lte(2147483647) - */ - position: number | null - udap_id: string | null - text: string - }, ExtArgs["result"]["clause_v2"]> - composites: {} -} - -/** - * Model Clause_v2 - * - */ -export type Clause_v2 = runtime.Types.DefaultSelection -export type DelegationPayload = { - name: "Delegation" - objects: { - user_delegation_createdByTouser: UserPayload - user_delegation_delegatedToTouser: UserPayload - } - scalars: $Extensions.GetResult<{ - createdBy: string - delegatedTo: string - }, ExtArgs["result"]["delegation"]> - composites: {} -} - -/** - * Model Delegation - * - */ -export type Delegation = runtime.Types.DefaultSelection -export type Pdf_snapshotPayload = { - name: "Pdf_snapshot" - objects: {} - scalars: $Extensions.GetResult<{ - id: string - report_id: string | null - html: string | null - report: string | null - user_id: string | null - }, ExtArgs["result"]["pdf_snapshot"]> - composites: {} -} - -/** - * Model Pdf_snapshot - * - */ -export type Pdf_snapshot = runtime.Types.DefaultSelection -export type Picture_linesPayload = { - name: "Picture_lines" - objects: {} - scalars: $Extensions.GetResult<{ - id: string - pictureId: string | null - lines: string - createdAt: Date | null - }, ExtArgs["result"]["picture_lines"]> - composites: {} -} - -/** - * Model Picture_lines - * - */ -export type Picture_lines = runtime.Types.DefaultSelection -export type PicturesPayload = { - name: "Pictures" - objects: { - report: ReportPayload | null - } - scalars: $Extensions.GetResult<{ - id: string - reportId: string | null - url: string | null - createdAt: Date | null - finalUrl: string | null - }, ExtArgs["result"]["pictures"]> - composites: {} -} - -/** - * Model Pictures - * - */ -export type Pictures = runtime.Types.DefaultSelection -export type ReportPayload = { - name: "Report" - objects: { - pictures: PicturesPayload[] - user: UserPayload - tmp_pictures: Tmp_picturesPayload[] - } - scalars: $Extensions.GetResult<{ - id: string - title: string | null - projectDescription: string | null - redactedBy: string | null - meetDate: Date | null - applicantName: string | null - applicantAddress: string | null - projectCadastralRef: string | null - projectSpaceType: string | null - decision: string | null - precisions: string | null - contacts: string | null - furtherInformation: string | null - createdBy: string - createdAt: Date - /** - * @zod.number.int().gte(-2147483648).lte(2147483647) - */ - serviceInstructeur: number | null - pdf: string | null - disabled: boolean | null - udap_id: string | null - redactedById: string | null - applicantEmail: string | null - city: string | null - zipCode: string | null - }, ExtArgs["result"]["report"]> - composites: {} -} - -/** - * Model Report - * - */ -export type Report = runtime.Types.DefaultSelection -export type Service_instructeursPayload = { - name: "Service_instructeurs" - objects: {} - scalars: $Extensions.GetResult<{ - /** - * @zod.number.int().gte(-2147483648).lte(2147483647) - */ - id: number - full_name: string - short_name: string - email: string | null - tel: string | null - udap_id: string | null - }, ExtArgs["result"]["service_instructeurs"]> - composites: {} -} - -/** - * Model Service_instructeurs - * - */ -export type Service_instructeurs = runtime.Types.DefaultSelection -export type Tmp_picturesPayload = { - name: "Tmp_pictures" - objects: { - report: ReportPayload | null - } - scalars: $Extensions.GetResult<{ - id: string - reportId: string | null - createdAt: Date | null - }, ExtArgs["result"]["tmp_pictures"]> - composites: {} -} - -/** - * Model Tmp_pictures - * - */ -export type Tmp_pictures = runtime.Types.DefaultSelection -export type UdapPayload = { - name: "Udap" - objects: { - user: UserPayload[] - } - scalars: $Extensions.GetResult<{ - id: string - department: string - completeCoords: string | null - visible: boolean | null - name: string | null - address: string | null - zipCode: string | null - city: string | null - phone: string | null - email: string | null - marianne_text: string | null - drac_text: string | null - udap_text: string | null - }, ExtArgs["result"]["udap"]> - composites: {} -} - -/** - * Model Udap - * - */ -export type Udap = runtime.Types.DefaultSelection -export type UserPayload = { - name: "User" - objects: { - delegation_delegation_createdByTouser: DelegationPayload[] - delegation_delegation_delegatedToTouser: DelegationPayload[] - report: ReportPayload[] - udap: UdapPayload - } - scalars: $Extensions.GetResult<{ - id: string - name: string - udap_id: string - }, ExtArgs["result"]["user"]> - composites: {} -} - -/** - * Model User - * - */ -export type User = runtime.Types.DefaultSelection - -/** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Clauses - * const clauses = await prisma.clause.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 Clauses - * const clauses = await prisma.clause.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.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.clause_v2`: Exposes CRUD operations for the **Clause_v2** model. - * Example usage: - * ```ts - * // Fetch zero or more Clause_v2s - * const clause_v2s = await prisma.clause_v2.findMany() - * ``` - */ - get clause_v2(): Prisma.Clause_v2Delegate; - - /** - * `prisma.delegation`: Exposes CRUD operations for the **Delegation** model. - * Example usage: - * ```ts - * // Fetch zero or more Delegations - * const delegations = await prisma.delegation.findMany() - * ``` - */ - get delegation(): Prisma.DelegationDelegate; - - /** - * `prisma.pdf_snapshot`: Exposes CRUD operations for the **Pdf_snapshot** model. - * Example usage: - * ```ts - * // Fetch zero or more Pdf_snapshots - * const pdf_snapshots = await prisma.pdf_snapshot.findMany() - * ``` - */ - get pdf_snapshot(): Prisma.Pdf_snapshotDelegate; - - /** - * `prisma.picture_lines`: Exposes CRUD operations for the **Picture_lines** model. - * Example usage: - * ```ts - * // Fetch zero or more Picture_lines - * const picture_lines = await prisma.picture_lines.findMany() - * ``` - */ - get picture_lines(): Prisma.Picture_linesDelegate; - - /** - * `prisma.pictures`: Exposes CRUD operations for the **Pictures** model. - * Example usage: - * ```ts - * // Fetch zero or more Pictures - * const pictures = await prisma.pictures.findMany() - * ``` - */ - get pictures(): Prisma.PicturesDelegate; - - /** - * `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.service_instructeurs`: Exposes CRUD operations for the **Service_instructeurs** model. - * Example usage: - * ```ts - * // Fetch zero or more Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.findMany() - * ``` - */ - get service_instructeurs(): Prisma.Service_instructeursDelegate; - - /** - * `prisma.tmp_pictures`: Exposes CRUD operations for the **Tmp_pictures** model. - * Example usage: - * ```ts - * // Fetch zero or more Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.findMany() - * ``` - */ - get tmp_pictures(): Prisma.Tmp_picturesDelegate; - - /** - * `prisma.udap`: Exposes CRUD operations for the **Udap** model. - * Example usage: - * ```ts - * // Fetch zero or more Udaps - * const udaps = await prisma.udap.findMany() - * ``` - */ - get udap(): Prisma.UdapDelegate; - - /** - * `prisma.user`: Exposes CRUD operations for the **User** model. - * Example usage: - * ```ts - * // Fetch zero or more Users - * const users = await prisma.user.findMany() - * ``` - */ - get user(): Prisma.UserDelegate; -} - -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: { - Clause: 'Clause', - Clause_v2: 'Clause_v2', - Delegation: 'Delegation', - Pdf_snapshot: 'Pdf_snapshot', - Picture_lines: 'Picture_lines', - Pictures: 'Pictures', - Report: 'Report', - Service_instructeurs: 'Service_instructeurs', - Tmp_pictures: 'Tmp_pictures', - Udap: 'Udap', - User: 'User' - }; - - 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: 'clause' | 'clause_v2' | 'delegation' | 'pdf_snapshot' | 'picture_lines' | 'pictures' | 'report' | 'service_instructeurs' | 'tmp_pictures' | 'udap' | 'user' - txIsolationLevel: Prisma.TransactionIsolationLevel - }, - model: { - 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 - } - } - } - Clause_v2: { - payload: Clause_v2Payload - operations: { - findUnique: { - args: Prisma.Clause_v2FindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.Clause_v2FindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.Clause_v2FindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.Clause_v2FindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.Clause_v2FindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.Clause_v2CreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.Clause_v2CreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.Clause_v2DeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.Clause_v2UpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.Clause_v2DeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.Clause_v2UpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.Clause_v2UpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.Clause_v2AggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.Clause_v2GroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.Clause_v2CountArgs, - result: $Utils.Optional | number - } - } - } - Delegation: { - payload: DelegationPayload - operations: { - findUnique: { - args: Prisma.DelegationFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.DelegationFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.DelegationFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.DelegationFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.DelegationFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.DelegationCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.DelegationCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.DelegationDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.DelegationUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.DelegationDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.DelegationUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.DelegationUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.DelegationAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.DelegationGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.DelegationCountArgs, - result: $Utils.Optional | number - } - } - } - Pdf_snapshot: { - payload: Pdf_snapshotPayload - operations: { - findUnique: { - args: Prisma.Pdf_snapshotFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.Pdf_snapshotFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.Pdf_snapshotFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.Pdf_snapshotFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.Pdf_snapshotFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.Pdf_snapshotCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.Pdf_snapshotCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.Pdf_snapshotDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.Pdf_snapshotUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.Pdf_snapshotDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.Pdf_snapshotUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.Pdf_snapshotUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.Pdf_snapshotAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.Pdf_snapshotGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.Pdf_snapshotCountArgs, - result: $Utils.Optional | number - } - } - } - Picture_lines: { - payload: Picture_linesPayload - operations: { - findUnique: { - args: Prisma.Picture_linesFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.Picture_linesFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.Picture_linesFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.Picture_linesFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.Picture_linesFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.Picture_linesCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.Picture_linesCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.Picture_linesDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.Picture_linesUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.Picture_linesDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.Picture_linesUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.Picture_linesUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.Picture_linesAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.Picture_linesGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.Picture_linesCountArgs, - result: $Utils.Optional | number - } - } - } - Pictures: { - payload: PicturesPayload - operations: { - findUnique: { - args: Prisma.PicturesFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.PicturesFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.PicturesFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.PicturesFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.PicturesFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.PicturesCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.PicturesCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.PicturesDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.PicturesUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.PicturesDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.PicturesUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.PicturesUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.PicturesAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.PicturesGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.PicturesCountArgs, - 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 - } - } - } - Service_instructeurs: { - payload: Service_instructeursPayload - operations: { - findUnique: { - args: Prisma.Service_instructeursFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.Service_instructeursFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.Service_instructeursFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.Service_instructeursFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.Service_instructeursFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.Service_instructeursCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.Service_instructeursCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.Service_instructeursDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.Service_instructeursUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.Service_instructeursDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.Service_instructeursUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.Service_instructeursUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.Service_instructeursAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.Service_instructeursGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.Service_instructeursCountArgs, - result: $Utils.Optional | number - } - } - } - Tmp_pictures: { - payload: Tmp_picturesPayload - operations: { - findUnique: { - args: Prisma.Tmp_picturesFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.Tmp_picturesFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.Tmp_picturesFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.Tmp_picturesFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.Tmp_picturesFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.Tmp_picturesCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.Tmp_picturesCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.Tmp_picturesDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.Tmp_picturesUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.Tmp_picturesDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.Tmp_picturesUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.Tmp_picturesUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.Tmp_picturesAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.Tmp_picturesGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.Tmp_picturesCountArgs, - result: $Utils.Optional | number - } - } - } - Udap: { - payload: UdapPayload - operations: { - findUnique: { - args: Prisma.UdapFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.UdapFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.UdapFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.UdapFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.UdapFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.UdapCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.UdapCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.UdapDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.UdapUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.UdapDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.UdapUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.UdapUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.UdapAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.UdapGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.UdapCountArgs, - result: $Utils.Optional | number - } - } - } - User: { - payload: UserPayload - operations: { - findUnique: { - args: Prisma.UserFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.UserFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.UserFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.UserFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.UserFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.UserCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.UserCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.UserDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.UserUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.UserDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.UserUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.UserUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.UserAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.UserGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.UserCountArgs, - 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 ReportCountOutputType - */ - - - export type ReportCountOutputType = { - pictures: number - tmp_pictures: number - } - - export type ReportCountOutputTypeSelect = { - pictures?: boolean | ReportCountOutputTypeCountPicturesArgs - tmp_pictures?: boolean | ReportCountOutputTypeCountTmp_picturesArgs - } - - // Custom InputTypes - - /** - * ReportCountOutputType without action - */ - export type ReportCountOutputTypeArgs = { - /** - * Select specific fields to fetch from the ReportCountOutputType - */ - select?: ReportCountOutputTypeSelect | null - } - - - /** - * ReportCountOutputType without action - */ - export type ReportCountOutputTypeCountPicturesArgs = { - where?: PicturesWhereInput - } - - - /** - * ReportCountOutputType without action - */ - export type ReportCountOutputTypeCountTmp_picturesArgs = { - where?: Tmp_picturesWhereInput - } - - - - /** - * Count Type UdapCountOutputType - */ - - - export type UdapCountOutputType = { - user: number - } - - export type UdapCountOutputTypeSelect = { - user?: boolean | UdapCountOutputTypeCountUserArgs - } - - // Custom InputTypes - - /** - * UdapCountOutputType without action - */ - export type UdapCountOutputTypeArgs = { - /** - * Select specific fields to fetch from the UdapCountOutputType - */ - select?: UdapCountOutputTypeSelect | null - } - - - /** - * UdapCountOutputType without action - */ - export type UdapCountOutputTypeCountUserArgs = { - where?: UserWhereInput - } - - - - /** - * Count Type UserCountOutputType - */ - - - export type UserCountOutputType = { - delegation_delegation_createdByTouser: number - delegation_delegation_delegatedToTouser: number - report: number - } - - export type UserCountOutputTypeSelect = { - delegation_delegation_createdByTouser?: boolean | UserCountOutputTypeCountDelegation_delegation_createdByTouserArgs - delegation_delegation_delegatedToTouser?: boolean | UserCountOutputTypeCountDelegation_delegation_delegatedToTouserArgs - report?: boolean | UserCountOutputTypeCountReportArgs - } - - // Custom InputTypes - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeArgs = { - /** - * Select specific fields to fetch from the UserCountOutputType - */ - select?: UserCountOutputTypeSelect | null - } - - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountDelegation_delegation_createdByTouserArgs = { - where?: DelegationWhereInput - } - - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountDelegation_delegation_delegatedToTouserArgs = { - where?: DelegationWhereInput - } - - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountReportArgs = { - where?: ReportWhereInput - } - - - - /** - * Models - */ - - /** - * Model Clause - */ - - - export type AggregateClause = { - _count: ClauseCountAggregateOutputType | null - _min: ClauseMinAggregateOutputType | null - _max: ClauseMaxAggregateOutputType | null - } - - export type ClauseMinAggregateOutputType = { - key: string | null - value: string | null - udap_id: string | null - text: string | null - hidden: boolean | null - } - - export type ClauseMaxAggregateOutputType = { - key: string | null - value: string | null - udap_id: string | null - text: string | null - hidden: boolean | null - } - - export type ClauseCountAggregateOutputType = { - key: number - value: number - udap_id: number - text: number - hidden: number - _all: number - } - - - export type ClauseMinAggregateInputType = { - key?: true - value?: true - udap_id?: true - text?: true - hidden?: true - } - - export type ClauseMaxAggregateInputType = { - key?: true - value?: true - udap_id?: true - text?: true - hidden?: true - } - - export type ClauseCountAggregateInputType = { - key?: true - value?: true - udap_id?: true - text?: true - hidden?: 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 = { - key: string - value: string - udap_id: string - text: string - hidden: boolean | null - _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<{ - key?: boolean - value?: boolean - udap_id?: boolean - text?: boolean - hidden?: boolean - }, ExtArgs["result"]["clause"]> - - export type ClauseSelectScalar = { - key?: boolean - value?: boolean - udap_id?: boolean - text?: boolean - hidden?: boolean - } - - - 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 `key` - * const clauseWithKeyOnly = await prisma.clause.findMany({ select: { key: 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); - - - 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 - /** - * 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 - /** - * 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 - /** - * 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 - /** - * 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 - /** - * 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 - /** - * 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 - /** - * 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 - /** - * 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 - /** - * Filter which Clause to delete. - */ - where: ClauseWhereUniqueInput - } - - - /** - * Clause deleteMany - */ - export type ClauseDeleteManyArgs = { - /** - * Filter which Clauses to delete - */ - where?: ClauseWhereInput - } - - - /** - * Clause without action - */ - export type ClauseArgs = { - /** - * Select specific fields to fetch from the Clause - */ - select?: ClauseSelect | null - } - - - - /** - * Model Clause_v2 - */ - - - export type AggregateClause_v2 = { - _count: Clause_v2CountAggregateOutputType | null - _avg: Clause_v2AvgAggregateOutputType | null - _sum: Clause_v2SumAggregateOutputType | null - _min: Clause_v2MinAggregateOutputType | null - _max: Clause_v2MaxAggregateOutputType | null - } - - export type Clause_v2AvgAggregateOutputType = { - position: number | null - } - - export type Clause_v2SumAggregateOutputType = { - position: number | null - } - - export type Clause_v2MinAggregateOutputType = { - id: string | null - key: string | null - value: string | null - position: number | null - udap_id: string | null - text: string | null - } - - export type Clause_v2MaxAggregateOutputType = { - id: string | null - key: string | null - value: string | null - position: number | null - udap_id: string | null - text: string | null - } - - export type Clause_v2CountAggregateOutputType = { - id: number - key: number - value: number - position: number - udap_id: number - text: number - _all: number - } - - - export type Clause_v2AvgAggregateInputType = { - position?: true - } - - export type Clause_v2SumAggregateInputType = { - position?: true - } - - export type Clause_v2MinAggregateInputType = { - id?: true - key?: true - value?: true - position?: true - udap_id?: true - text?: true - } - - export type Clause_v2MaxAggregateInputType = { - id?: true - key?: true - value?: true - position?: true - udap_id?: true - text?: true - } - - export type Clause_v2CountAggregateInputType = { - id?: true - key?: true - value?: true - position?: true - udap_id?: true - text?: true - _all?: true - } - - export type Clause_v2AggregateArgs = { - /** - * Filter which Clause_v2 to aggregate. - */ - where?: Clause_v2WhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Clause_v2s 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?: Clause_v2WhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Clause_v2s 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` Clause_v2s. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Clause_v2s - **/ - _count?: true | Clause_v2CountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: Clause_v2AvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: Clause_v2SumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: Clause_v2MinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: Clause_v2MaxAggregateInputType - } - - export type GetClause_v2AggregateType = { - [P in keyof T & keyof AggregateClause_v2]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type Clause_v2GroupByArgs = { - where?: Clause_v2WhereInput - orderBy?: Enumerable - by: Clause_v2ScalarFieldEnum[] - having?: Clause_v2ScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: Clause_v2CountAggregateInputType | true - _avg?: Clause_v2AvgAggregateInputType - _sum?: Clause_v2SumAggregateInputType - _min?: Clause_v2MinAggregateInputType - _max?: Clause_v2MaxAggregateInputType - } - - - export type Clause_v2GroupByOutputType = { - id: string - key: string - value: string - position: number | null - udap_id: string | null - text: string - _count: Clause_v2CountAggregateOutputType | null - _avg: Clause_v2AvgAggregateOutputType | null - _sum: Clause_v2SumAggregateOutputType | null - _min: Clause_v2MinAggregateOutputType | null - _max: Clause_v2MaxAggregateOutputType | null - } - - type GetClause_v2GroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof Clause_v2GroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type Clause_v2Select = $Extensions.GetSelect<{ - id?: boolean - key?: boolean - value?: boolean - position?: boolean - udap_id?: boolean - text?: boolean - }, ExtArgs["result"]["clause_v2"]> - - export type Clause_v2SelectScalar = { - id?: boolean - key?: boolean - value?: boolean - position?: boolean - udap_id?: boolean - text?: boolean - } - - - type Clause_v2GetPayload = $Types.GetResult - - type Clause_v2CountArgs = - Omit & { - select?: Clause_v2CountAggregateInputType | true - } - - export interface Clause_v2Delegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Clause_v2'], meta: { name: 'Clause_v2' } } - /** - * Find zero or one Clause_v2 that matches the filter. - * @param {Clause_v2FindUniqueArgs} args - Arguments to find a Clause_v2 - * @example - * // Get one Clause_v2 - * const clause_v2 = await prisma.clause_v2.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__Clause_v2Client<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__Clause_v2Client<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one Clause_v2 that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {Clause_v2FindUniqueOrThrowArgs} args - Arguments to find a Clause_v2 - * @example - * // Get one Clause_v2 - * const clause_v2 = await prisma.clause_v2.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__Clause_v2Client<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first Clause_v2 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 {Clause_v2FindFirstArgs} args - Arguments to find a Clause_v2 - * @example - * // Get one Clause_v2 - * const clause_v2 = await prisma.clause_v2.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__Clause_v2Client<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__Clause_v2Client<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first Clause_v2 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 {Clause_v2FindFirstOrThrowArgs} args - Arguments to find a Clause_v2 - * @example - * // Get one Clause_v2 - * const clause_v2 = await prisma.clause_v2.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__Clause_v2Client<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Clause_v2s 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 {Clause_v2FindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Clause_v2s - * const clause_v2s = await prisma.clause_v2.findMany() - * - * // Get first 10 Clause_v2s - * const clause_v2s = await prisma.clause_v2.findMany({ take: 10 }) - * - * // Only select the `id` - * const clause_v2WithIdOnly = await prisma.clause_v2.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a Clause_v2. - * @param {Clause_v2CreateArgs} args - Arguments to create a Clause_v2. - * @example - * // Create one Clause_v2 - * const Clause_v2 = await prisma.clause_v2.create({ - * data: { - * // ... data to create a Clause_v2 - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__Clause_v2Client<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Clause_v2s. - * @param {Clause_v2CreateManyArgs} args - Arguments to create many Clause_v2s. - * @example - * // Create many Clause_v2s - * const clause_v2 = await prisma.clause_v2.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a Clause_v2. - * @param {Clause_v2DeleteArgs} args - Arguments to delete one Clause_v2. - * @example - * // Delete one Clause_v2 - * const Clause_v2 = await prisma.clause_v2.delete({ - * where: { - * // ... filter to delete one Clause_v2 - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__Clause_v2Client<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one Clause_v2. - * @param {Clause_v2UpdateArgs} args - Arguments to update one Clause_v2. - * @example - * // Update one Clause_v2 - * const clause_v2 = await prisma.clause_v2.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__Clause_v2Client<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Clause_v2s. - * @param {Clause_v2DeleteManyArgs} args - Arguments to filter Clause_v2s to delete. - * @example - * // Delete a few Clause_v2s - * const { count } = await prisma.clause_v2.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Clause_v2s. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Clause_v2UpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Clause_v2s - * const clause_v2 = await prisma.clause_v2.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Clause_v2. - * @param {Clause_v2UpsertArgs} args - Arguments to update or create a Clause_v2. - * @example - * // Update or create a Clause_v2 - * const clause_v2 = await prisma.clause_v2.upsert({ - * create: { - * // ... data to create a Clause_v2 - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Clause_v2 we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__Clause_v2Client<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Clause_v2s. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Clause_v2CountArgs} args - Arguments to filter Clause_v2s to count. - * @example - * // Count the number of Clause_v2s - * const count = await prisma.clause_v2.count({ - * where: { - * // ... the filter for the Clause_v2s 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_v2. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Clause_v2AggregateArgs} 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_v2. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Clause_v2GroupByArgs} 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 Clause_v2GroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: Clause_v2GroupByArgs['orderBy'] } - : { orderBy?: Clause_v2GroupByArgs['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 ? GetClause_v2GroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Clause_v2. - * 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__Clause_v2Client 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); - - - 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_v2 base type for findUnique actions - */ - export type Clause_v2FindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Clause_v2 - */ - select?: Clause_v2Select | null - /** - * Filter, which Clause_v2 to fetch. - */ - where: Clause_v2WhereUniqueInput - } - - /** - * Clause_v2 findUnique - */ - export interface Clause_v2FindUniqueArgs extends Clause_v2FindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Clause_v2 findUniqueOrThrow - */ - export type Clause_v2FindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Clause_v2 - */ - select?: Clause_v2Select | null - /** - * Filter, which Clause_v2 to fetch. - */ - where: Clause_v2WhereUniqueInput - } - - - /** - * Clause_v2 base type for findFirst actions - */ - export type Clause_v2FindFirstArgsBase = { - /** - * Select specific fields to fetch from the Clause_v2 - */ - select?: Clause_v2Select | null - /** - * Filter, which Clause_v2 to fetch. - */ - where?: Clause_v2WhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Clause_v2s 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 Clause_v2s. - */ - cursor?: Clause_v2WhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Clause_v2s 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` Clause_v2s. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Clause_v2s. - */ - distinct?: Enumerable - } - - /** - * Clause_v2 findFirst - */ - export interface Clause_v2FindFirstArgs extends Clause_v2FindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Clause_v2 findFirstOrThrow - */ - export type Clause_v2FindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Clause_v2 - */ - select?: Clause_v2Select | null - /** - * Filter, which Clause_v2 to fetch. - */ - where?: Clause_v2WhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Clause_v2s 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 Clause_v2s. - */ - cursor?: Clause_v2WhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Clause_v2s 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` Clause_v2s. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Clause_v2s. - */ - distinct?: Enumerable - } - - - /** - * Clause_v2 findMany - */ - export type Clause_v2FindManyArgs = { - /** - * Select specific fields to fetch from the Clause_v2 - */ - select?: Clause_v2Select | null - /** - * Filter, which Clause_v2s to fetch. - */ - where?: Clause_v2WhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Clause_v2s 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 Clause_v2s. - */ - cursor?: Clause_v2WhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Clause_v2s 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` Clause_v2s. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * Clause_v2 create - */ - export type Clause_v2CreateArgs = { - /** - * Select specific fields to fetch from the Clause_v2 - */ - select?: Clause_v2Select | null - /** - * The data needed to create a Clause_v2. - */ - data: XOR - } - - - /** - * Clause_v2 createMany - */ - export type Clause_v2CreateManyArgs = { - /** - * The data used to create many Clause_v2s. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * Clause_v2 update - */ - export type Clause_v2UpdateArgs = { - /** - * Select specific fields to fetch from the Clause_v2 - */ - select?: Clause_v2Select | null - /** - * The data needed to update a Clause_v2. - */ - data: XOR - /** - * Choose, which Clause_v2 to update. - */ - where: Clause_v2WhereUniqueInput - } - - - /** - * Clause_v2 updateMany - */ - export type Clause_v2UpdateManyArgs = { - /** - * The data used to update Clause_v2s. - */ - data: XOR - /** - * Filter which Clause_v2s to update - */ - where?: Clause_v2WhereInput - } - - - /** - * Clause_v2 upsert - */ - export type Clause_v2UpsertArgs = { - /** - * Select specific fields to fetch from the Clause_v2 - */ - select?: Clause_v2Select | null - /** - * The filter to search for the Clause_v2 to update in case it exists. - */ - where: Clause_v2WhereUniqueInput - /** - * In case the Clause_v2 found by the `where` argument doesn't exist, create a new Clause_v2 with this data. - */ - create: XOR - /** - * In case the Clause_v2 was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * Clause_v2 delete - */ - export type Clause_v2DeleteArgs = { - /** - * Select specific fields to fetch from the Clause_v2 - */ - select?: Clause_v2Select | null - /** - * Filter which Clause_v2 to delete. - */ - where: Clause_v2WhereUniqueInput - } - - - /** - * Clause_v2 deleteMany - */ - export type Clause_v2DeleteManyArgs = { - /** - * Filter which Clause_v2s to delete - */ - where?: Clause_v2WhereInput - } - - - /** - * Clause_v2 without action - */ - export type Clause_v2Args = { - /** - * Select specific fields to fetch from the Clause_v2 - */ - select?: Clause_v2Select | null - } - - - - /** - * Model Delegation - */ - - - export type AggregateDelegation = { - _count: DelegationCountAggregateOutputType | null - _min: DelegationMinAggregateOutputType | null - _max: DelegationMaxAggregateOutputType | null - } - - export type DelegationMinAggregateOutputType = { - createdBy: string | null - delegatedTo: string | null - } - - export type DelegationMaxAggregateOutputType = { - createdBy: string | null - delegatedTo: string | null - } - - export type DelegationCountAggregateOutputType = { - createdBy: number - delegatedTo: number - _all: number - } - - - export type DelegationMinAggregateInputType = { - createdBy?: true - delegatedTo?: true - } - - export type DelegationMaxAggregateInputType = { - createdBy?: true - delegatedTo?: true - } - - export type DelegationCountAggregateInputType = { - createdBy?: true - delegatedTo?: true - _all?: true - } - - export type DelegationAggregateArgs = { - /** - * Filter which Delegation to aggregate. - */ - where?: DelegationWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Delegations 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?: DelegationWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Delegations 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` Delegations. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Delegations - **/ - _count?: true | DelegationCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: DelegationMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: DelegationMaxAggregateInputType - } - - export type GetDelegationAggregateType = { - [P in keyof T & keyof AggregateDelegation]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type DelegationGroupByArgs = { - where?: DelegationWhereInput - orderBy?: Enumerable - by: DelegationScalarFieldEnum[] - having?: DelegationScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: DelegationCountAggregateInputType | true - _min?: DelegationMinAggregateInputType - _max?: DelegationMaxAggregateInputType - } - - - export type DelegationGroupByOutputType = { - createdBy: string - delegatedTo: string - _count: DelegationCountAggregateOutputType | null - _min: DelegationMinAggregateOutputType | null - _max: DelegationMaxAggregateOutputType | null - } - - type GetDelegationGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof DelegationGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type DelegationSelect = $Extensions.GetSelect<{ - createdBy?: boolean - delegatedTo?: boolean - user_delegation_createdByTouser?: boolean | UserArgs - user_delegation_delegatedToTouser?: boolean | UserArgs - }, ExtArgs["result"]["delegation"]> - - export type DelegationSelectScalar = { - createdBy?: boolean - delegatedTo?: boolean - } - - export type DelegationInclude = { - user_delegation_createdByTouser?: boolean | UserArgs - user_delegation_delegatedToTouser?: boolean | UserArgs - } - - - type DelegationGetPayload = $Types.GetResult - - type DelegationCountArgs = - Omit & { - select?: DelegationCountAggregateInputType | true - } - - export interface DelegationDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Delegation'], meta: { name: 'Delegation' } } - /** - * Find zero or one Delegation that matches the filter. - * @param {DelegationFindUniqueArgs} args - Arguments to find a Delegation - * @example - * // Get one Delegation - * const delegation = await prisma.delegation.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__DelegationClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__DelegationClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one Delegation that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {DelegationFindUniqueOrThrowArgs} args - Arguments to find a Delegation - * @example - * // Get one Delegation - * const delegation = await prisma.delegation.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__DelegationClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first Delegation 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 {DelegationFindFirstArgs} args - Arguments to find a Delegation - * @example - * // Get one Delegation - * const delegation = await prisma.delegation.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__DelegationClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__DelegationClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first Delegation 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 {DelegationFindFirstOrThrowArgs} args - Arguments to find a Delegation - * @example - * // Get one Delegation - * const delegation = await prisma.delegation.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__DelegationClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Delegations 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 {DelegationFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Delegations - * const delegations = await prisma.delegation.findMany() - * - * // Get first 10 Delegations - * const delegations = await prisma.delegation.findMany({ take: 10 }) - * - * // Only select the `createdBy` - * const delegationWithCreatedByOnly = await prisma.delegation.findMany({ select: { createdBy: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a Delegation. - * @param {DelegationCreateArgs} args - Arguments to create a Delegation. - * @example - * // Create one Delegation - * const Delegation = await prisma.delegation.create({ - * data: { - * // ... data to create a Delegation - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__DelegationClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Delegations. - * @param {DelegationCreateManyArgs} args - Arguments to create many Delegations. - * @example - * // Create many Delegations - * const delegation = await prisma.delegation.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a Delegation. - * @param {DelegationDeleteArgs} args - Arguments to delete one Delegation. - * @example - * // Delete one Delegation - * const Delegation = await prisma.delegation.delete({ - * where: { - * // ... filter to delete one Delegation - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__DelegationClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one Delegation. - * @param {DelegationUpdateArgs} args - Arguments to update one Delegation. - * @example - * // Update one Delegation - * const delegation = await prisma.delegation.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__DelegationClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Delegations. - * @param {DelegationDeleteManyArgs} args - Arguments to filter Delegations to delete. - * @example - * // Delete a few Delegations - * const { count } = await prisma.delegation.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Delegations. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {DelegationUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Delegations - * const delegation = await prisma.delegation.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Delegation. - * @param {DelegationUpsertArgs} args - Arguments to update or create a Delegation. - * @example - * // Update or create a Delegation - * const delegation = await prisma.delegation.upsert({ - * create: { - * // ... data to create a Delegation - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Delegation we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__DelegationClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Delegations. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {DelegationCountArgs} args - Arguments to filter Delegations to count. - * @example - * // Count the number of Delegations - * const count = await prisma.delegation.count({ - * where: { - * // ... the filter for the Delegations 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 Delegation. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {DelegationAggregateArgs} 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 Delegation. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {DelegationGroupByArgs} 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 DelegationGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: DelegationGroupByArgs['orderBy'] } - : { orderBy?: DelegationGroupByArgs['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 ? GetDelegationGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Delegation. - * 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__DelegationClient 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); - - user_delegation_createdByTouser = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; - - user_delegation_delegatedToTouser = {}>(args?: Subset>): Prisma__UserClient<$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 - - /** - * Delegation base type for findUnique actions - */ - export type DelegationFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - /** - * Filter, which Delegation to fetch. - */ - where: DelegationWhereUniqueInput - } - - /** - * Delegation findUnique - */ - export interface DelegationFindUniqueArgs extends DelegationFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Delegation findUniqueOrThrow - */ - export type DelegationFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - /** - * Filter, which Delegation to fetch. - */ - where: DelegationWhereUniqueInput - } - - - /** - * Delegation base type for findFirst actions - */ - export type DelegationFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - /** - * Filter, which Delegation to fetch. - */ - where?: DelegationWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Delegations 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 Delegations. - */ - cursor?: DelegationWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Delegations 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` Delegations. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Delegations. - */ - distinct?: Enumerable - } - - /** - * Delegation findFirst - */ - export interface DelegationFindFirstArgs extends DelegationFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Delegation findFirstOrThrow - */ - export type DelegationFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - /** - * Filter, which Delegation to fetch. - */ - where?: DelegationWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Delegations 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 Delegations. - */ - cursor?: DelegationWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Delegations 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` Delegations. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Delegations. - */ - distinct?: Enumerable - } - - - /** - * Delegation findMany - */ - export type DelegationFindManyArgs = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - /** - * Filter, which Delegations to fetch. - */ - where?: DelegationWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Delegations 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 Delegations. - */ - cursor?: DelegationWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Delegations 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` Delegations. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * Delegation create - */ - export type DelegationCreateArgs = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - /** - * The data needed to create a Delegation. - */ - data: XOR - } - - - /** - * Delegation createMany - */ - export type DelegationCreateManyArgs = { - /** - * The data used to create many Delegations. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * Delegation update - */ - export type DelegationUpdateArgs = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - /** - * The data needed to update a Delegation. - */ - data: XOR - /** - * Choose, which Delegation to update. - */ - where: DelegationWhereUniqueInput - } - - - /** - * Delegation updateMany - */ - export type DelegationUpdateManyArgs = { - /** - * The data used to update Delegations. - */ - data: XOR - /** - * Filter which Delegations to update - */ - where?: DelegationWhereInput - } - - - /** - * Delegation upsert - */ - export type DelegationUpsertArgs = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - /** - * The filter to search for the Delegation to update in case it exists. - */ - where: DelegationWhereUniqueInput - /** - * In case the Delegation found by the `where` argument doesn't exist, create a new Delegation with this data. - */ - create: XOR - /** - * In case the Delegation was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * Delegation delete - */ - export type DelegationDeleteArgs = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - /** - * Filter which Delegation to delete. - */ - where: DelegationWhereUniqueInput - } - - - /** - * Delegation deleteMany - */ - export type DelegationDeleteManyArgs = { - /** - * Filter which Delegations to delete - */ - where?: DelegationWhereInput - } - - - /** - * Delegation without action - */ - export type DelegationArgs = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - } - - - - /** - * Model Pdf_snapshot - */ - - - export type AggregatePdf_snapshot = { - _count: Pdf_snapshotCountAggregateOutputType | null - _min: Pdf_snapshotMinAggregateOutputType | null - _max: Pdf_snapshotMaxAggregateOutputType | null - } - - export type Pdf_snapshotMinAggregateOutputType = { - id: string | null - report_id: string | null - html: string | null - report: string | null - user_id: string | null - } - - export type Pdf_snapshotMaxAggregateOutputType = { - id: string | null - report_id: string | null - html: string | null - report: string | null - user_id: string | null - } - - export type Pdf_snapshotCountAggregateOutputType = { - id: number - report_id: number - html: number - report: number - user_id: number - _all: number - } - - - export type Pdf_snapshotMinAggregateInputType = { - id?: true - report_id?: true - html?: true - report?: true - user_id?: true - } - - export type Pdf_snapshotMaxAggregateInputType = { - id?: true - report_id?: true - html?: true - report?: true - user_id?: true - } - - export type Pdf_snapshotCountAggregateInputType = { - id?: true - report_id?: true - html?: true - report?: true - user_id?: true - _all?: true - } - - export type Pdf_snapshotAggregateArgs = { - /** - * Filter which Pdf_snapshot to aggregate. - */ - where?: Pdf_snapshotWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Pdf_snapshots 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?: Pdf_snapshotWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Pdf_snapshots 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` Pdf_snapshots. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Pdf_snapshots - **/ - _count?: true | Pdf_snapshotCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: Pdf_snapshotMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: Pdf_snapshotMaxAggregateInputType - } - - export type GetPdf_snapshotAggregateType = { - [P in keyof T & keyof AggregatePdf_snapshot]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type Pdf_snapshotGroupByArgs = { - where?: Pdf_snapshotWhereInput - orderBy?: Enumerable - by: Pdf_snapshotScalarFieldEnum[] - having?: Pdf_snapshotScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: Pdf_snapshotCountAggregateInputType | true - _min?: Pdf_snapshotMinAggregateInputType - _max?: Pdf_snapshotMaxAggregateInputType - } - - - export type Pdf_snapshotGroupByOutputType = { - id: string - report_id: string | null - html: string | null - report: string | null - user_id: string | null - _count: Pdf_snapshotCountAggregateOutputType | null - _min: Pdf_snapshotMinAggregateOutputType | null - _max: Pdf_snapshotMaxAggregateOutputType | null - } - - type GetPdf_snapshotGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof Pdf_snapshotGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type Pdf_snapshotSelect = $Extensions.GetSelect<{ - id?: boolean - report_id?: boolean - html?: boolean - report?: boolean - user_id?: boolean - }, ExtArgs["result"]["pdf_snapshot"]> - - export type Pdf_snapshotSelectScalar = { - id?: boolean - report_id?: boolean - html?: boolean - report?: boolean - user_id?: boolean - } - - - type Pdf_snapshotGetPayload = $Types.GetResult - - type Pdf_snapshotCountArgs = - Omit & { - select?: Pdf_snapshotCountAggregateInputType | true - } - - export interface Pdf_snapshotDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Pdf_snapshot'], meta: { name: 'Pdf_snapshot' } } - /** - * Find zero or one Pdf_snapshot that matches the filter. - * @param {Pdf_snapshotFindUniqueArgs} args - Arguments to find a Pdf_snapshot - * @example - * // Get one Pdf_snapshot - * const pdf_snapshot = await prisma.pdf_snapshot.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__Pdf_snapshotClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__Pdf_snapshotClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one Pdf_snapshot that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {Pdf_snapshotFindUniqueOrThrowArgs} args - Arguments to find a Pdf_snapshot - * @example - * // Get one Pdf_snapshot - * const pdf_snapshot = await prisma.pdf_snapshot.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__Pdf_snapshotClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first Pdf_snapshot 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 {Pdf_snapshotFindFirstArgs} args - Arguments to find a Pdf_snapshot - * @example - * // Get one Pdf_snapshot - * const pdf_snapshot = await prisma.pdf_snapshot.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__Pdf_snapshotClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__Pdf_snapshotClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first Pdf_snapshot 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 {Pdf_snapshotFindFirstOrThrowArgs} args - Arguments to find a Pdf_snapshot - * @example - * // Get one Pdf_snapshot - * const pdf_snapshot = await prisma.pdf_snapshot.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__Pdf_snapshotClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Pdf_snapshots 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 {Pdf_snapshotFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Pdf_snapshots - * const pdf_snapshots = await prisma.pdf_snapshot.findMany() - * - * // Get first 10 Pdf_snapshots - * const pdf_snapshots = await prisma.pdf_snapshot.findMany({ take: 10 }) - * - * // Only select the `id` - * const pdf_snapshotWithIdOnly = await prisma.pdf_snapshot.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a Pdf_snapshot. - * @param {Pdf_snapshotCreateArgs} args - Arguments to create a Pdf_snapshot. - * @example - * // Create one Pdf_snapshot - * const Pdf_snapshot = await prisma.pdf_snapshot.create({ - * data: { - * // ... data to create a Pdf_snapshot - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__Pdf_snapshotClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Pdf_snapshots. - * @param {Pdf_snapshotCreateManyArgs} args - Arguments to create many Pdf_snapshots. - * @example - * // Create many Pdf_snapshots - * const pdf_snapshot = await prisma.pdf_snapshot.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a Pdf_snapshot. - * @param {Pdf_snapshotDeleteArgs} args - Arguments to delete one Pdf_snapshot. - * @example - * // Delete one Pdf_snapshot - * const Pdf_snapshot = await prisma.pdf_snapshot.delete({ - * where: { - * // ... filter to delete one Pdf_snapshot - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__Pdf_snapshotClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one Pdf_snapshot. - * @param {Pdf_snapshotUpdateArgs} args - Arguments to update one Pdf_snapshot. - * @example - * // Update one Pdf_snapshot - * const pdf_snapshot = await prisma.pdf_snapshot.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__Pdf_snapshotClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Pdf_snapshots. - * @param {Pdf_snapshotDeleteManyArgs} args - Arguments to filter Pdf_snapshots to delete. - * @example - * // Delete a few Pdf_snapshots - * const { count } = await prisma.pdf_snapshot.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Pdf_snapshots. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Pdf_snapshotUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Pdf_snapshots - * const pdf_snapshot = await prisma.pdf_snapshot.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Pdf_snapshot. - * @param {Pdf_snapshotUpsertArgs} args - Arguments to update or create a Pdf_snapshot. - * @example - * // Update or create a Pdf_snapshot - * const pdf_snapshot = await prisma.pdf_snapshot.upsert({ - * create: { - * // ... data to create a Pdf_snapshot - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Pdf_snapshot we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__Pdf_snapshotClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Pdf_snapshots. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Pdf_snapshotCountArgs} args - Arguments to filter Pdf_snapshots to count. - * @example - * // Count the number of Pdf_snapshots - * const count = await prisma.pdf_snapshot.count({ - * where: { - * // ... the filter for the Pdf_snapshots 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 Pdf_snapshot. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Pdf_snapshotAggregateArgs} 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 Pdf_snapshot. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Pdf_snapshotGroupByArgs} 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 Pdf_snapshotGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: Pdf_snapshotGroupByArgs['orderBy'] } - : { orderBy?: Pdf_snapshotGroupByArgs['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 ? GetPdf_snapshotGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Pdf_snapshot. - * 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__Pdf_snapshotClient 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); - - - 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 - - /** - * Pdf_snapshot base type for findUnique actions - */ - export type Pdf_snapshotFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Pdf_snapshot - */ - select?: Pdf_snapshotSelect | null - /** - * Filter, which Pdf_snapshot to fetch. - */ - where: Pdf_snapshotWhereUniqueInput - } - - /** - * Pdf_snapshot findUnique - */ - export interface Pdf_snapshotFindUniqueArgs extends Pdf_snapshotFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Pdf_snapshot findUniqueOrThrow - */ - export type Pdf_snapshotFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Pdf_snapshot - */ - select?: Pdf_snapshotSelect | null - /** - * Filter, which Pdf_snapshot to fetch. - */ - where: Pdf_snapshotWhereUniqueInput - } - - - /** - * Pdf_snapshot base type for findFirst actions - */ - export type Pdf_snapshotFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Pdf_snapshot - */ - select?: Pdf_snapshotSelect | null - /** - * Filter, which Pdf_snapshot to fetch. - */ - where?: Pdf_snapshotWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Pdf_snapshots 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 Pdf_snapshots. - */ - cursor?: Pdf_snapshotWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Pdf_snapshots 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` Pdf_snapshots. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Pdf_snapshots. - */ - distinct?: Enumerable - } - - /** - * Pdf_snapshot findFirst - */ - export interface Pdf_snapshotFindFirstArgs extends Pdf_snapshotFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Pdf_snapshot findFirstOrThrow - */ - export type Pdf_snapshotFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Pdf_snapshot - */ - select?: Pdf_snapshotSelect | null - /** - * Filter, which Pdf_snapshot to fetch. - */ - where?: Pdf_snapshotWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Pdf_snapshots 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 Pdf_snapshots. - */ - cursor?: Pdf_snapshotWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Pdf_snapshots 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` Pdf_snapshots. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Pdf_snapshots. - */ - distinct?: Enumerable - } - - - /** - * Pdf_snapshot findMany - */ - export type Pdf_snapshotFindManyArgs = { - /** - * Select specific fields to fetch from the Pdf_snapshot - */ - select?: Pdf_snapshotSelect | null - /** - * Filter, which Pdf_snapshots to fetch. - */ - where?: Pdf_snapshotWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Pdf_snapshots 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 Pdf_snapshots. - */ - cursor?: Pdf_snapshotWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Pdf_snapshots 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` Pdf_snapshots. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * Pdf_snapshot create - */ - export type Pdf_snapshotCreateArgs = { - /** - * Select specific fields to fetch from the Pdf_snapshot - */ - select?: Pdf_snapshotSelect | null - /** - * The data needed to create a Pdf_snapshot. - */ - data: XOR - } - - - /** - * Pdf_snapshot createMany - */ - export type Pdf_snapshotCreateManyArgs = { - /** - * The data used to create many Pdf_snapshots. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * Pdf_snapshot update - */ - export type Pdf_snapshotUpdateArgs = { - /** - * Select specific fields to fetch from the Pdf_snapshot - */ - select?: Pdf_snapshotSelect | null - /** - * The data needed to update a Pdf_snapshot. - */ - data: XOR - /** - * Choose, which Pdf_snapshot to update. - */ - where: Pdf_snapshotWhereUniqueInput - } - - - /** - * Pdf_snapshot updateMany - */ - export type Pdf_snapshotUpdateManyArgs = { - /** - * The data used to update Pdf_snapshots. - */ - data: XOR - /** - * Filter which Pdf_snapshots to update - */ - where?: Pdf_snapshotWhereInput - } - - - /** - * Pdf_snapshot upsert - */ - export type Pdf_snapshotUpsertArgs = { - /** - * Select specific fields to fetch from the Pdf_snapshot - */ - select?: Pdf_snapshotSelect | null - /** - * The filter to search for the Pdf_snapshot to update in case it exists. - */ - where: Pdf_snapshotWhereUniqueInput - /** - * In case the Pdf_snapshot found by the `where` argument doesn't exist, create a new Pdf_snapshot with this data. - */ - create: XOR - /** - * In case the Pdf_snapshot was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * Pdf_snapshot delete - */ - export type Pdf_snapshotDeleteArgs = { - /** - * Select specific fields to fetch from the Pdf_snapshot - */ - select?: Pdf_snapshotSelect | null - /** - * Filter which Pdf_snapshot to delete. - */ - where: Pdf_snapshotWhereUniqueInput - } - - - /** - * Pdf_snapshot deleteMany - */ - export type Pdf_snapshotDeleteManyArgs = { - /** - * Filter which Pdf_snapshots to delete - */ - where?: Pdf_snapshotWhereInput - } - - - /** - * Pdf_snapshot without action - */ - export type Pdf_snapshotArgs = { - /** - * Select specific fields to fetch from the Pdf_snapshot - */ - select?: Pdf_snapshotSelect | null - } - - - - /** - * Model Picture_lines - */ - - - export type AggregatePicture_lines = { - _count: Picture_linesCountAggregateOutputType | null - _min: Picture_linesMinAggregateOutputType | null - _max: Picture_linesMaxAggregateOutputType | null - } - - export type Picture_linesMinAggregateOutputType = { - id: string | null - pictureId: string | null - lines: string | null - createdAt: Date | null - } - - export type Picture_linesMaxAggregateOutputType = { - id: string | null - pictureId: string | null - lines: string | null - createdAt: Date | null - } - - export type Picture_linesCountAggregateOutputType = { - id: number - pictureId: number - lines: number - createdAt: number - _all: number - } - - - export type Picture_linesMinAggregateInputType = { - id?: true - pictureId?: true - lines?: true - createdAt?: true - } - - export type Picture_linesMaxAggregateInputType = { - id?: true - pictureId?: true - lines?: true - createdAt?: true - } - - export type Picture_linesCountAggregateInputType = { - id?: true - pictureId?: true - lines?: true - createdAt?: true - _all?: true - } - - export type Picture_linesAggregateArgs = { - /** - * Filter which Picture_lines to aggregate. - */ - where?: Picture_linesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Picture_lines 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?: Picture_linesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Picture_lines 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` Picture_lines. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Picture_lines - **/ - _count?: true | Picture_linesCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: Picture_linesMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: Picture_linesMaxAggregateInputType - } - - export type GetPicture_linesAggregateType = { - [P in keyof T & keyof AggregatePicture_lines]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type Picture_linesGroupByArgs = { - where?: Picture_linesWhereInput - orderBy?: Enumerable - by: Picture_linesScalarFieldEnum[] - having?: Picture_linesScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: Picture_linesCountAggregateInputType | true - _min?: Picture_linesMinAggregateInputType - _max?: Picture_linesMaxAggregateInputType - } - - - export type Picture_linesGroupByOutputType = { - id: string - pictureId: string | null - lines: string - createdAt: Date | null - _count: Picture_linesCountAggregateOutputType | null - _min: Picture_linesMinAggregateOutputType | null - _max: Picture_linesMaxAggregateOutputType | null - } - - type GetPicture_linesGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof Picture_linesGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type Picture_linesSelect = $Extensions.GetSelect<{ - id?: boolean - pictureId?: boolean - lines?: boolean - createdAt?: boolean - }, ExtArgs["result"]["picture_lines"]> - - export type Picture_linesSelectScalar = { - id?: boolean - pictureId?: boolean - lines?: boolean - createdAt?: boolean - } - - - type Picture_linesGetPayload = $Types.GetResult - - type Picture_linesCountArgs = - Omit & { - select?: Picture_linesCountAggregateInputType | true - } - - export interface Picture_linesDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Picture_lines'], meta: { name: 'Picture_lines' } } - /** - * Find zero or one Picture_lines that matches the filter. - * @param {Picture_linesFindUniqueArgs} args - Arguments to find a Picture_lines - * @example - * // Get one Picture_lines - * const picture_lines = await prisma.picture_lines.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__Picture_linesClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__Picture_linesClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one Picture_lines that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {Picture_linesFindUniqueOrThrowArgs} args - Arguments to find a Picture_lines - * @example - * // Get one Picture_lines - * const picture_lines = await prisma.picture_lines.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__Picture_linesClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first Picture_lines 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 {Picture_linesFindFirstArgs} args - Arguments to find a Picture_lines - * @example - * // Get one Picture_lines - * const picture_lines = await prisma.picture_lines.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__Picture_linesClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__Picture_linesClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first Picture_lines 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 {Picture_linesFindFirstOrThrowArgs} args - Arguments to find a Picture_lines - * @example - * // Get one Picture_lines - * const picture_lines = await prisma.picture_lines.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__Picture_linesClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Picture_lines 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 {Picture_linesFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Picture_lines - * const picture_lines = await prisma.picture_lines.findMany() - * - * // Get first 10 Picture_lines - * const picture_lines = await prisma.picture_lines.findMany({ take: 10 }) - * - * // Only select the `id` - * const picture_linesWithIdOnly = await prisma.picture_lines.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a Picture_lines. - * @param {Picture_linesCreateArgs} args - Arguments to create a Picture_lines. - * @example - * // Create one Picture_lines - * const Picture_lines = await prisma.picture_lines.create({ - * data: { - * // ... data to create a Picture_lines - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__Picture_linesClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Picture_lines. - * @param {Picture_linesCreateManyArgs} args - Arguments to create many Picture_lines. - * @example - * // Create many Picture_lines - * const picture_lines = await prisma.picture_lines.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a Picture_lines. - * @param {Picture_linesDeleteArgs} args - Arguments to delete one Picture_lines. - * @example - * // Delete one Picture_lines - * const Picture_lines = await prisma.picture_lines.delete({ - * where: { - * // ... filter to delete one Picture_lines - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__Picture_linesClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one Picture_lines. - * @param {Picture_linesUpdateArgs} args - Arguments to update one Picture_lines. - * @example - * // Update one Picture_lines - * const picture_lines = await prisma.picture_lines.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__Picture_linesClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Picture_lines. - * @param {Picture_linesDeleteManyArgs} args - Arguments to filter Picture_lines to delete. - * @example - * // Delete a few Picture_lines - * const { count } = await prisma.picture_lines.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Picture_lines. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Picture_linesUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Picture_lines - * const picture_lines = await prisma.picture_lines.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Picture_lines. - * @param {Picture_linesUpsertArgs} args - Arguments to update or create a Picture_lines. - * @example - * // Update or create a Picture_lines - * const picture_lines = await prisma.picture_lines.upsert({ - * create: { - * // ... data to create a Picture_lines - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Picture_lines we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__Picture_linesClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Picture_lines. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Picture_linesCountArgs} args - Arguments to filter Picture_lines to count. - * @example - * // Count the number of Picture_lines - * const count = await prisma.picture_lines.count({ - * where: { - * // ... the filter for the Picture_lines 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 Picture_lines. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Picture_linesAggregateArgs} 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 Picture_lines. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Picture_linesGroupByArgs} 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 Picture_linesGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: Picture_linesGroupByArgs['orderBy'] } - : { orderBy?: Picture_linesGroupByArgs['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 ? GetPicture_linesGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Picture_lines. - * 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__Picture_linesClient 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); - - - 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 - - /** - * Picture_lines base type for findUnique actions - */ - export type Picture_linesFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Picture_lines - */ - select?: Picture_linesSelect | null - /** - * Filter, which Picture_lines to fetch. - */ - where: Picture_linesWhereUniqueInput - } - - /** - * Picture_lines findUnique - */ - export interface Picture_linesFindUniqueArgs extends Picture_linesFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Picture_lines findUniqueOrThrow - */ - export type Picture_linesFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Picture_lines - */ - select?: Picture_linesSelect | null - /** - * Filter, which Picture_lines to fetch. - */ - where: Picture_linesWhereUniqueInput - } - - - /** - * Picture_lines base type for findFirst actions - */ - export type Picture_linesFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Picture_lines - */ - select?: Picture_linesSelect | null - /** - * Filter, which Picture_lines to fetch. - */ - where?: Picture_linesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Picture_lines 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 Picture_lines. - */ - cursor?: Picture_linesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Picture_lines 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` Picture_lines. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Picture_lines. - */ - distinct?: Enumerable - } - - /** - * Picture_lines findFirst - */ - export interface Picture_linesFindFirstArgs extends Picture_linesFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Picture_lines findFirstOrThrow - */ - export type Picture_linesFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Picture_lines - */ - select?: Picture_linesSelect | null - /** - * Filter, which Picture_lines to fetch. - */ - where?: Picture_linesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Picture_lines 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 Picture_lines. - */ - cursor?: Picture_linesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Picture_lines 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` Picture_lines. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Picture_lines. - */ - distinct?: Enumerable - } - - - /** - * Picture_lines findMany - */ - export type Picture_linesFindManyArgs = { - /** - * Select specific fields to fetch from the Picture_lines - */ - select?: Picture_linesSelect | null - /** - * Filter, which Picture_lines to fetch. - */ - where?: Picture_linesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Picture_lines 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 Picture_lines. - */ - cursor?: Picture_linesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Picture_lines 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` Picture_lines. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * Picture_lines create - */ - export type Picture_linesCreateArgs = { - /** - * Select specific fields to fetch from the Picture_lines - */ - select?: Picture_linesSelect | null - /** - * The data needed to create a Picture_lines. - */ - data: XOR - } - - - /** - * Picture_lines createMany - */ - export type Picture_linesCreateManyArgs = { - /** - * The data used to create many Picture_lines. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * Picture_lines update - */ - export type Picture_linesUpdateArgs = { - /** - * Select specific fields to fetch from the Picture_lines - */ - select?: Picture_linesSelect | null - /** - * The data needed to update a Picture_lines. - */ - data: XOR - /** - * Choose, which Picture_lines to update. - */ - where: Picture_linesWhereUniqueInput - } - - - /** - * Picture_lines updateMany - */ - export type Picture_linesUpdateManyArgs = { - /** - * The data used to update Picture_lines. - */ - data: XOR - /** - * Filter which Picture_lines to update - */ - where?: Picture_linesWhereInput - } - - - /** - * Picture_lines upsert - */ - export type Picture_linesUpsertArgs = { - /** - * Select specific fields to fetch from the Picture_lines - */ - select?: Picture_linesSelect | null - /** - * The filter to search for the Picture_lines to update in case it exists. - */ - where: Picture_linesWhereUniqueInput - /** - * In case the Picture_lines found by the `where` argument doesn't exist, create a new Picture_lines with this data. - */ - create: XOR - /** - * In case the Picture_lines was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * Picture_lines delete - */ - export type Picture_linesDeleteArgs = { - /** - * Select specific fields to fetch from the Picture_lines - */ - select?: Picture_linesSelect | null - /** - * Filter which Picture_lines to delete. - */ - where: Picture_linesWhereUniqueInput - } - - - /** - * Picture_lines deleteMany - */ - export type Picture_linesDeleteManyArgs = { - /** - * Filter which Picture_lines to delete - */ - where?: Picture_linesWhereInput - } - - - /** - * Picture_lines without action - */ - export type Picture_linesArgs = { - /** - * Select specific fields to fetch from the Picture_lines - */ - select?: Picture_linesSelect | null - } - - - - /** - * Model Pictures - */ - - - export type AggregatePictures = { - _count: PicturesCountAggregateOutputType | null - _min: PicturesMinAggregateOutputType | null - _max: PicturesMaxAggregateOutputType | null - } - - export type PicturesMinAggregateOutputType = { - id: string | null - reportId: string | null - url: string | null - createdAt: Date | null - finalUrl: string | null - } - - export type PicturesMaxAggregateOutputType = { - id: string | null - reportId: string | null - url: string | null - createdAt: Date | null - finalUrl: string | null - } - - export type PicturesCountAggregateOutputType = { - id: number - reportId: number - url: number - createdAt: number - finalUrl: number - _all: number - } - - - export type PicturesMinAggregateInputType = { - id?: true - reportId?: true - url?: true - createdAt?: true - finalUrl?: true - } - - export type PicturesMaxAggregateInputType = { - id?: true - reportId?: true - url?: true - createdAt?: true - finalUrl?: true - } - - export type PicturesCountAggregateInputType = { - id?: true - reportId?: true - url?: true - createdAt?: true - finalUrl?: true - _all?: true - } - - export type PicturesAggregateArgs = { - /** - * Filter which Pictures to aggregate. - */ - where?: PicturesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Pictures 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?: PicturesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Pictures 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` Pictures. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Pictures - **/ - _count?: true | PicturesCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: PicturesMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: PicturesMaxAggregateInputType - } - - export type GetPicturesAggregateType = { - [P in keyof T & keyof AggregatePictures]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type PicturesGroupByArgs = { - where?: PicturesWhereInput - orderBy?: Enumerable - by: PicturesScalarFieldEnum[] - having?: PicturesScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: PicturesCountAggregateInputType | true - _min?: PicturesMinAggregateInputType - _max?: PicturesMaxAggregateInputType - } - - - export type PicturesGroupByOutputType = { - id: string - reportId: string | null - url: string | null - createdAt: Date | null - finalUrl: string | null - _count: PicturesCountAggregateOutputType | null - _min: PicturesMinAggregateOutputType | null - _max: PicturesMaxAggregateOutputType | null - } - - type GetPicturesGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof PicturesGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type PicturesSelect = $Extensions.GetSelect<{ - id?: boolean - reportId?: boolean - url?: boolean - createdAt?: boolean - finalUrl?: boolean - report?: boolean | ReportArgs - }, ExtArgs["result"]["pictures"]> - - export type PicturesSelectScalar = { - id?: boolean - reportId?: boolean - url?: boolean - createdAt?: boolean - finalUrl?: boolean - } - - export type PicturesInclude = { - report?: boolean | ReportArgs - } - - - type PicturesGetPayload = $Types.GetResult - - type PicturesCountArgs = - Omit & { - select?: PicturesCountAggregateInputType | true - } - - export interface PicturesDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Pictures'], meta: { name: 'Pictures' } } - /** - * Find zero or one Pictures that matches the filter. - * @param {PicturesFindUniqueArgs} args - Arguments to find a Pictures - * @example - * // Get one Pictures - * const pictures = await prisma.pictures.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__PicturesClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__PicturesClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one Pictures that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {PicturesFindUniqueOrThrowArgs} args - Arguments to find a Pictures - * @example - * // Get one Pictures - * const pictures = await prisma.pictures.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__PicturesClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first Pictures 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 {PicturesFindFirstArgs} args - Arguments to find a Pictures - * @example - * // Get one Pictures - * const pictures = await prisma.pictures.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__PicturesClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__PicturesClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first Pictures 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 {PicturesFindFirstOrThrowArgs} args - Arguments to find a Pictures - * @example - * // Get one Pictures - * const pictures = await prisma.pictures.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__PicturesClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Pictures 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 {PicturesFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Pictures - * const pictures = await prisma.pictures.findMany() - * - * // Get first 10 Pictures - * const pictures = await prisma.pictures.findMany({ take: 10 }) - * - * // Only select the `id` - * const picturesWithIdOnly = await prisma.pictures.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a Pictures. - * @param {PicturesCreateArgs} args - Arguments to create a Pictures. - * @example - * // Create one Pictures - * const Pictures = await prisma.pictures.create({ - * data: { - * // ... data to create a Pictures - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__PicturesClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Pictures. - * @param {PicturesCreateManyArgs} args - Arguments to create many Pictures. - * @example - * // Create many Pictures - * const pictures = await prisma.pictures.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a Pictures. - * @param {PicturesDeleteArgs} args - Arguments to delete one Pictures. - * @example - * // Delete one Pictures - * const Pictures = await prisma.pictures.delete({ - * where: { - * // ... filter to delete one Pictures - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__PicturesClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one Pictures. - * @param {PicturesUpdateArgs} args - Arguments to update one Pictures. - * @example - * // Update one Pictures - * const pictures = await prisma.pictures.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__PicturesClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Pictures. - * @param {PicturesDeleteManyArgs} args - Arguments to filter Pictures to delete. - * @example - * // Delete a few Pictures - * const { count } = await prisma.pictures.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Pictures. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PicturesUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Pictures - * const pictures = await prisma.pictures.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Pictures. - * @param {PicturesUpsertArgs} args - Arguments to update or create a Pictures. - * @example - * // Update or create a Pictures - * const pictures = await prisma.pictures.upsert({ - * create: { - * // ... data to create a Pictures - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Pictures we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__PicturesClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Pictures. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PicturesCountArgs} args - Arguments to filter Pictures to count. - * @example - * // Count the number of Pictures - * const count = await prisma.pictures.count({ - * where: { - * // ... the filter for the Pictures 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 Pictures. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PicturesAggregateArgs} 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 Pictures. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PicturesGroupByArgs} 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 PicturesGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: PicturesGroupByArgs['orderBy'] } - : { orderBy?: PicturesGroupByArgs['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 ? GetPicturesGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Pictures. - * 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__PicturesClient 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 = {}>(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 - - /** - * Pictures base type for findUnique actions - */ - export type PicturesFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - /** - * Filter, which Pictures to fetch. - */ - where: PicturesWhereUniqueInput - } - - /** - * Pictures findUnique - */ - export interface PicturesFindUniqueArgs extends PicturesFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Pictures findUniqueOrThrow - */ - export type PicturesFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - /** - * Filter, which Pictures to fetch. - */ - where: PicturesWhereUniqueInput - } - - - /** - * Pictures base type for findFirst actions - */ - export type PicturesFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - /** - * Filter, which Pictures to fetch. - */ - where?: PicturesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Pictures 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 Pictures. - */ - cursor?: PicturesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Pictures 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` Pictures. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Pictures. - */ - distinct?: Enumerable - } - - /** - * Pictures findFirst - */ - export interface PicturesFindFirstArgs extends PicturesFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Pictures findFirstOrThrow - */ - export type PicturesFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - /** - * Filter, which Pictures to fetch. - */ - where?: PicturesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Pictures 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 Pictures. - */ - cursor?: PicturesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Pictures 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` Pictures. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Pictures. - */ - distinct?: Enumerable - } - - - /** - * Pictures findMany - */ - export type PicturesFindManyArgs = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - /** - * Filter, which Pictures to fetch. - */ - where?: PicturesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Pictures 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 Pictures. - */ - cursor?: PicturesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Pictures 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` Pictures. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * Pictures create - */ - export type PicturesCreateArgs = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - /** - * The data needed to create a Pictures. - */ - data: XOR - } - - - /** - * Pictures createMany - */ - export type PicturesCreateManyArgs = { - /** - * The data used to create many Pictures. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * Pictures update - */ - export type PicturesUpdateArgs = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - /** - * The data needed to update a Pictures. - */ - data: XOR - /** - * Choose, which Pictures to update. - */ - where: PicturesWhereUniqueInput - } - - - /** - * Pictures updateMany - */ - export type PicturesUpdateManyArgs = { - /** - * The data used to update Pictures. - */ - data: XOR - /** - * Filter which Pictures to update - */ - where?: PicturesWhereInput - } - - - /** - * Pictures upsert - */ - export type PicturesUpsertArgs = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - /** - * The filter to search for the Pictures to update in case it exists. - */ - where: PicturesWhereUniqueInput - /** - * In case the Pictures found by the `where` argument doesn't exist, create a new Pictures with this data. - */ - create: XOR - /** - * In case the Pictures was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * Pictures delete - */ - export type PicturesDeleteArgs = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - /** - * Filter which Pictures to delete. - */ - where: PicturesWhereUniqueInput - } - - - /** - * Pictures deleteMany - */ - export type PicturesDeleteManyArgs = { - /** - * Filter which Pictures to delete - */ - where?: PicturesWhereInput - } - - - /** - * Pictures without action - */ - export type PicturesArgs = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - } - - - - /** - * Model Report - */ - - - export type AggregateReport = { - _count: ReportCountAggregateOutputType | null - _avg: ReportAvgAggregateOutputType | null - _sum: ReportSumAggregateOutputType | null - _min: ReportMinAggregateOutputType | null - _max: ReportMaxAggregateOutputType | null - } - - export type ReportAvgAggregateOutputType = { - serviceInstructeur: number | null - } - - export type ReportSumAggregateOutputType = { - serviceInstructeur: number | null - } - - export type ReportMinAggregateOutputType = { - id: string | null - title: string | null - projectDescription: string | null - redactedBy: string | null - meetDate: Date | null - applicantName: string | null - applicantAddress: string | null - projectCadastralRef: string | null - projectSpaceType: string | null - decision: string | null - precisions: string | null - contacts: string | null - furtherInformation: string | null - createdBy: string | null - createdAt: Date | null - serviceInstructeur: number | null - pdf: string | null - disabled: boolean | null - udap_id: string | null - redactedById: string | null - applicantEmail: string | null - city: string | null - zipCode: string | null - } - - export type ReportMaxAggregateOutputType = { - id: string | null - title: string | null - projectDescription: string | null - redactedBy: string | null - meetDate: Date | null - applicantName: string | null - applicantAddress: string | null - projectCadastralRef: string | null - projectSpaceType: string | null - decision: string | null - precisions: string | null - contacts: string | null - furtherInformation: string | null - createdBy: string | null - createdAt: Date | null - serviceInstructeur: number | null - pdf: string | null - disabled: boolean | null - udap_id: string | null - redactedById: string | null - applicantEmail: string | null - city: string | null - zipCode: string | null - } - - export type ReportCountAggregateOutputType = { - id: number - title: number - projectDescription: number - redactedBy: number - meetDate: number - applicantName: number - applicantAddress: number - projectCadastralRef: number - projectSpaceType: number - decision: number - precisions: number - contacts: number - furtherInformation: number - createdBy: number - createdAt: number - serviceInstructeur: number - pdf: number - disabled: number - udap_id: number - redactedById: number - applicantEmail: number - city: number - zipCode: number - _all: number - } - - - export type ReportAvgAggregateInputType = { - serviceInstructeur?: true - } - - export type ReportSumAggregateInputType = { - serviceInstructeur?: true - } - - export type ReportMinAggregateInputType = { - id?: true - title?: true - projectDescription?: true - redactedBy?: true - meetDate?: true - applicantName?: true - applicantAddress?: true - projectCadastralRef?: true - projectSpaceType?: true - decision?: true - precisions?: true - contacts?: true - furtherInformation?: true - createdBy?: true - createdAt?: true - serviceInstructeur?: true - pdf?: true - disabled?: true - udap_id?: true - redactedById?: true - applicantEmail?: true - city?: true - zipCode?: true - } - - export type ReportMaxAggregateInputType = { - id?: true - title?: true - projectDescription?: true - redactedBy?: true - meetDate?: true - applicantName?: true - applicantAddress?: true - projectCadastralRef?: true - projectSpaceType?: true - decision?: true - precisions?: true - contacts?: true - furtherInformation?: true - createdBy?: true - createdAt?: true - serviceInstructeur?: true - pdf?: true - disabled?: true - udap_id?: true - redactedById?: true - applicantEmail?: true - city?: true - zipCode?: true - } - - export type ReportCountAggregateInputType = { - id?: true - title?: true - projectDescription?: true - redactedBy?: true - meetDate?: true - applicantName?: true - applicantAddress?: true - projectCadastralRef?: true - projectSpaceType?: true - decision?: true - precisions?: true - contacts?: true - furtherInformation?: true - createdBy?: true - createdAt?: true - serviceInstructeur?: true - pdf?: true - disabled?: true - udap_id?: true - redactedById?: true - applicantEmail?: true - city?: true - zipCode?: 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 average - **/ - _avg?: ReportAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ReportSumAggregateInputType - /** - * {@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 - _avg?: ReportAvgAggregateInputType - _sum?: ReportSumAggregateInputType - _min?: ReportMinAggregateInputType - _max?: ReportMaxAggregateInputType - } - - - export type ReportGroupByOutputType = { - id: string - title: string | null - projectDescription: string | null - redactedBy: string | null - meetDate: Date | null - applicantName: string | null - applicantAddress: string | null - projectCadastralRef: string | null - projectSpaceType: string | null - decision: string | null - precisions: string | null - contacts: string | null - furtherInformation: string | null - createdBy: string - createdAt: Date - serviceInstructeur: number | null - pdf: string | null - disabled: boolean | null - udap_id: string | null - redactedById: string | null - applicantEmail: string | null - city: string | null - zipCode: string | null - _count: ReportCountAggregateOutputType | null - _avg: ReportAvgAggregateOutputType | null - _sum: ReportSumAggregateOutputType | 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 - projectDescription?: boolean - redactedBy?: boolean - meetDate?: boolean - applicantName?: boolean - applicantAddress?: boolean - projectCadastralRef?: boolean - projectSpaceType?: boolean - decision?: boolean - precisions?: boolean - contacts?: boolean - furtherInformation?: boolean - createdBy?: boolean - createdAt?: boolean - serviceInstructeur?: boolean - pdf?: boolean - disabled?: boolean - udap_id?: boolean - redactedById?: boolean - applicantEmail?: boolean - city?: boolean - zipCode?: boolean - pictures?: boolean | Report$picturesArgs - user?: boolean | UserArgs - tmp_pictures?: boolean | Report$tmp_picturesArgs - _count?: boolean | ReportCountOutputTypeArgs - }, ExtArgs["result"]["report"]> - - export type ReportSelectScalar = { - id?: boolean - title?: boolean - projectDescription?: boolean - redactedBy?: boolean - meetDate?: boolean - applicantName?: boolean - applicantAddress?: boolean - projectCadastralRef?: boolean - projectSpaceType?: boolean - decision?: boolean - precisions?: boolean - contacts?: boolean - furtherInformation?: boolean - createdBy?: boolean - createdAt?: boolean - serviceInstructeur?: boolean - pdf?: boolean - disabled?: boolean - udap_id?: boolean - redactedById?: boolean - applicantEmail?: boolean - city?: boolean - zipCode?: boolean - } - - export type ReportInclude = { - pictures?: boolean | Report$picturesArgs - user?: boolean | UserArgs - tmp_pictures?: boolean | Report$tmp_picturesArgs - _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); - - pictures = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; - - user = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; - - tmp_pictures = {}>(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.pictures - */ - export type Report$picturesArgs = { - /** - * Select specific fields to fetch from the Pictures - */ - select?: PicturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PicturesInclude | null - where?: PicturesWhereInput - orderBy?: Enumerable - cursor?: PicturesWhereUniqueInput - take?: number - skip?: number - distinct?: Enumerable - } - - - /** - * Report.tmp_pictures - */ - export type Report$tmp_picturesArgs = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - where?: Tmp_picturesWhereInput - orderBy?: Enumerable - cursor?: Tmp_picturesWhereUniqueInput - 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 Service_instructeurs - */ - - - export type AggregateService_instructeurs = { - _count: Service_instructeursCountAggregateOutputType | null - _avg: Service_instructeursAvgAggregateOutputType | null - _sum: Service_instructeursSumAggregateOutputType | null - _min: Service_instructeursMinAggregateOutputType | null - _max: Service_instructeursMaxAggregateOutputType | null - } - - export type Service_instructeursAvgAggregateOutputType = { - id: number | null - } - - export type Service_instructeursSumAggregateOutputType = { - id: number | null - } - - export type Service_instructeursMinAggregateOutputType = { - id: number | null - full_name: string | null - short_name: string | null - email: string | null - tel: string | null - udap_id: string | null - } - - export type Service_instructeursMaxAggregateOutputType = { - id: number | null - full_name: string | null - short_name: string | null - email: string | null - tel: string | null - udap_id: string | null - } - - export type Service_instructeursCountAggregateOutputType = { - id: number - full_name: number - short_name: number - email: number - tel: number - udap_id: number - _all: number - } - - - export type Service_instructeursAvgAggregateInputType = { - id?: true - } - - export type Service_instructeursSumAggregateInputType = { - id?: true - } - - export type Service_instructeursMinAggregateInputType = { - id?: true - full_name?: true - short_name?: true - email?: true - tel?: true - udap_id?: true - } - - export type Service_instructeursMaxAggregateInputType = { - id?: true - full_name?: true - short_name?: true - email?: true - tel?: true - udap_id?: true - } - - export type Service_instructeursCountAggregateInputType = { - id?: true - full_name?: true - short_name?: true - email?: true - tel?: true - udap_id?: true - _all?: true - } - - export type Service_instructeursAggregateArgs = { - /** - * Filter which Service_instructeurs to aggregate. - */ - where?: Service_instructeursWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Service_instructeurs 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?: Service_instructeursWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Service_instructeurs 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` Service_instructeurs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Service_instructeurs - **/ - _count?: true | Service_instructeursCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: Service_instructeursAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: Service_instructeursSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: Service_instructeursMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: Service_instructeursMaxAggregateInputType - } - - export type GetService_instructeursAggregateType = { - [P in keyof T & keyof AggregateService_instructeurs]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type Service_instructeursGroupByArgs = { - where?: Service_instructeursWhereInput - orderBy?: Enumerable - by: Service_instructeursScalarFieldEnum[] - having?: Service_instructeursScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: Service_instructeursCountAggregateInputType | true - _avg?: Service_instructeursAvgAggregateInputType - _sum?: Service_instructeursSumAggregateInputType - _min?: Service_instructeursMinAggregateInputType - _max?: Service_instructeursMaxAggregateInputType - } - - - export type Service_instructeursGroupByOutputType = { - id: number - full_name: string - short_name: string - email: string | null - tel: string | null - udap_id: string | null - _count: Service_instructeursCountAggregateOutputType | null - _avg: Service_instructeursAvgAggregateOutputType | null - _sum: Service_instructeursSumAggregateOutputType | null - _min: Service_instructeursMinAggregateOutputType | null - _max: Service_instructeursMaxAggregateOutputType | null - } - - type GetService_instructeursGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof Service_instructeursGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type Service_instructeursSelect = $Extensions.GetSelect<{ - id?: boolean - full_name?: boolean - short_name?: boolean - email?: boolean - tel?: boolean - udap_id?: boolean - }, ExtArgs["result"]["service_instructeurs"]> - - export type Service_instructeursSelectScalar = { - id?: boolean - full_name?: boolean - short_name?: boolean - email?: boolean - tel?: boolean - udap_id?: boolean - } - - - type Service_instructeursGetPayload = $Types.GetResult - - type Service_instructeursCountArgs = - Omit & { - select?: Service_instructeursCountAggregateInputType | true - } - - export interface Service_instructeursDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Service_instructeurs'], meta: { name: 'Service_instructeurs' } } - /** - * Find zero or one Service_instructeurs that matches the filter. - * @param {Service_instructeursFindUniqueArgs} args - Arguments to find a Service_instructeurs - * @example - * // Get one Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__Service_instructeursClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__Service_instructeursClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one Service_instructeurs that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {Service_instructeursFindUniqueOrThrowArgs} args - Arguments to find a Service_instructeurs - * @example - * // Get one Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__Service_instructeursClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first Service_instructeurs 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 {Service_instructeursFindFirstArgs} args - Arguments to find a Service_instructeurs - * @example - * // Get one Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__Service_instructeursClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__Service_instructeursClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first Service_instructeurs 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 {Service_instructeursFindFirstOrThrowArgs} args - Arguments to find a Service_instructeurs - * @example - * // Get one Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__Service_instructeursClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Service_instructeurs 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 {Service_instructeursFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.findMany() - * - * // Get first 10 Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.findMany({ take: 10 }) - * - * // Only select the `id` - * const service_instructeursWithIdOnly = await prisma.service_instructeurs.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a Service_instructeurs. - * @param {Service_instructeursCreateArgs} args - Arguments to create a Service_instructeurs. - * @example - * // Create one Service_instructeurs - * const Service_instructeurs = await prisma.service_instructeurs.create({ - * data: { - * // ... data to create a Service_instructeurs - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__Service_instructeursClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Service_instructeurs. - * @param {Service_instructeursCreateManyArgs} args - Arguments to create many Service_instructeurs. - * @example - * // Create many Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a Service_instructeurs. - * @param {Service_instructeursDeleteArgs} args - Arguments to delete one Service_instructeurs. - * @example - * // Delete one Service_instructeurs - * const Service_instructeurs = await prisma.service_instructeurs.delete({ - * where: { - * // ... filter to delete one Service_instructeurs - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__Service_instructeursClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one Service_instructeurs. - * @param {Service_instructeursUpdateArgs} args - Arguments to update one Service_instructeurs. - * @example - * // Update one Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__Service_instructeursClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Service_instructeurs. - * @param {Service_instructeursDeleteManyArgs} args - Arguments to filter Service_instructeurs to delete. - * @example - * // Delete a few Service_instructeurs - * const { count } = await prisma.service_instructeurs.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Service_instructeurs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Service_instructeursUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Service_instructeurs. - * @param {Service_instructeursUpsertArgs} args - Arguments to update or create a Service_instructeurs. - * @example - * // Update or create a Service_instructeurs - * const service_instructeurs = await prisma.service_instructeurs.upsert({ - * create: { - * // ... data to create a Service_instructeurs - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Service_instructeurs we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__Service_instructeursClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Service_instructeurs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Service_instructeursCountArgs} args - Arguments to filter Service_instructeurs to count. - * @example - * // Count the number of Service_instructeurs - * const count = await prisma.service_instructeurs.count({ - * where: { - * // ... the filter for the Service_instructeurs 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 Service_instructeurs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Service_instructeursAggregateArgs} 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 Service_instructeurs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Service_instructeursGroupByArgs} 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 Service_instructeursGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: Service_instructeursGroupByArgs['orderBy'] } - : { orderBy?: Service_instructeursGroupByArgs['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 ? GetService_instructeursGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Service_instructeurs. - * 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__Service_instructeursClient 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); - - - 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 - - /** - * Service_instructeurs base type for findUnique actions - */ - export type Service_instructeursFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Service_instructeurs - */ - select?: Service_instructeursSelect | null - /** - * Filter, which Service_instructeurs to fetch. - */ - where: Service_instructeursWhereUniqueInput - } - - /** - * Service_instructeurs findUnique - */ - export interface Service_instructeursFindUniqueArgs extends Service_instructeursFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Service_instructeurs findUniqueOrThrow - */ - export type Service_instructeursFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Service_instructeurs - */ - select?: Service_instructeursSelect | null - /** - * Filter, which Service_instructeurs to fetch. - */ - where: Service_instructeursWhereUniqueInput - } - - - /** - * Service_instructeurs base type for findFirst actions - */ - export type Service_instructeursFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Service_instructeurs - */ - select?: Service_instructeursSelect | null - /** - * Filter, which Service_instructeurs to fetch. - */ - where?: Service_instructeursWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Service_instructeurs 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 Service_instructeurs. - */ - cursor?: Service_instructeursWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Service_instructeurs 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` Service_instructeurs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Service_instructeurs. - */ - distinct?: Enumerable - } - - /** - * Service_instructeurs findFirst - */ - export interface Service_instructeursFindFirstArgs extends Service_instructeursFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Service_instructeurs findFirstOrThrow - */ - export type Service_instructeursFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Service_instructeurs - */ - select?: Service_instructeursSelect | null - /** - * Filter, which Service_instructeurs to fetch. - */ - where?: Service_instructeursWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Service_instructeurs 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 Service_instructeurs. - */ - cursor?: Service_instructeursWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Service_instructeurs 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` Service_instructeurs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Service_instructeurs. - */ - distinct?: Enumerable - } - - - /** - * Service_instructeurs findMany - */ - export type Service_instructeursFindManyArgs = { - /** - * Select specific fields to fetch from the Service_instructeurs - */ - select?: Service_instructeursSelect | null - /** - * Filter, which Service_instructeurs to fetch. - */ - where?: Service_instructeursWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Service_instructeurs 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 Service_instructeurs. - */ - cursor?: Service_instructeursWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Service_instructeurs 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` Service_instructeurs. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * Service_instructeurs create - */ - export type Service_instructeursCreateArgs = { - /** - * Select specific fields to fetch from the Service_instructeurs - */ - select?: Service_instructeursSelect | null - /** - * The data needed to create a Service_instructeurs. - */ - data: XOR - } - - - /** - * Service_instructeurs createMany - */ - export type Service_instructeursCreateManyArgs = { - /** - * The data used to create many Service_instructeurs. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * Service_instructeurs update - */ - export type Service_instructeursUpdateArgs = { - /** - * Select specific fields to fetch from the Service_instructeurs - */ - select?: Service_instructeursSelect | null - /** - * The data needed to update a Service_instructeurs. - */ - data: XOR - /** - * Choose, which Service_instructeurs to update. - */ - where: Service_instructeursWhereUniqueInput - } - - - /** - * Service_instructeurs updateMany - */ - export type Service_instructeursUpdateManyArgs = { - /** - * The data used to update Service_instructeurs. - */ - data: XOR - /** - * Filter which Service_instructeurs to update - */ - where?: Service_instructeursWhereInput - } - - - /** - * Service_instructeurs upsert - */ - export type Service_instructeursUpsertArgs = { - /** - * Select specific fields to fetch from the Service_instructeurs - */ - select?: Service_instructeursSelect | null - /** - * The filter to search for the Service_instructeurs to update in case it exists. - */ - where: Service_instructeursWhereUniqueInput - /** - * In case the Service_instructeurs found by the `where` argument doesn't exist, create a new Service_instructeurs with this data. - */ - create: XOR - /** - * In case the Service_instructeurs was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * Service_instructeurs delete - */ - export type Service_instructeursDeleteArgs = { - /** - * Select specific fields to fetch from the Service_instructeurs - */ - select?: Service_instructeursSelect | null - /** - * Filter which Service_instructeurs to delete. - */ - where: Service_instructeursWhereUniqueInput - } - - - /** - * Service_instructeurs deleteMany - */ - export type Service_instructeursDeleteManyArgs = { - /** - * Filter which Service_instructeurs to delete - */ - where?: Service_instructeursWhereInput - } - - - /** - * Service_instructeurs without action - */ - export type Service_instructeursArgs = { - /** - * Select specific fields to fetch from the Service_instructeurs - */ - select?: Service_instructeursSelect | null - } - - - - /** - * Model Tmp_pictures - */ - - - export type AggregateTmp_pictures = { - _count: Tmp_picturesCountAggregateOutputType | null - _min: Tmp_picturesMinAggregateOutputType | null - _max: Tmp_picturesMaxAggregateOutputType | null - } - - export type Tmp_picturesMinAggregateOutputType = { - id: string | null - reportId: string | null - createdAt: Date | null - } - - export type Tmp_picturesMaxAggregateOutputType = { - id: string | null - reportId: string | null - createdAt: Date | null - } - - export type Tmp_picturesCountAggregateOutputType = { - id: number - reportId: number - createdAt: number - _all: number - } - - - export type Tmp_picturesMinAggregateInputType = { - id?: true - reportId?: true - createdAt?: true - } - - export type Tmp_picturesMaxAggregateInputType = { - id?: true - reportId?: true - createdAt?: true - } - - export type Tmp_picturesCountAggregateInputType = { - id?: true - reportId?: true - createdAt?: true - _all?: true - } - - export type Tmp_picturesAggregateArgs = { - /** - * Filter which Tmp_pictures to aggregate. - */ - where?: Tmp_picturesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Tmp_pictures 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?: Tmp_picturesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Tmp_pictures 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` Tmp_pictures. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Tmp_pictures - **/ - _count?: true | Tmp_picturesCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: Tmp_picturesMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: Tmp_picturesMaxAggregateInputType - } - - export type GetTmp_picturesAggregateType = { - [P in keyof T & keyof AggregateTmp_pictures]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type Tmp_picturesGroupByArgs = { - where?: Tmp_picturesWhereInput - orderBy?: Enumerable - by: Tmp_picturesScalarFieldEnum[] - having?: Tmp_picturesScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: Tmp_picturesCountAggregateInputType | true - _min?: Tmp_picturesMinAggregateInputType - _max?: Tmp_picturesMaxAggregateInputType - } - - - export type Tmp_picturesGroupByOutputType = { - id: string - reportId: string | null - createdAt: Date | null - _count: Tmp_picturesCountAggregateOutputType | null - _min: Tmp_picturesMinAggregateOutputType | null - _max: Tmp_picturesMaxAggregateOutputType | null - } - - type GetTmp_picturesGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof Tmp_picturesGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type Tmp_picturesSelect = $Extensions.GetSelect<{ - id?: boolean - reportId?: boolean - createdAt?: boolean - report?: boolean | ReportArgs - }, ExtArgs["result"]["tmp_pictures"]> - - export type Tmp_picturesSelectScalar = { - id?: boolean - reportId?: boolean - createdAt?: boolean - } - - export type Tmp_picturesInclude = { - report?: boolean | ReportArgs - } - - - type Tmp_picturesGetPayload = $Types.GetResult - - type Tmp_picturesCountArgs = - Omit & { - select?: Tmp_picturesCountAggregateInputType | true - } - - export interface Tmp_picturesDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Tmp_pictures'], meta: { name: 'Tmp_pictures' } } - /** - * Find zero or one Tmp_pictures that matches the filter. - * @param {Tmp_picturesFindUniqueArgs} args - Arguments to find a Tmp_pictures - * @example - * // Get one Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__Tmp_picturesClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__Tmp_picturesClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one Tmp_pictures that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {Tmp_picturesFindUniqueOrThrowArgs} args - Arguments to find a Tmp_pictures - * @example - * // Get one Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__Tmp_picturesClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first Tmp_pictures 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 {Tmp_picturesFindFirstArgs} args - Arguments to find a Tmp_pictures - * @example - * // Get one Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__Tmp_picturesClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__Tmp_picturesClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first Tmp_pictures 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 {Tmp_picturesFindFirstOrThrowArgs} args - Arguments to find a Tmp_pictures - * @example - * // Get one Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__Tmp_picturesClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Tmp_pictures 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 {Tmp_picturesFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.findMany() - * - * // Get first 10 Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.findMany({ take: 10 }) - * - * // Only select the `id` - * const tmp_picturesWithIdOnly = await prisma.tmp_pictures.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a Tmp_pictures. - * @param {Tmp_picturesCreateArgs} args - Arguments to create a Tmp_pictures. - * @example - * // Create one Tmp_pictures - * const Tmp_pictures = await prisma.tmp_pictures.create({ - * data: { - * // ... data to create a Tmp_pictures - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__Tmp_picturesClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Tmp_pictures. - * @param {Tmp_picturesCreateManyArgs} args - Arguments to create many Tmp_pictures. - * @example - * // Create many Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a Tmp_pictures. - * @param {Tmp_picturesDeleteArgs} args - Arguments to delete one Tmp_pictures. - * @example - * // Delete one Tmp_pictures - * const Tmp_pictures = await prisma.tmp_pictures.delete({ - * where: { - * // ... filter to delete one Tmp_pictures - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__Tmp_picturesClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one Tmp_pictures. - * @param {Tmp_picturesUpdateArgs} args - Arguments to update one Tmp_pictures. - * @example - * // Update one Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__Tmp_picturesClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Tmp_pictures. - * @param {Tmp_picturesDeleteManyArgs} args - Arguments to filter Tmp_pictures to delete. - * @example - * // Delete a few Tmp_pictures - * const { count } = await prisma.tmp_pictures.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Tmp_pictures. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Tmp_picturesUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Tmp_pictures. - * @param {Tmp_picturesUpsertArgs} args - Arguments to update or create a Tmp_pictures. - * @example - * // Update or create a Tmp_pictures - * const tmp_pictures = await prisma.tmp_pictures.upsert({ - * create: { - * // ... data to create a Tmp_pictures - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Tmp_pictures we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__Tmp_picturesClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Tmp_pictures. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Tmp_picturesCountArgs} args - Arguments to filter Tmp_pictures to count. - * @example - * // Count the number of Tmp_pictures - * const count = await prisma.tmp_pictures.count({ - * where: { - * // ... the filter for the Tmp_pictures 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 Tmp_pictures. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Tmp_picturesAggregateArgs} 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 Tmp_pictures. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Tmp_picturesGroupByArgs} 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 Tmp_picturesGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: Tmp_picturesGroupByArgs['orderBy'] } - : { orderBy?: Tmp_picturesGroupByArgs['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 ? GetTmp_picturesGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Tmp_pictures. - * 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__Tmp_picturesClient 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 = {}>(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 - - /** - * Tmp_pictures base type for findUnique actions - */ - export type Tmp_picturesFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - /** - * Filter, which Tmp_pictures to fetch. - */ - where: Tmp_picturesWhereUniqueInput - } - - /** - * Tmp_pictures findUnique - */ - export interface Tmp_picturesFindUniqueArgs extends Tmp_picturesFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Tmp_pictures findUniqueOrThrow - */ - export type Tmp_picturesFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - /** - * Filter, which Tmp_pictures to fetch. - */ - where: Tmp_picturesWhereUniqueInput - } - - - /** - * Tmp_pictures base type for findFirst actions - */ - export type Tmp_picturesFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - /** - * Filter, which Tmp_pictures to fetch. - */ - where?: Tmp_picturesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Tmp_pictures 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 Tmp_pictures. - */ - cursor?: Tmp_picturesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Tmp_pictures 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` Tmp_pictures. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Tmp_pictures. - */ - distinct?: Enumerable - } - - /** - * Tmp_pictures findFirst - */ - export interface Tmp_picturesFindFirstArgs extends Tmp_picturesFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Tmp_pictures findFirstOrThrow - */ - export type Tmp_picturesFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - /** - * Filter, which Tmp_pictures to fetch. - */ - where?: Tmp_picturesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Tmp_pictures 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 Tmp_pictures. - */ - cursor?: Tmp_picturesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Tmp_pictures 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` Tmp_pictures. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Tmp_pictures. - */ - distinct?: Enumerable - } - - - /** - * Tmp_pictures findMany - */ - export type Tmp_picturesFindManyArgs = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - /** - * Filter, which Tmp_pictures to fetch. - */ - where?: Tmp_picturesWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Tmp_pictures 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 Tmp_pictures. - */ - cursor?: Tmp_picturesWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Tmp_pictures 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` Tmp_pictures. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * Tmp_pictures create - */ - export type Tmp_picturesCreateArgs = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - /** - * The data needed to create a Tmp_pictures. - */ - data: XOR - } - - - /** - * Tmp_pictures createMany - */ - export type Tmp_picturesCreateManyArgs = { - /** - * The data used to create many Tmp_pictures. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * Tmp_pictures update - */ - export type Tmp_picturesUpdateArgs = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - /** - * The data needed to update a Tmp_pictures. - */ - data: XOR - /** - * Choose, which Tmp_pictures to update. - */ - where: Tmp_picturesWhereUniqueInput - } - - - /** - * Tmp_pictures updateMany - */ - export type Tmp_picturesUpdateManyArgs = { - /** - * The data used to update Tmp_pictures. - */ - data: XOR - /** - * Filter which Tmp_pictures to update - */ - where?: Tmp_picturesWhereInput - } - - - /** - * Tmp_pictures upsert - */ - export type Tmp_picturesUpsertArgs = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - /** - * The filter to search for the Tmp_pictures to update in case it exists. - */ - where: Tmp_picturesWhereUniqueInput - /** - * In case the Tmp_pictures found by the `where` argument doesn't exist, create a new Tmp_pictures with this data. - */ - create: XOR - /** - * In case the Tmp_pictures was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * Tmp_pictures delete - */ - export type Tmp_picturesDeleteArgs = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - /** - * Filter which Tmp_pictures to delete. - */ - where: Tmp_picturesWhereUniqueInput - } - - - /** - * Tmp_pictures deleteMany - */ - export type Tmp_picturesDeleteManyArgs = { - /** - * Filter which Tmp_pictures to delete - */ - where?: Tmp_picturesWhereInput - } - - - /** - * Tmp_pictures without action - */ - export type Tmp_picturesArgs = { - /** - * Select specific fields to fetch from the Tmp_pictures - */ - select?: Tmp_picturesSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Tmp_picturesInclude | null - } - - - - /** - * Model Udap - */ - - - export type AggregateUdap = { - _count: UdapCountAggregateOutputType | null - _min: UdapMinAggregateOutputType | null - _max: UdapMaxAggregateOutputType | null - } - - export type UdapMinAggregateOutputType = { - id: string | null - department: string | null - completeCoords: string | null - visible: boolean | null - name: string | null - address: string | null - zipCode: string | null - city: string | null - phone: string | null - email: string | null - marianne_text: string | null - drac_text: string | null - udap_text: string | null - } - - export type UdapMaxAggregateOutputType = { - id: string | null - department: string | null - completeCoords: string | null - visible: boolean | null - name: string | null - address: string | null - zipCode: string | null - city: string | null - phone: string | null - email: string | null - marianne_text: string | null - drac_text: string | null - udap_text: string | null - } - - export type UdapCountAggregateOutputType = { - id: number - department: number - completeCoords: number - visible: number - name: number - address: number - zipCode: number - city: number - phone: number - email: number - marianne_text: number - drac_text: number - udap_text: number - _all: number - } - - - export type UdapMinAggregateInputType = { - id?: true - department?: true - completeCoords?: true - visible?: true - name?: true - address?: true - zipCode?: true - city?: true - phone?: true - email?: true - marianne_text?: true - drac_text?: true - udap_text?: true - } - - export type UdapMaxAggregateInputType = { - id?: true - department?: true - completeCoords?: true - visible?: true - name?: true - address?: true - zipCode?: true - city?: true - phone?: true - email?: true - marianne_text?: true - drac_text?: true - udap_text?: true - } - - export type UdapCountAggregateInputType = { - id?: true - department?: true - completeCoords?: true - visible?: true - name?: true - address?: true - zipCode?: true - city?: true - phone?: true - email?: true - marianne_text?: true - drac_text?: true - udap_text?: true - _all?: true - } - - export type UdapAggregateArgs = { - /** - * Filter which Udap to aggregate. - */ - where?: UdapWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Udaps 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?: UdapWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Udaps 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` Udaps. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Udaps - **/ - _count?: true | UdapCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: UdapMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: UdapMaxAggregateInputType - } - - export type GetUdapAggregateType = { - [P in keyof T & keyof AggregateUdap]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type UdapGroupByArgs = { - where?: UdapWhereInput - orderBy?: Enumerable - by: UdapScalarFieldEnum[] - having?: UdapScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: UdapCountAggregateInputType | true - _min?: UdapMinAggregateInputType - _max?: UdapMaxAggregateInputType - } - - - export type UdapGroupByOutputType = { - id: string - department: string - completeCoords: string | null - visible: boolean | null - name: string | null - address: string | null - zipCode: string | null - city: string | null - phone: string | null - email: string | null - marianne_text: string | null - drac_text: string | null - udap_text: string | null - _count: UdapCountAggregateOutputType | null - _min: UdapMinAggregateOutputType | null - _max: UdapMaxAggregateOutputType | null - } - - type GetUdapGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof UdapGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type UdapSelect = $Extensions.GetSelect<{ - id?: boolean - department?: boolean - completeCoords?: boolean - visible?: boolean - name?: boolean - address?: boolean - zipCode?: boolean - city?: boolean - phone?: boolean - email?: boolean - marianne_text?: boolean - drac_text?: boolean - udap_text?: boolean - user?: boolean | Udap$userArgs - _count?: boolean | UdapCountOutputTypeArgs - }, ExtArgs["result"]["udap"]> - - export type UdapSelectScalar = { - id?: boolean - department?: boolean - completeCoords?: boolean - visible?: boolean - name?: boolean - address?: boolean - zipCode?: boolean - city?: boolean - phone?: boolean - email?: boolean - marianne_text?: boolean - drac_text?: boolean - udap_text?: boolean - } - - export type UdapInclude = { - user?: boolean | Udap$userArgs - _count?: boolean | UdapCountOutputTypeArgs - } - - - type UdapGetPayload = $Types.GetResult - - type UdapCountArgs = - Omit & { - select?: UdapCountAggregateInputType | true - } - - export interface UdapDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Udap'], meta: { name: 'Udap' } } - /** - * Find zero or one Udap that matches the filter. - * @param {UdapFindUniqueArgs} args - Arguments to find a Udap - * @example - * // Get one Udap - * const udap = await prisma.udap.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__UdapClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__UdapClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one Udap that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {UdapFindUniqueOrThrowArgs} args - Arguments to find a Udap - * @example - * // Get one Udap - * const udap = await prisma.udap.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__UdapClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first Udap 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 {UdapFindFirstArgs} args - Arguments to find a Udap - * @example - * // Get one Udap - * const udap = await prisma.udap.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__UdapClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__UdapClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first Udap 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 {UdapFindFirstOrThrowArgs} args - Arguments to find a Udap - * @example - * // Get one Udap - * const udap = await prisma.udap.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__UdapClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Udaps 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 {UdapFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Udaps - * const udaps = await prisma.udap.findMany() - * - * // Get first 10 Udaps - * const udaps = await prisma.udap.findMany({ take: 10 }) - * - * // Only select the `id` - * const udapWithIdOnly = await prisma.udap.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a Udap. - * @param {UdapCreateArgs} args - Arguments to create a Udap. - * @example - * // Create one Udap - * const Udap = await prisma.udap.create({ - * data: { - * // ... data to create a Udap - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__UdapClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Udaps. - * @param {UdapCreateManyArgs} args - Arguments to create many Udaps. - * @example - * // Create many Udaps - * const udap = await prisma.udap.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a Udap. - * @param {UdapDeleteArgs} args - Arguments to delete one Udap. - * @example - * // Delete one Udap - * const Udap = await prisma.udap.delete({ - * where: { - * // ... filter to delete one Udap - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__UdapClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one Udap. - * @param {UdapUpdateArgs} args - Arguments to update one Udap. - * @example - * // Update one Udap - * const udap = await prisma.udap.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__UdapClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Udaps. - * @param {UdapDeleteManyArgs} args - Arguments to filter Udaps to delete. - * @example - * // Delete a few Udaps - * const { count } = await prisma.udap.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Udaps. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UdapUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Udaps - * const udap = await prisma.udap.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Udap. - * @param {UdapUpsertArgs} args - Arguments to update or create a Udap. - * @example - * // Update or create a Udap - * const udap = await prisma.udap.upsert({ - * create: { - * // ... data to create a Udap - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Udap we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__UdapClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Udaps. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UdapCountArgs} args - Arguments to filter Udaps to count. - * @example - * // Count the number of Udaps - * const count = await prisma.udap.count({ - * where: { - * // ... the filter for the Udaps 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 Udap. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UdapAggregateArgs} 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 Udap. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UdapGroupByArgs} 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 UdapGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: UdapGroupByArgs['orderBy'] } - : { orderBy?: UdapGroupByArgs['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 ? GetUdapGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Udap. - * 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__UdapClient 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); - - user = {}>(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 - - /** - * Udap base type for findUnique actions - */ - export type UdapFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Udap - */ - select?: UdapSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UdapInclude | null - /** - * Filter, which Udap to fetch. - */ - where: UdapWhereUniqueInput - } - - /** - * Udap findUnique - */ - export interface UdapFindUniqueArgs extends UdapFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Udap findUniqueOrThrow - */ - export type UdapFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Udap - */ - select?: UdapSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UdapInclude | null - /** - * Filter, which Udap to fetch. - */ - where: UdapWhereUniqueInput - } - - - /** - * Udap base type for findFirst actions - */ - export type UdapFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Udap - */ - select?: UdapSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UdapInclude | null - /** - * Filter, which Udap to fetch. - */ - where?: UdapWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Udaps 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 Udaps. - */ - cursor?: UdapWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Udaps 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` Udaps. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Udaps. - */ - distinct?: Enumerable - } - - /** - * Udap findFirst - */ - export interface UdapFindFirstArgs extends UdapFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Udap findFirstOrThrow - */ - export type UdapFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Udap - */ - select?: UdapSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UdapInclude | null - /** - * Filter, which Udap to fetch. - */ - where?: UdapWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Udaps 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 Udaps. - */ - cursor?: UdapWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Udaps 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` Udaps. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Udaps. - */ - distinct?: Enumerable - } - - - /** - * Udap findMany - */ - export type UdapFindManyArgs = { - /** - * Select specific fields to fetch from the Udap - */ - select?: UdapSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UdapInclude | null - /** - * Filter, which Udaps to fetch. - */ - where?: UdapWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Udaps 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 Udaps. - */ - cursor?: UdapWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Udaps 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` Udaps. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * Udap create - */ - export type UdapCreateArgs = { - /** - * Select specific fields to fetch from the Udap - */ - select?: UdapSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UdapInclude | null - /** - * The data needed to create a Udap. - */ - data: XOR - } - - - /** - * Udap createMany - */ - export type UdapCreateManyArgs = { - /** - * The data used to create many Udaps. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * Udap update - */ - export type UdapUpdateArgs = { - /** - * Select specific fields to fetch from the Udap - */ - select?: UdapSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UdapInclude | null - /** - * The data needed to update a Udap. - */ - data: XOR - /** - * Choose, which Udap to update. - */ - where: UdapWhereUniqueInput - } - - - /** - * Udap updateMany - */ - export type UdapUpdateManyArgs = { - /** - * The data used to update Udaps. - */ - data: XOR - /** - * Filter which Udaps to update - */ - where?: UdapWhereInput - } - - - /** - * Udap upsert - */ - export type UdapUpsertArgs = { - /** - * Select specific fields to fetch from the Udap - */ - select?: UdapSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UdapInclude | null - /** - * The filter to search for the Udap to update in case it exists. - */ - where: UdapWhereUniqueInput - /** - * In case the Udap found by the `where` argument doesn't exist, create a new Udap with this data. - */ - create: XOR - /** - * In case the Udap was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * Udap delete - */ - export type UdapDeleteArgs = { - /** - * Select specific fields to fetch from the Udap - */ - select?: UdapSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UdapInclude | null - /** - * Filter which Udap to delete. - */ - where: UdapWhereUniqueInput - } - - - /** - * Udap deleteMany - */ - export type UdapDeleteManyArgs = { - /** - * Filter which Udaps to delete - */ - where?: UdapWhereInput - } - - - /** - * Udap.user - */ - export type Udap$userArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - where?: UserWhereInput - orderBy?: Enumerable - cursor?: UserWhereUniqueInput - take?: number - skip?: number - distinct?: Enumerable - } - - - /** - * Udap without action - */ - export type UdapArgs = { - /** - * Select specific fields to fetch from the Udap - */ - select?: UdapSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UdapInclude | null - } - - - - /** - * Model User - */ - - - export type AggregateUser = { - _count: UserCountAggregateOutputType | null - _min: UserMinAggregateOutputType | null - _max: UserMaxAggregateOutputType | null - } - - export type UserMinAggregateOutputType = { - id: string | null - name: string | null - udap_id: string | null - } - - export type UserMaxAggregateOutputType = { - id: string | null - name: string | null - udap_id: string | null - } - - export type UserCountAggregateOutputType = { - id: number - name: number - udap_id: number - _all: number - } - - - export type UserMinAggregateInputType = { - id?: true - name?: true - udap_id?: true - } - - export type UserMaxAggregateInputType = { - id?: true - name?: true - udap_id?: true - } - - export type UserCountAggregateInputType = { - id?: true - name?: true - udap_id?: true - _all?: true - } - - export type UserAggregateArgs = { - /** - * Filter which User to aggregate. - */ - where?: UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users 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?: UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Users - **/ - _count?: true | UserCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: UserMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: UserMaxAggregateInputType - } - - export type GetUserAggregateType = { - [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type UserGroupByArgs = { - where?: UserWhereInput - orderBy?: Enumerable - by: UserScalarFieldEnum[] - having?: UserScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: UserCountAggregateInputType | true - _min?: UserMinAggregateInputType - _max?: UserMaxAggregateInputType - } - - - export type UserGroupByOutputType = { - id: string - name: string - udap_id: string - _count: UserCountAggregateOutputType | null - _min: UserMinAggregateOutputType | null - _max: UserMaxAggregateOutputType | null - } - - type GetUserGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type UserSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - udap_id?: boolean - delegation_delegation_createdByTouser?: boolean | User$delegation_delegation_createdByTouserArgs - delegation_delegation_delegatedToTouser?: boolean | User$delegation_delegation_delegatedToTouserArgs - report?: boolean | User$reportArgs - udap?: boolean | UdapArgs - _count?: boolean | UserCountOutputTypeArgs - }, ExtArgs["result"]["user"]> - - export type UserSelectScalar = { - id?: boolean - name?: boolean - udap_id?: boolean - } - - export type UserInclude = { - delegation_delegation_createdByTouser?: boolean | User$delegation_delegation_createdByTouserArgs - delegation_delegation_delegatedToTouser?: boolean | User$delegation_delegation_delegatedToTouserArgs - report?: boolean | User$reportArgs - udap?: boolean | UdapArgs - _count?: boolean | UserCountOutputTypeArgs - } - - - type UserGetPayload = $Types.GetResult - - type UserCountArgs = - Omit & { - select?: UserCountAggregateInputType | true - } - - export interface UserDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } - /** - * Find zero or one User that matches the filter. - * @param {UserFindUniqueArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one User that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first User that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindFirstArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first User 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 {UserFindFirstOrThrowArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Users that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Users - * const users = await prisma.user.findMany() - * - * // Get first 10 Users - * const users = await prisma.user.findMany({ take: 10 }) - * - * // Only select the `id` - * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a User. - * @param {UserCreateArgs} args - Arguments to create a User. - * @example - * // Create one User - * const User = await prisma.user.create({ - * data: { - * // ... data to create a User - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Users. - * @param {UserCreateManyArgs} args - Arguments to create many Users. - * @example - * // Create many Users - * const user = await prisma.user.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a User. - * @param {UserDeleteArgs} args - Arguments to delete one User. - * @example - * // Delete one User - * const User = await prisma.user.delete({ - * where: { - * // ... filter to delete one User - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one User. - * @param {UserUpdateArgs} args - Arguments to update one User. - * @example - * // Update one User - * const user = await prisma.user.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Users. - * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. - * @example - * // Delete a few Users - * const { count } = await prisma.user.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Users. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Users - * const user = await prisma.user.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one User. - * @param {UserUpsertArgs} args - Arguments to update or create a User. - * @example - * // Update or create a User - * const user = await prisma.user.upsert({ - * create: { - * // ... data to create a User - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the User we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__UserClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Users. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserCountArgs} args - Arguments to filter Users to count. - * @example - * // Count the number of Users - * const count = await prisma.user.count({ - * where: { - * // ... the filter for the Users we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a User. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by User. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends UserGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: UserGroupByArgs['orderBy'] } - : { orderBy?: UserGroupByArgs['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 ? GetUserGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for User. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export class Prisma__UserClient 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); - - delegation_delegation_createdByTouser = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; - - delegation_delegation_delegatedToTouser = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; - - report = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; - - udap = {}>(args?: Subset>): Prisma__UdapClient<$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 - - /** - * User base type for findUnique actions - */ - export type UserFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - /** - * Filter, which User to fetch. - */ - where: UserWhereUniqueInput - } - - /** - * User findUnique - */ - export interface UserFindUniqueArgs extends UserFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * User findUniqueOrThrow - */ - export type UserFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - /** - * Filter, which User to fetch. - */ - where: UserWhereUniqueInput - } - - - /** - * User base type for findFirst actions - */ - export type UserFindFirstArgsBase = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - /** - * Filter, which User to fetch. - */ - where?: UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users 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 Users. - */ - cursor?: UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Users. - */ - distinct?: Enumerable - } - - /** - * User findFirst - */ - export interface UserFindFirstArgs extends UserFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * User findFirstOrThrow - */ - export type UserFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - /** - * Filter, which User to fetch. - */ - where?: UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users 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 Users. - */ - cursor?: UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Users. - */ - distinct?: Enumerable - } - - - /** - * User findMany - */ - export type UserFindManyArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - /** - * Filter, which Users to fetch. - */ - where?: UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users 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 Users. - */ - cursor?: UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * User create - */ - export type UserCreateArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - /** - * The data needed to create a User. - */ - data: XOR - } - - - /** - * User createMany - */ - export type UserCreateManyArgs = { - /** - * The data used to create many Users. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * User update - */ - export type UserUpdateArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - /** - * The data needed to update a User. - */ - data: XOR - /** - * Choose, which User to update. - */ - where: UserWhereUniqueInput - } - - - /** - * User updateMany - */ - export type UserUpdateManyArgs = { - /** - * The data used to update Users. - */ - data: XOR - /** - * Filter which Users to update - */ - where?: UserWhereInput - } - - - /** - * User upsert - */ - export type UserUpsertArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - /** - * The filter to search for the User to update in case it exists. - */ - where: UserWhereUniqueInput - /** - * In case the User found by the `where` argument doesn't exist, create a new User with this data. - */ - create: XOR - /** - * In case the User was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * User delete - */ - export type UserDeleteArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - /** - * Filter which User to delete. - */ - where: UserWhereUniqueInput - } - - - /** - * User deleteMany - */ - export type UserDeleteManyArgs = { - /** - * Filter which Users to delete - */ - where?: UserWhereInput - } - - - /** - * User.delegation_delegation_createdByTouser - */ - export type User$delegation_delegation_createdByTouserArgs = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - where?: DelegationWhereInput - orderBy?: Enumerable - cursor?: DelegationWhereUniqueInput - take?: number - skip?: number - distinct?: Enumerable - } - - - /** - * User.delegation_delegation_delegatedToTouser - */ - export type User$delegation_delegation_delegatedToTouserArgs = { - /** - * Select specific fields to fetch from the Delegation - */ - select?: DelegationSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: DelegationInclude | null - where?: DelegationWhereInput - orderBy?: Enumerable - cursor?: DelegationWhereUniqueInput - take?: number - skip?: number - distinct?: Enumerable - } - - - /** - * User.report - */ - export type User$reportArgs = { - /** - * Select specific fields to fetch from the Report - */ - select?: ReportSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: ReportInclude | null - where?: ReportWhereInput - orderBy?: Enumerable - cursor?: ReportWhereUniqueInput - take?: number - skip?: number - distinct?: Enumerable - } - - - /** - * User without action - */ - export type UserArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: UserInclude | null - } - - - - /** - * Enums - */ - - export const TransactionIsolationLevel: { - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' - }; - - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - - - export const ClauseScalarFieldEnum: { - key: 'key', - value: 'value', - udap_id: 'udap_id', - text: 'text', - hidden: 'hidden' - }; - - export type ClauseScalarFieldEnum = (typeof ClauseScalarFieldEnum)[keyof typeof ClauseScalarFieldEnum] - - - export const Clause_v2ScalarFieldEnum: { - id: 'id', - key: 'key', - value: 'value', - position: 'position', - udap_id: 'udap_id', - text: 'text' - }; - - export type Clause_v2ScalarFieldEnum = (typeof Clause_v2ScalarFieldEnum)[keyof typeof Clause_v2ScalarFieldEnum] - - - export const DelegationScalarFieldEnum: { - createdBy: 'createdBy', - delegatedTo: 'delegatedTo' - }; - - export type DelegationScalarFieldEnum = (typeof DelegationScalarFieldEnum)[keyof typeof DelegationScalarFieldEnum] - - - export const Pdf_snapshotScalarFieldEnum: { - id: 'id', - report_id: 'report_id', - html: 'html', - report: 'report', - user_id: 'user_id' - }; - - export type Pdf_snapshotScalarFieldEnum = (typeof Pdf_snapshotScalarFieldEnum)[keyof typeof Pdf_snapshotScalarFieldEnum] - - - export const Picture_linesScalarFieldEnum: { - id: 'id', - pictureId: 'pictureId', - lines: 'lines', - createdAt: 'createdAt' - }; - - export type Picture_linesScalarFieldEnum = (typeof Picture_linesScalarFieldEnum)[keyof typeof Picture_linesScalarFieldEnum] - - - export const PicturesScalarFieldEnum: { - id: 'id', - reportId: 'reportId', - url: 'url', - createdAt: 'createdAt', - finalUrl: 'finalUrl' - }; - - export type PicturesScalarFieldEnum = (typeof PicturesScalarFieldEnum)[keyof typeof PicturesScalarFieldEnum] - - - export const ReportScalarFieldEnum: { - id: 'id', - title: 'title', - projectDescription: 'projectDescription', - redactedBy: 'redactedBy', - meetDate: 'meetDate', - applicantName: 'applicantName', - applicantAddress: 'applicantAddress', - projectCadastralRef: 'projectCadastralRef', - projectSpaceType: 'projectSpaceType', - decision: 'decision', - precisions: 'precisions', - contacts: 'contacts', - furtherInformation: 'furtherInformation', - createdBy: 'createdBy', - createdAt: 'createdAt', - serviceInstructeur: 'serviceInstructeur', - pdf: 'pdf', - disabled: 'disabled', - udap_id: 'udap_id', - redactedById: 'redactedById', - applicantEmail: 'applicantEmail', - city: 'city', - zipCode: 'zipCode' - }; - - export type ReportScalarFieldEnum = (typeof ReportScalarFieldEnum)[keyof typeof ReportScalarFieldEnum] - - - export const Service_instructeursScalarFieldEnum: { - id: 'id', - full_name: 'full_name', - short_name: 'short_name', - email: 'email', - tel: 'tel', - udap_id: 'udap_id' - }; - - export type Service_instructeursScalarFieldEnum = (typeof Service_instructeursScalarFieldEnum)[keyof typeof Service_instructeursScalarFieldEnum] - - - export const Tmp_picturesScalarFieldEnum: { - id: 'id', - reportId: 'reportId', - createdAt: 'createdAt' - }; - - export type Tmp_picturesScalarFieldEnum = (typeof Tmp_picturesScalarFieldEnum)[keyof typeof Tmp_picturesScalarFieldEnum] - - - export const UdapScalarFieldEnum: { - id: 'id', - department: 'department', - completeCoords: 'completeCoords', - visible: 'visible', - name: 'name', - address: 'address', - zipCode: 'zipCode', - city: 'city', - phone: 'phone', - email: 'email', - marianne_text: 'marianne_text', - drac_text: 'drac_text', - udap_text: 'udap_text' - }; - - export type UdapScalarFieldEnum = (typeof UdapScalarFieldEnum)[keyof typeof UdapScalarFieldEnum] - - - export const UserScalarFieldEnum: { - id: 'id', - name: 'name', - udap_id: 'udap_id' - }; - - export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] - - - 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 ClauseWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - key?: StringFilter | string - value?: StringFilter | string - udap_id?: StringFilter | string - text?: StringFilter | string - hidden?: BoolNullableFilter | boolean | null - } - - export type ClauseOrderByWithRelationInput = { - key?: SortOrder - value?: SortOrder - udap_id?: SortOrder - text?: SortOrder - hidden?: SortOrderInput | SortOrder - } - - export type ClauseWhereUniqueInput = { - key_value_udap_id?: ClauseKeyValueUdap_idCompoundUniqueInput - } - - export type ClauseOrderByWithAggregationInput = { - key?: SortOrder - value?: SortOrder - udap_id?: SortOrder - text?: SortOrder - hidden?: SortOrderInput | SortOrder - _count?: ClauseCountOrderByAggregateInput - _max?: ClauseMaxOrderByAggregateInput - _min?: ClauseMinOrderByAggregateInput - } - - export type ClauseScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - key?: StringWithAggregatesFilter | string - value?: StringWithAggregatesFilter | string - udap_id?: StringWithAggregatesFilter | string - text?: StringWithAggregatesFilter | string - hidden?: BoolNullableWithAggregatesFilter | boolean | null - } - - export type Clause_v2WhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - key?: StringFilter | string - value?: StringFilter | string - position?: IntNullableFilter | number | null - udap_id?: StringNullableFilter | string | null - text?: StringFilter | string - } - - export type Clause_v2OrderByWithRelationInput = { - id?: SortOrder - key?: SortOrder - value?: SortOrder - position?: SortOrderInput | SortOrder - udap_id?: SortOrderInput | SortOrder - text?: SortOrder - } - - export type Clause_v2WhereUniqueInput = { - id?: string - } - - export type Clause_v2OrderByWithAggregationInput = { - id?: SortOrder - key?: SortOrder - value?: SortOrder - position?: SortOrderInput | SortOrder - udap_id?: SortOrderInput | SortOrder - text?: SortOrder - _count?: Clause_v2CountOrderByAggregateInput - _avg?: Clause_v2AvgOrderByAggregateInput - _max?: Clause_v2MaxOrderByAggregateInput - _min?: Clause_v2MinOrderByAggregateInput - _sum?: Clause_v2SumOrderByAggregateInput - } - - export type Clause_v2ScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - key?: StringWithAggregatesFilter | string - value?: StringWithAggregatesFilter | string - position?: IntNullableWithAggregatesFilter | number | null - udap_id?: StringNullableWithAggregatesFilter | string | null - text?: StringWithAggregatesFilter | string - } - - export type DelegationWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - createdBy?: StringFilter | string - delegatedTo?: StringFilter | string - user_delegation_createdByTouser?: XOR - user_delegation_delegatedToTouser?: XOR - } - - export type DelegationOrderByWithRelationInput = { - createdBy?: SortOrder - delegatedTo?: SortOrder - user_delegation_createdByTouser?: UserOrderByWithRelationInput - user_delegation_delegatedToTouser?: UserOrderByWithRelationInput - } - - export type DelegationWhereUniqueInput = { - createdBy_delegatedTo?: DelegationCreatedByDelegatedToCompoundUniqueInput - } - - export type DelegationOrderByWithAggregationInput = { - createdBy?: SortOrder - delegatedTo?: SortOrder - _count?: DelegationCountOrderByAggregateInput - _max?: DelegationMaxOrderByAggregateInput - _min?: DelegationMinOrderByAggregateInput - } - - export type DelegationScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - createdBy?: StringWithAggregatesFilter | string - delegatedTo?: StringWithAggregatesFilter | string - } - - export type Pdf_snapshotWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - report_id?: StringNullableFilter | string | null - html?: StringNullableFilter | string | null - report?: StringNullableFilter | string | null - user_id?: StringNullableFilter | string | null - } - - export type Pdf_snapshotOrderByWithRelationInput = { - id?: SortOrder - report_id?: SortOrderInput | SortOrder - html?: SortOrderInput | SortOrder - report?: SortOrderInput | SortOrder - user_id?: SortOrderInput | SortOrder - } - - export type Pdf_snapshotWhereUniqueInput = { - id?: string - } - - export type Pdf_snapshotOrderByWithAggregationInput = { - id?: SortOrder - report_id?: SortOrderInput | SortOrder - html?: SortOrderInput | SortOrder - report?: SortOrderInput | SortOrder - user_id?: SortOrderInput | SortOrder - _count?: Pdf_snapshotCountOrderByAggregateInput - _max?: Pdf_snapshotMaxOrderByAggregateInput - _min?: Pdf_snapshotMinOrderByAggregateInput - } - - export type Pdf_snapshotScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - report_id?: StringNullableWithAggregatesFilter | string | null - html?: StringNullableWithAggregatesFilter | string | null - report?: StringNullableWithAggregatesFilter | string | null - user_id?: StringNullableWithAggregatesFilter | string | null - } - - export type Picture_linesWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - pictureId?: StringNullableFilter | string | null - lines?: StringFilter | string - createdAt?: DateTimeNullableFilter | Date | string | null - } - - export type Picture_linesOrderByWithRelationInput = { - id?: SortOrder - pictureId?: SortOrderInput | SortOrder - lines?: SortOrder - createdAt?: SortOrderInput | SortOrder - } - - export type Picture_linesWhereUniqueInput = { - id?: string - } - - export type Picture_linesOrderByWithAggregationInput = { - id?: SortOrder - pictureId?: SortOrderInput | SortOrder - lines?: SortOrder - createdAt?: SortOrderInput | SortOrder - _count?: Picture_linesCountOrderByAggregateInput - _max?: Picture_linesMaxOrderByAggregateInput - _min?: Picture_linesMinOrderByAggregateInput - } - - export type Picture_linesScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - pictureId?: StringNullableWithAggregatesFilter | string | null - lines?: StringWithAggregatesFilter | string - createdAt?: DateTimeNullableWithAggregatesFilter | Date | string | null - } - - export type PicturesWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - reportId?: StringNullableFilter | string | null - url?: StringNullableFilter | string | null - createdAt?: DateTimeNullableFilter | Date | string | null - finalUrl?: StringNullableFilter | string | null - report?: XOR | null - } - - export type PicturesOrderByWithRelationInput = { - id?: SortOrder - reportId?: SortOrderInput | SortOrder - url?: SortOrderInput | SortOrder - createdAt?: SortOrderInput | SortOrder - finalUrl?: SortOrderInput | SortOrder - report?: ReportOrderByWithRelationInput - } - - export type PicturesWhereUniqueInput = { - id?: string - } - - export type PicturesOrderByWithAggregationInput = { - id?: SortOrder - reportId?: SortOrderInput | SortOrder - url?: SortOrderInput | SortOrder - createdAt?: SortOrderInput | SortOrder - finalUrl?: SortOrderInput | SortOrder - _count?: PicturesCountOrderByAggregateInput - _max?: PicturesMaxOrderByAggregateInput - _min?: PicturesMinOrderByAggregateInput - } - - export type PicturesScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - reportId?: StringNullableWithAggregatesFilter | string | null - url?: StringNullableWithAggregatesFilter | string | null - createdAt?: DateTimeNullableWithAggregatesFilter | Date | string | null - finalUrl?: StringNullableWithAggregatesFilter | string | null - } - - export type ReportWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - title?: StringNullableFilter | string | null - projectDescription?: StringNullableFilter | string | null - redactedBy?: StringNullableFilter | string | null - meetDate?: DateTimeNullableFilter | Date | string | null - applicantName?: StringNullableFilter | string | null - applicantAddress?: StringNullableFilter | string | null - projectCadastralRef?: StringNullableFilter | string | null - projectSpaceType?: StringNullableFilter | string | null - decision?: StringNullableFilter | string | null - precisions?: StringNullableFilter | string | null - contacts?: StringNullableFilter | string | null - furtherInformation?: StringNullableFilter | string | null - createdBy?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - serviceInstructeur?: IntNullableFilter | number | null - pdf?: StringNullableFilter | string | null - disabled?: BoolNullableFilter | boolean | null - udap_id?: StringNullableFilter | string | null - redactedById?: StringNullableFilter | string | null - applicantEmail?: StringNullableFilter | string | null - city?: StringNullableFilter | string | null - zipCode?: StringNullableFilter | string | null - pictures?: PicturesListRelationFilter - user?: XOR - tmp_pictures?: Tmp_picturesListRelationFilter - } - - export type ReportOrderByWithRelationInput = { - id?: SortOrder - title?: SortOrderInput | SortOrder - projectDescription?: SortOrderInput | SortOrder - redactedBy?: SortOrderInput | SortOrder - meetDate?: SortOrderInput | SortOrder - applicantName?: SortOrderInput | SortOrder - applicantAddress?: SortOrderInput | SortOrder - projectCadastralRef?: SortOrderInput | SortOrder - projectSpaceType?: SortOrderInput | SortOrder - decision?: SortOrderInput | SortOrder - precisions?: SortOrderInput | SortOrder - contacts?: SortOrderInput | SortOrder - furtherInformation?: SortOrderInput | SortOrder - createdBy?: SortOrder - createdAt?: SortOrder - serviceInstructeur?: SortOrderInput | SortOrder - pdf?: SortOrderInput | SortOrder - disabled?: SortOrderInput | SortOrder - udap_id?: SortOrderInput | SortOrder - redactedById?: SortOrderInput | SortOrder - applicantEmail?: SortOrderInput | SortOrder - city?: SortOrderInput | SortOrder - zipCode?: SortOrderInput | SortOrder - pictures?: PicturesOrderByRelationAggregateInput - user?: UserOrderByWithRelationInput - tmp_pictures?: Tmp_picturesOrderByRelationAggregateInput - } - - export type ReportWhereUniqueInput = { - id?: string - } - - export type ReportOrderByWithAggregationInput = { - id?: SortOrder - title?: SortOrderInput | SortOrder - projectDescription?: SortOrderInput | SortOrder - redactedBy?: SortOrderInput | SortOrder - meetDate?: SortOrderInput | SortOrder - applicantName?: SortOrderInput | SortOrder - applicantAddress?: SortOrderInput | SortOrder - projectCadastralRef?: SortOrderInput | SortOrder - projectSpaceType?: SortOrderInput | SortOrder - decision?: SortOrderInput | SortOrder - precisions?: SortOrderInput | SortOrder - contacts?: SortOrderInput | SortOrder - furtherInformation?: SortOrderInput | SortOrder - createdBy?: SortOrder - createdAt?: SortOrder - serviceInstructeur?: SortOrderInput | SortOrder - pdf?: SortOrderInput | SortOrder - disabled?: SortOrderInput | SortOrder - udap_id?: SortOrderInput | SortOrder - redactedById?: SortOrderInput | SortOrder - applicantEmail?: SortOrderInput | SortOrder - city?: SortOrderInput | SortOrder - zipCode?: SortOrderInput | SortOrder - _count?: ReportCountOrderByAggregateInput - _avg?: ReportAvgOrderByAggregateInput - _max?: ReportMaxOrderByAggregateInput - _min?: ReportMinOrderByAggregateInput - _sum?: ReportSumOrderByAggregateInput - } - - export type ReportScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - title?: StringNullableWithAggregatesFilter | string | null - projectDescription?: StringNullableWithAggregatesFilter | string | null - redactedBy?: StringNullableWithAggregatesFilter | string | null - meetDate?: DateTimeNullableWithAggregatesFilter | Date | string | null - applicantName?: StringNullableWithAggregatesFilter | string | null - applicantAddress?: StringNullableWithAggregatesFilter | string | null - projectCadastralRef?: StringNullableWithAggregatesFilter | string | null - projectSpaceType?: StringNullableWithAggregatesFilter | string | null - decision?: StringNullableWithAggregatesFilter | string | null - precisions?: StringNullableWithAggregatesFilter | string | null - contacts?: StringNullableWithAggregatesFilter | string | null - furtherInformation?: StringNullableWithAggregatesFilter | string | null - createdBy?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - serviceInstructeur?: IntNullableWithAggregatesFilter | number | null - pdf?: StringNullableWithAggregatesFilter | string | null - disabled?: BoolNullableWithAggregatesFilter | boolean | null - udap_id?: StringNullableWithAggregatesFilter | string | null - redactedById?: StringNullableWithAggregatesFilter | string | null - applicantEmail?: StringNullableWithAggregatesFilter | string | null - city?: StringNullableWithAggregatesFilter | string | null - zipCode?: StringNullableWithAggregatesFilter | string | null - } - - export type Service_instructeursWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - full_name?: StringFilter | string - short_name?: StringFilter | string - email?: StringNullableFilter | string | null - tel?: StringNullableFilter | string | null - udap_id?: StringNullableFilter | string | null - } - - export type Service_instructeursOrderByWithRelationInput = { - id?: SortOrder - full_name?: SortOrder - short_name?: SortOrder - email?: SortOrderInput | SortOrder - tel?: SortOrderInput | SortOrder - udap_id?: SortOrderInput | SortOrder - } - - export type Service_instructeursWhereUniqueInput = { - id?: number - } - - export type Service_instructeursOrderByWithAggregationInput = { - id?: SortOrder - full_name?: SortOrder - short_name?: SortOrder - email?: SortOrderInput | SortOrder - tel?: SortOrderInput | SortOrder - udap_id?: SortOrderInput | SortOrder - _count?: Service_instructeursCountOrderByAggregateInput - _avg?: Service_instructeursAvgOrderByAggregateInput - _max?: Service_instructeursMaxOrderByAggregateInput - _min?: Service_instructeursMinOrderByAggregateInput - _sum?: Service_instructeursSumOrderByAggregateInput - } - - export type Service_instructeursScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - full_name?: StringWithAggregatesFilter | string - short_name?: StringWithAggregatesFilter | string - email?: StringNullableWithAggregatesFilter | string | null - tel?: StringNullableWithAggregatesFilter | string | null - udap_id?: StringNullableWithAggregatesFilter | string | null - } - - export type Tmp_picturesWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - reportId?: StringNullableFilter | string | null - createdAt?: DateTimeNullableFilter | Date | string | null - report?: XOR | null - } - - export type Tmp_picturesOrderByWithRelationInput = { - id?: SortOrder - reportId?: SortOrderInput | SortOrder - createdAt?: SortOrderInput | SortOrder - report?: ReportOrderByWithRelationInput - } - - export type Tmp_picturesWhereUniqueInput = { - id?: string - } - - export type Tmp_picturesOrderByWithAggregationInput = { - id?: SortOrder - reportId?: SortOrderInput | SortOrder - createdAt?: SortOrderInput | SortOrder - _count?: Tmp_picturesCountOrderByAggregateInput - _max?: Tmp_picturesMaxOrderByAggregateInput - _min?: Tmp_picturesMinOrderByAggregateInput - } - - export type Tmp_picturesScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - reportId?: StringNullableWithAggregatesFilter | string | null - createdAt?: DateTimeNullableWithAggregatesFilter | Date | string | null - } - - export type UdapWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - department?: StringFilter | string - completeCoords?: StringNullableFilter | string | null - visible?: BoolNullableFilter | boolean | null - name?: StringNullableFilter | string | null - address?: StringNullableFilter | string | null - zipCode?: StringNullableFilter | string | null - city?: StringNullableFilter | string | null - phone?: StringNullableFilter | string | null - email?: StringNullableFilter | string | null - marianne_text?: StringNullableFilter | string | null - drac_text?: StringNullableFilter | string | null - udap_text?: StringNullableFilter | string | null - user?: UserListRelationFilter - } - - export type UdapOrderByWithRelationInput = { - id?: SortOrder - department?: SortOrder - completeCoords?: SortOrderInput | SortOrder - visible?: SortOrderInput | SortOrder - name?: SortOrderInput | SortOrder - address?: SortOrderInput | SortOrder - zipCode?: SortOrderInput | SortOrder - city?: SortOrderInput | SortOrder - phone?: SortOrderInput | SortOrder - email?: SortOrderInput | SortOrder - marianne_text?: SortOrderInput | SortOrder - drac_text?: SortOrderInput | SortOrder - udap_text?: SortOrderInput | SortOrder - user?: UserOrderByRelationAggregateInput - } - - export type UdapWhereUniqueInput = { - id?: string - } - - export type UdapOrderByWithAggregationInput = { - id?: SortOrder - department?: SortOrder - completeCoords?: SortOrderInput | SortOrder - visible?: SortOrderInput | SortOrder - name?: SortOrderInput | SortOrder - address?: SortOrderInput | SortOrder - zipCode?: SortOrderInput | SortOrder - city?: SortOrderInput | SortOrder - phone?: SortOrderInput | SortOrder - email?: SortOrderInput | SortOrder - marianne_text?: SortOrderInput | SortOrder - drac_text?: SortOrderInput | SortOrder - udap_text?: SortOrderInput | SortOrder - _count?: UdapCountOrderByAggregateInput - _max?: UdapMaxOrderByAggregateInput - _min?: UdapMinOrderByAggregateInput - } - - export type UdapScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - department?: StringWithAggregatesFilter | string - completeCoords?: StringNullableWithAggregatesFilter | string | null - visible?: BoolNullableWithAggregatesFilter | boolean | null - name?: StringNullableWithAggregatesFilter | string | null - address?: StringNullableWithAggregatesFilter | string | null - zipCode?: StringNullableWithAggregatesFilter | string | null - city?: StringNullableWithAggregatesFilter | string | null - phone?: StringNullableWithAggregatesFilter | string | null - email?: StringNullableWithAggregatesFilter | string | null - marianne_text?: StringNullableWithAggregatesFilter | string | null - drac_text?: StringNullableWithAggregatesFilter | string | null - udap_text?: StringNullableWithAggregatesFilter | string | null - } - - export type UserWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - name?: StringFilter | string - udap_id?: StringFilter | string - delegation_delegation_createdByTouser?: DelegationListRelationFilter - delegation_delegation_delegatedToTouser?: DelegationListRelationFilter - report?: ReportListRelationFilter - udap?: XOR - } - - export type UserOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrder - udap_id?: SortOrder - delegation_delegation_createdByTouser?: DelegationOrderByRelationAggregateInput - delegation_delegation_delegatedToTouser?: DelegationOrderByRelationAggregateInput - report?: ReportOrderByRelationAggregateInput - udap?: UdapOrderByWithRelationInput - } - - export type UserWhereUniqueInput = { - id?: string - } - - export type UserOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrder - udap_id?: SortOrder - _count?: UserCountOrderByAggregateInput - _max?: UserMaxOrderByAggregateInput - _min?: UserMinOrderByAggregateInput - } - - export type UserScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - name?: StringWithAggregatesFilter | string - udap_id?: StringWithAggregatesFilter | string - } - - export type ClauseCreateInput = { - key: string - value: string - udap_id: string - text: string - hidden?: boolean | null - } - - export type ClauseUncheckedCreateInput = { - key: string - value: string - udap_id: string - text: string - hidden?: boolean | null - } - - export type ClauseUpdateInput = { - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - udap_id?: StringFieldUpdateOperationsInput | string - text?: StringFieldUpdateOperationsInput | string - hidden?: NullableBoolFieldUpdateOperationsInput | boolean | null - } - - export type ClauseUncheckedUpdateInput = { - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - udap_id?: StringFieldUpdateOperationsInput | string - text?: StringFieldUpdateOperationsInput | string - hidden?: NullableBoolFieldUpdateOperationsInput | boolean | null - } - - export type ClauseCreateManyInput = { - key: string - value: string - udap_id: string - text: string - hidden?: boolean | null - } - - export type ClauseUpdateManyMutationInput = { - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - udap_id?: StringFieldUpdateOperationsInput | string - text?: StringFieldUpdateOperationsInput | string - hidden?: NullableBoolFieldUpdateOperationsInput | boolean | null - } - - export type ClauseUncheckedUpdateManyInput = { - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - udap_id?: StringFieldUpdateOperationsInput | string - text?: StringFieldUpdateOperationsInput | string - hidden?: NullableBoolFieldUpdateOperationsInput | boolean | null - } - - export type Clause_v2CreateInput = { - id: string - key: string - value: string - position?: number | null - udap_id?: string | null - text: string - } - - export type Clause_v2UncheckedCreateInput = { - id: string - key: string - value: string - position?: number | null - udap_id?: string | null - text: string - } - - export type Clause_v2UpdateInput = { - id?: StringFieldUpdateOperationsInput | string - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - position?: NullableIntFieldUpdateOperationsInput | number | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - text?: StringFieldUpdateOperationsInput | string - } - - export type Clause_v2UncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - position?: NullableIntFieldUpdateOperationsInput | number | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - text?: StringFieldUpdateOperationsInput | string - } - - export type Clause_v2CreateManyInput = { - id: string - key: string - value: string - position?: number | null - udap_id?: string | null - text: string - } - - export type Clause_v2UpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - position?: NullableIntFieldUpdateOperationsInput | number | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - text?: StringFieldUpdateOperationsInput | string - } - - export type Clause_v2UncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - position?: NullableIntFieldUpdateOperationsInput | number | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - text?: StringFieldUpdateOperationsInput | string - } - - export type DelegationCreateInput = { - user_delegation_createdByTouser: UserCreateNestedOneWithoutDelegation_delegation_createdByTouserInput - user_delegation_delegatedToTouser: UserCreateNestedOneWithoutDelegation_delegation_delegatedToTouserInput - } - - export type DelegationUncheckedCreateInput = { - createdBy: string - delegatedTo: string - } - - export type DelegationUpdateInput = { - user_delegation_createdByTouser?: UserUpdateOneRequiredWithoutDelegation_delegation_createdByTouserNestedInput - user_delegation_delegatedToTouser?: UserUpdateOneRequiredWithoutDelegation_delegation_delegatedToTouserNestedInput - } - - export type DelegationUncheckedUpdateInput = { - createdBy?: StringFieldUpdateOperationsInput | string - delegatedTo?: StringFieldUpdateOperationsInput | string - } - - export type DelegationCreateManyInput = { - createdBy: string - delegatedTo: string - } - - export type DelegationUpdateManyMutationInput = { - - } - - export type DelegationUncheckedUpdateManyInput = { - createdBy?: StringFieldUpdateOperationsInput | string - delegatedTo?: StringFieldUpdateOperationsInput | string - } - - export type Pdf_snapshotCreateInput = { - id: string - report_id?: string | null - html?: string | null - report?: string | null - user_id?: string | null - } - - export type Pdf_snapshotUncheckedCreateInput = { - id: string - report_id?: string | null - html?: string | null - report?: string | null - user_id?: string | null - } - - export type Pdf_snapshotUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - report_id?: NullableStringFieldUpdateOperationsInput | string | null - html?: NullableStringFieldUpdateOperationsInput | string | null - report?: NullableStringFieldUpdateOperationsInput | string | null - user_id?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type Pdf_snapshotUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - report_id?: NullableStringFieldUpdateOperationsInput | string | null - html?: NullableStringFieldUpdateOperationsInput | string | null - report?: NullableStringFieldUpdateOperationsInput | string | null - user_id?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type Pdf_snapshotCreateManyInput = { - id: string - report_id?: string | null - html?: string | null - report?: string | null - user_id?: string | null - } - - export type Pdf_snapshotUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - report_id?: NullableStringFieldUpdateOperationsInput | string | null - html?: NullableStringFieldUpdateOperationsInput | string | null - report?: NullableStringFieldUpdateOperationsInput | string | null - user_id?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type Pdf_snapshotUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - report_id?: NullableStringFieldUpdateOperationsInput | string | null - html?: NullableStringFieldUpdateOperationsInput | string | null - report?: NullableStringFieldUpdateOperationsInput | string | null - user_id?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type Picture_linesCreateInput = { - id: string - pictureId?: string | null - lines: string - createdAt?: Date | string | null - } - - export type Picture_linesUncheckedCreateInput = { - id: string - pictureId?: string | null - lines: string - createdAt?: Date | string | null - } - - export type Picture_linesUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - pictureId?: NullableStringFieldUpdateOperationsInput | string | null - lines?: StringFieldUpdateOperationsInput | string - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type Picture_linesUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - pictureId?: NullableStringFieldUpdateOperationsInput | string | null - lines?: StringFieldUpdateOperationsInput | string - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type Picture_linesCreateManyInput = { - id: string - pictureId?: string | null - lines: string - createdAt?: Date | string | null - } - - export type Picture_linesUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - pictureId?: NullableStringFieldUpdateOperationsInput | string | null - lines?: StringFieldUpdateOperationsInput | string - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type Picture_linesUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - pictureId?: NullableStringFieldUpdateOperationsInput | string | null - lines?: StringFieldUpdateOperationsInput | string - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type PicturesCreateInput = { - id: string - url?: string | null - createdAt?: Date | string | null - finalUrl?: string | null - report?: ReportCreateNestedOneWithoutPicturesInput - } - - export type PicturesUncheckedCreateInput = { - id: string - reportId?: string | null - url?: string | null - createdAt?: Date | string | null - finalUrl?: string | null - } - - export type PicturesUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - url?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - finalUrl?: NullableStringFieldUpdateOperationsInput | string | null - report?: ReportUpdateOneWithoutPicturesNestedInput - } - - export type PicturesUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - reportId?: NullableStringFieldUpdateOperationsInput | string | null - url?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - finalUrl?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type PicturesCreateManyInput = { - id: string - reportId?: string | null - url?: string | null - createdAt?: Date | string | null - finalUrl?: string | null - } - - export type PicturesUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - url?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - finalUrl?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type PicturesUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - reportId?: NullableStringFieldUpdateOperationsInput | string | null - url?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - finalUrl?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type ReportCreateInput = { - id: string - title?: string | null - projectDescription?: string | null - redactedBy?: string | null - meetDate?: Date | string | null - applicantName?: string | null - applicantAddress?: string | null - projectCadastralRef?: string | null - projectSpaceType?: string | null - decision?: string | null - precisions?: string | null - contacts?: string | null - furtherInformation?: string | null - createdAt: Date | string - serviceInstructeur?: number | null - pdf?: string | null - disabled?: boolean | null - udap_id?: string | null - redactedById?: string | null - applicantEmail?: string | null - city?: string | null - zipCode?: string | null - pictures?: PicturesCreateNestedManyWithoutReportInput - user: UserCreateNestedOneWithoutReportInput - tmp_pictures?: Tmp_picturesCreateNestedManyWithoutReportInput - } - - export type ReportUncheckedCreateInput = { - id: string - title?: string | null - projectDescription?: string | null - redactedBy?: string | null - meetDate?: Date | string | null - applicantName?: string | null - applicantAddress?: string | null - projectCadastralRef?: string | null - projectSpaceType?: string | null - decision?: string | null - precisions?: string | null - contacts?: string | null - furtherInformation?: string | null - createdBy: string - createdAt: Date | string - serviceInstructeur?: number | null - pdf?: string | null - disabled?: boolean | null - udap_id?: string | null - redactedById?: string | null - applicantEmail?: string | null - city?: string | null - zipCode?: string | null - pictures?: PicturesUncheckedCreateNestedManyWithoutReportInput - tmp_pictures?: Tmp_picturesUncheckedCreateNestedManyWithoutReportInput - } - - export type ReportUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - pictures?: PicturesUpdateManyWithoutReportNestedInput - user?: UserUpdateOneRequiredWithoutReportNestedInput - tmp_pictures?: Tmp_picturesUpdateManyWithoutReportNestedInput - } - - export type ReportUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdBy?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - pictures?: PicturesUncheckedUpdateManyWithoutReportNestedInput - tmp_pictures?: Tmp_picturesUncheckedUpdateManyWithoutReportNestedInput - } - - export type ReportCreateManyInput = { - id: string - title?: string | null - projectDescription?: string | null - redactedBy?: string | null - meetDate?: Date | string | null - applicantName?: string | null - applicantAddress?: string | null - projectCadastralRef?: string | null - projectSpaceType?: string | null - decision?: string | null - precisions?: string | null - contacts?: string | null - furtherInformation?: string | null - createdBy: string - createdAt: Date | string - serviceInstructeur?: number | null - pdf?: string | null - disabled?: boolean | null - udap_id?: string | null - redactedById?: string | null - applicantEmail?: string | null - city?: string | null - zipCode?: string | null - } - - export type ReportUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type ReportUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdBy?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type Service_instructeursCreateInput = { - id: number - full_name: string - short_name: string - email?: string | null - tel?: string | null - udap_id?: string | null - } - - export type Service_instructeursUncheckedCreateInput = { - id: number - full_name: string - short_name: string - email?: string | null - tel?: string | null - udap_id?: string | null - } - - export type Service_instructeursUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - full_name?: StringFieldUpdateOperationsInput | string - short_name?: StringFieldUpdateOperationsInput | string - email?: NullableStringFieldUpdateOperationsInput | string | null - tel?: NullableStringFieldUpdateOperationsInput | string | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type Service_instructeursUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - full_name?: StringFieldUpdateOperationsInput | string - short_name?: StringFieldUpdateOperationsInput | string - email?: NullableStringFieldUpdateOperationsInput | string | null - tel?: NullableStringFieldUpdateOperationsInput | string | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type Service_instructeursCreateManyInput = { - id: number - full_name: string - short_name: string - email?: string | null - tel?: string | null - udap_id?: string | null - } - - export type Service_instructeursUpdateManyMutationInput = { - id?: IntFieldUpdateOperationsInput | number - full_name?: StringFieldUpdateOperationsInput | string - short_name?: StringFieldUpdateOperationsInput | string - email?: NullableStringFieldUpdateOperationsInput | string | null - tel?: NullableStringFieldUpdateOperationsInput | string | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type Service_instructeursUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - full_name?: StringFieldUpdateOperationsInput | string - short_name?: StringFieldUpdateOperationsInput | string - email?: NullableStringFieldUpdateOperationsInput | string | null - tel?: NullableStringFieldUpdateOperationsInput | string | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type Tmp_picturesCreateInput = { - id: string - createdAt?: Date | string | null - report?: ReportCreateNestedOneWithoutTmp_picturesInput - } - - export type Tmp_picturesUncheckedCreateInput = { - id: string - reportId?: string | null - createdAt?: Date | string | null - } - - export type Tmp_picturesUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - report?: ReportUpdateOneWithoutTmp_picturesNestedInput - } - - export type Tmp_picturesUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - reportId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type Tmp_picturesCreateManyInput = { - id: string - reportId?: string | null - createdAt?: Date | string | null - } - - export type Tmp_picturesUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type Tmp_picturesUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - reportId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type UdapCreateInput = { - id: string - department: string - completeCoords?: string | null - visible?: boolean | null - name?: string | null - address?: string | null - zipCode?: string | null - city?: string | null - phone?: string | null - email?: string | null - marianne_text?: string | null - drac_text?: string | null - udap_text?: string | null - user?: UserCreateNestedManyWithoutUdapInput - } - - export type UdapUncheckedCreateInput = { - id: string - department: string - completeCoords?: string | null - visible?: boolean | null - name?: string | null - address?: string | null - zipCode?: string | null - city?: string | null - phone?: string | null - email?: string | null - marianne_text?: string | null - drac_text?: string | null - udap_text?: string | null - user?: UserUncheckedCreateNestedManyWithoutUdapInput - } - - export type UdapUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - department?: StringFieldUpdateOperationsInput | string - completeCoords?: NullableStringFieldUpdateOperationsInput | string | null - visible?: NullableBoolFieldUpdateOperationsInput | boolean | null - name?: NullableStringFieldUpdateOperationsInput | string | null - address?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - phone?: NullableStringFieldUpdateOperationsInput | string | null - email?: NullableStringFieldUpdateOperationsInput | string | null - marianne_text?: NullableStringFieldUpdateOperationsInput | string | null - drac_text?: NullableStringFieldUpdateOperationsInput | string | null - udap_text?: NullableStringFieldUpdateOperationsInput | string | null - user?: UserUpdateManyWithoutUdapNestedInput - } - - export type UdapUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - department?: StringFieldUpdateOperationsInput | string - completeCoords?: NullableStringFieldUpdateOperationsInput | string | null - visible?: NullableBoolFieldUpdateOperationsInput | boolean | null - name?: NullableStringFieldUpdateOperationsInput | string | null - address?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - phone?: NullableStringFieldUpdateOperationsInput | string | null - email?: NullableStringFieldUpdateOperationsInput | string | null - marianne_text?: NullableStringFieldUpdateOperationsInput | string | null - drac_text?: NullableStringFieldUpdateOperationsInput | string | null - udap_text?: NullableStringFieldUpdateOperationsInput | string | null - user?: UserUncheckedUpdateManyWithoutUdapNestedInput - } - - export type UdapCreateManyInput = { - id: string - department: string - completeCoords?: string | null - visible?: boolean | null - name?: string | null - address?: string | null - zipCode?: string | null - city?: string | null - phone?: string | null - email?: string | null - marianne_text?: string | null - drac_text?: string | null - udap_text?: string | null - } - - export type UdapUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - department?: StringFieldUpdateOperationsInput | string - completeCoords?: NullableStringFieldUpdateOperationsInput | string | null - visible?: NullableBoolFieldUpdateOperationsInput | boolean | null - name?: NullableStringFieldUpdateOperationsInput | string | null - address?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - phone?: NullableStringFieldUpdateOperationsInput | string | null - email?: NullableStringFieldUpdateOperationsInput | string | null - marianne_text?: NullableStringFieldUpdateOperationsInput | string | null - drac_text?: NullableStringFieldUpdateOperationsInput | string | null - udap_text?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type UdapUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - department?: StringFieldUpdateOperationsInput | string - completeCoords?: NullableStringFieldUpdateOperationsInput | string | null - visible?: NullableBoolFieldUpdateOperationsInput | boolean | null - name?: NullableStringFieldUpdateOperationsInput | string | null - address?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - phone?: NullableStringFieldUpdateOperationsInput | string | null - email?: NullableStringFieldUpdateOperationsInput | string | null - marianne_text?: NullableStringFieldUpdateOperationsInput | string | null - drac_text?: NullableStringFieldUpdateOperationsInput | string | null - udap_text?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type UserCreateInput = { - id: string - name: string - delegation_delegation_createdByTouser?: DelegationCreateNestedManyWithoutUser_delegation_createdByTouserInput - delegation_delegation_delegatedToTouser?: DelegationCreateNestedManyWithoutUser_delegation_delegatedToTouserInput - report?: ReportCreateNestedManyWithoutUserInput - udap: UdapCreateNestedOneWithoutUserInput - } - - export type UserUncheckedCreateInput = { - id: string - name: string - udap_id: string - delegation_delegation_createdByTouser?: DelegationUncheckedCreateNestedManyWithoutUser_delegation_createdByTouserInput - delegation_delegation_delegatedToTouser?: DelegationUncheckedCreateNestedManyWithoutUser_delegation_delegatedToTouserInput - report?: ReportUncheckedCreateNestedManyWithoutUserInput - } - - export type UserUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - delegation_delegation_createdByTouser?: DelegationUpdateManyWithoutUser_delegation_createdByTouserNestedInput - delegation_delegation_delegatedToTouser?: DelegationUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput - report?: ReportUpdateManyWithoutUserNestedInput - udap?: UdapUpdateOneRequiredWithoutUserNestedInput - } - - export type UserUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - udap_id?: StringFieldUpdateOperationsInput | string - delegation_delegation_createdByTouser?: DelegationUncheckedUpdateManyWithoutUser_delegation_createdByTouserNestedInput - delegation_delegation_delegatedToTouser?: DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput - report?: ReportUncheckedUpdateManyWithoutUserNestedInput - } - - export type UserCreateManyInput = { - id: string - name: string - udap_id: string - } - - export type UserUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - } - - export type UserUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - udap_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 BoolNullableFilter = { - equals?: boolean | null - not?: NestedBoolNullableFilter | boolean | null - } - - export type SortOrderInput = { - sort: SortOrder - nulls?: NullsOrder - } - - export type ClauseKeyValueUdap_idCompoundUniqueInput = { - key: string - value: string - udap_id: string - } - - export type ClauseCountOrderByAggregateInput = { - key?: SortOrder - value?: SortOrder - udap_id?: SortOrder - text?: SortOrder - hidden?: SortOrder - } - - export type ClauseMaxOrderByAggregateInput = { - key?: SortOrder - value?: SortOrder - udap_id?: SortOrder - text?: SortOrder - hidden?: SortOrder - } - - export type ClauseMinOrderByAggregateInput = { - key?: SortOrder - value?: SortOrder - udap_id?: SortOrder - text?: SortOrder - hidden?: 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 BoolNullableWithAggregatesFilter = { - equals?: boolean | null - not?: NestedBoolNullableWithAggregatesFilter | boolean | null - _count?: NestedIntNullableFilter - _min?: NestedBoolNullableFilter - _max?: NestedBoolNullableFilter - } - - export type IntNullableFilter = { - 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 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 Clause_v2CountOrderByAggregateInput = { - id?: SortOrder - key?: SortOrder - value?: SortOrder - position?: SortOrder - udap_id?: SortOrder - text?: SortOrder - } - - export type Clause_v2AvgOrderByAggregateInput = { - position?: SortOrder - } - - export type Clause_v2MaxOrderByAggregateInput = { - id?: SortOrder - key?: SortOrder - value?: SortOrder - position?: SortOrder - udap_id?: SortOrder - text?: SortOrder - } - - export type Clause_v2MinOrderByAggregateInput = { - id?: SortOrder - key?: SortOrder - value?: SortOrder - position?: SortOrder - udap_id?: SortOrder - text?: SortOrder - } - - export type Clause_v2SumOrderByAggregateInput = { - position?: SortOrder - } - - export type IntNullableWithAggregatesFilter = { - equals?: number | null - in?: Enumerable | number | null - notIn?: Enumerable | number | null - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedIntNullableWithAggregatesFilter | number | null - _count?: NestedIntNullableFilter - _avg?: NestedFloatNullableFilter - _sum?: NestedIntNullableFilter - _min?: NestedIntNullableFilter - _max?: NestedIntNullableFilter - } - - 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 UserRelationFilter = { - is?: UserWhereInput | null - isNot?: UserWhereInput | null - } - - export type DelegationCreatedByDelegatedToCompoundUniqueInput = { - createdBy: string - delegatedTo: string - } - - export type DelegationCountOrderByAggregateInput = { - createdBy?: SortOrder - delegatedTo?: SortOrder - } - - export type DelegationMaxOrderByAggregateInput = { - createdBy?: SortOrder - delegatedTo?: SortOrder - } - - export type DelegationMinOrderByAggregateInput = { - createdBy?: SortOrder - delegatedTo?: SortOrder - } - - export type Pdf_snapshotCountOrderByAggregateInput = { - id?: SortOrder - report_id?: SortOrder - html?: SortOrder - report?: SortOrder - user_id?: SortOrder - } - - export type Pdf_snapshotMaxOrderByAggregateInput = { - id?: SortOrder - report_id?: SortOrder - html?: SortOrder - report?: SortOrder - user_id?: SortOrder - } - - export type Pdf_snapshotMinOrderByAggregateInput = { - id?: SortOrder - report_id?: SortOrder - html?: SortOrder - report?: SortOrder - user_id?: SortOrder - } - - 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 Picture_linesCountOrderByAggregateInput = { - id?: SortOrder - pictureId?: SortOrder - lines?: SortOrder - createdAt?: SortOrder - } - - export type Picture_linesMaxOrderByAggregateInput = { - id?: SortOrder - pictureId?: SortOrder - lines?: SortOrder - createdAt?: SortOrder - } - - export type Picture_linesMinOrderByAggregateInput = { - id?: SortOrder - pictureId?: SortOrder - lines?: SortOrder - createdAt?: SortOrder - } - - 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 ReportRelationFilter = { - is?: ReportWhereInput | null - isNot?: ReportWhereInput | null - } - - export type PicturesCountOrderByAggregateInput = { - id?: SortOrder - reportId?: SortOrder - url?: SortOrder - createdAt?: SortOrder - finalUrl?: SortOrder - } - - export type PicturesMaxOrderByAggregateInput = { - id?: SortOrder - reportId?: SortOrder - url?: SortOrder - createdAt?: SortOrder - finalUrl?: SortOrder - } - - export type PicturesMinOrderByAggregateInput = { - id?: SortOrder - reportId?: SortOrder - url?: SortOrder - createdAt?: SortOrder - finalUrl?: SortOrder - } - - 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 PicturesListRelationFilter = { - every?: PicturesWhereInput - some?: PicturesWhereInput - none?: PicturesWhereInput - } - - export type Tmp_picturesListRelationFilter = { - every?: Tmp_picturesWhereInput - some?: Tmp_picturesWhereInput - none?: Tmp_picturesWhereInput - } - - export type PicturesOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type Tmp_picturesOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type ReportCountOrderByAggregateInput = { - id?: SortOrder - title?: SortOrder - projectDescription?: SortOrder - redactedBy?: SortOrder - meetDate?: SortOrder - applicantName?: SortOrder - applicantAddress?: SortOrder - projectCadastralRef?: SortOrder - projectSpaceType?: SortOrder - decision?: SortOrder - precisions?: SortOrder - contacts?: SortOrder - furtherInformation?: SortOrder - createdBy?: SortOrder - createdAt?: SortOrder - serviceInstructeur?: SortOrder - pdf?: SortOrder - disabled?: SortOrder - udap_id?: SortOrder - redactedById?: SortOrder - applicantEmail?: SortOrder - city?: SortOrder - zipCode?: SortOrder - } - - export type ReportAvgOrderByAggregateInput = { - serviceInstructeur?: SortOrder - } - - export type ReportMaxOrderByAggregateInput = { - id?: SortOrder - title?: SortOrder - projectDescription?: SortOrder - redactedBy?: SortOrder - meetDate?: SortOrder - applicantName?: SortOrder - applicantAddress?: SortOrder - projectCadastralRef?: SortOrder - projectSpaceType?: SortOrder - decision?: SortOrder - precisions?: SortOrder - contacts?: SortOrder - furtherInformation?: SortOrder - createdBy?: SortOrder - createdAt?: SortOrder - serviceInstructeur?: SortOrder - pdf?: SortOrder - disabled?: SortOrder - udap_id?: SortOrder - redactedById?: SortOrder - applicantEmail?: SortOrder - city?: SortOrder - zipCode?: SortOrder - } - - export type ReportMinOrderByAggregateInput = { - id?: SortOrder - title?: SortOrder - projectDescription?: SortOrder - redactedBy?: SortOrder - meetDate?: SortOrder - applicantName?: SortOrder - applicantAddress?: SortOrder - projectCadastralRef?: SortOrder - projectSpaceType?: SortOrder - decision?: SortOrder - precisions?: SortOrder - contacts?: SortOrder - furtherInformation?: SortOrder - createdBy?: SortOrder - createdAt?: SortOrder - serviceInstructeur?: SortOrder - pdf?: SortOrder - disabled?: SortOrder - udap_id?: SortOrder - redactedById?: SortOrder - applicantEmail?: SortOrder - city?: SortOrder - zipCode?: SortOrder - } - - export type ReportSumOrderByAggregateInput = { - serviceInstructeur?: SortOrder - } - - 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 IntFilter = { - equals?: number - in?: Enumerable | number - notIn?: Enumerable | number - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedIntFilter | number - } - - export type Service_instructeursCountOrderByAggregateInput = { - id?: SortOrder - full_name?: SortOrder - short_name?: SortOrder - email?: SortOrder - tel?: SortOrder - udap_id?: SortOrder - } - - export type Service_instructeursAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type Service_instructeursMaxOrderByAggregateInput = { - id?: SortOrder - full_name?: SortOrder - short_name?: SortOrder - email?: SortOrder - tel?: SortOrder - udap_id?: SortOrder - } - - export type Service_instructeursMinOrderByAggregateInput = { - id?: SortOrder - full_name?: SortOrder - short_name?: SortOrder - email?: SortOrder - tel?: SortOrder - udap_id?: SortOrder - } - - export type Service_instructeursSumOrderByAggregateInput = { - id?: SortOrder - } - - export type IntWithAggregatesFilter = { - equals?: number - in?: Enumerable | number - notIn?: Enumerable | number - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedIntWithAggregatesFilter | number - _count?: NestedIntFilter - _avg?: NestedFloatFilter - _sum?: NestedIntFilter - _min?: NestedIntFilter - _max?: NestedIntFilter - } - - export type Tmp_picturesCountOrderByAggregateInput = { - id?: SortOrder - reportId?: SortOrder - createdAt?: SortOrder - } - - export type Tmp_picturesMaxOrderByAggregateInput = { - id?: SortOrder - reportId?: SortOrder - createdAt?: SortOrder - } - - export type Tmp_picturesMinOrderByAggregateInput = { - id?: SortOrder - reportId?: SortOrder - createdAt?: SortOrder - } - - export type UserListRelationFilter = { - every?: UserWhereInput - some?: UserWhereInput - none?: UserWhereInput - } - - export type UserOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type UdapCountOrderByAggregateInput = { - id?: SortOrder - department?: SortOrder - completeCoords?: SortOrder - visible?: SortOrder - name?: SortOrder - address?: SortOrder - zipCode?: SortOrder - city?: SortOrder - phone?: SortOrder - email?: SortOrder - marianne_text?: SortOrder - drac_text?: SortOrder - udap_text?: SortOrder - } - - export type UdapMaxOrderByAggregateInput = { - id?: SortOrder - department?: SortOrder - completeCoords?: SortOrder - visible?: SortOrder - name?: SortOrder - address?: SortOrder - zipCode?: SortOrder - city?: SortOrder - phone?: SortOrder - email?: SortOrder - marianne_text?: SortOrder - drac_text?: SortOrder - udap_text?: SortOrder - } - - export type UdapMinOrderByAggregateInput = { - id?: SortOrder - department?: SortOrder - completeCoords?: SortOrder - visible?: SortOrder - name?: SortOrder - address?: SortOrder - zipCode?: SortOrder - city?: SortOrder - phone?: SortOrder - email?: SortOrder - marianne_text?: SortOrder - drac_text?: SortOrder - udap_text?: SortOrder - } - - export type DelegationListRelationFilter = { - every?: DelegationWhereInput - some?: DelegationWhereInput - none?: DelegationWhereInput - } - - export type ReportListRelationFilter = { - every?: ReportWhereInput - some?: ReportWhereInput - none?: ReportWhereInput - } - - export type UdapRelationFilter = { - is?: UdapWhereInput | null - isNot?: UdapWhereInput | null - } - - export type DelegationOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type ReportOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type UserCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - udap_id?: SortOrder - } - - export type UserMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - udap_id?: SortOrder - } - - export type UserMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - udap_id?: SortOrder - } - - export type StringFieldUpdateOperationsInput = { - set?: string - } - - export type NullableBoolFieldUpdateOperationsInput = { - set?: boolean | null - } - - export type NullableIntFieldUpdateOperationsInput = { - set?: number | null - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type NullableStringFieldUpdateOperationsInput = { - set?: string | null - } - - export type UserCreateNestedOneWithoutDelegation_delegation_createdByTouserInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutDelegation_delegation_createdByTouserInput - connect?: UserWhereUniqueInput - } - - export type UserCreateNestedOneWithoutDelegation_delegation_delegatedToTouserInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutDelegation_delegation_delegatedToTouserInput - connect?: UserWhereUniqueInput - } - - export type UserUpdateOneRequiredWithoutDelegation_delegation_createdByTouserNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutDelegation_delegation_createdByTouserInput - upsert?: UserUpsertWithoutDelegation_delegation_createdByTouserInput - connect?: UserWhereUniqueInput - update?: XOR - } - - export type UserUpdateOneRequiredWithoutDelegation_delegation_delegatedToTouserNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutDelegation_delegation_delegatedToTouserInput - upsert?: UserUpsertWithoutDelegation_delegation_delegatedToTouserInput - connect?: UserWhereUniqueInput - update?: XOR - } - - export type NullableDateTimeFieldUpdateOperationsInput = { - set?: Date | string | null - } - - export type ReportCreateNestedOneWithoutPicturesInput = { - create?: XOR - connectOrCreate?: ReportCreateOrConnectWithoutPicturesInput - connect?: ReportWhereUniqueInput - } - - export type ReportUpdateOneWithoutPicturesNestedInput = { - create?: XOR - connectOrCreate?: ReportCreateOrConnectWithoutPicturesInput - upsert?: ReportUpsertWithoutPicturesInput - disconnect?: boolean - delete?: boolean - connect?: ReportWhereUniqueInput - update?: XOR - } - - export type PicturesCreateNestedManyWithoutReportInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: PicturesCreateManyReportInputEnvelope - connect?: Enumerable - } - - export type UserCreateNestedOneWithoutReportInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutReportInput - connect?: UserWhereUniqueInput - } - - export type Tmp_picturesCreateNestedManyWithoutReportInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: Tmp_picturesCreateManyReportInputEnvelope - connect?: Enumerable - } - - export type PicturesUncheckedCreateNestedManyWithoutReportInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: PicturesCreateManyReportInputEnvelope - connect?: Enumerable - } - - export type Tmp_picturesUncheckedCreateNestedManyWithoutReportInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: Tmp_picturesCreateManyReportInputEnvelope - connect?: Enumerable - } - - export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string - } - - export type PicturesUpdateManyWithoutReportNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: PicturesCreateManyReportInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type UserUpdateOneRequiredWithoutReportNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutReportInput - upsert?: UserUpsertWithoutReportInput - connect?: UserWhereUniqueInput - update?: XOR - } - - export type Tmp_picturesUpdateManyWithoutReportNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: Tmp_picturesCreateManyReportInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type PicturesUncheckedUpdateManyWithoutReportNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: PicturesCreateManyReportInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type Tmp_picturesUncheckedUpdateManyWithoutReportNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: Tmp_picturesCreateManyReportInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type IntFieldUpdateOperationsInput = { - set?: number - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type ReportCreateNestedOneWithoutTmp_picturesInput = { - create?: XOR - connectOrCreate?: ReportCreateOrConnectWithoutTmp_picturesInput - connect?: ReportWhereUniqueInput - } - - export type ReportUpdateOneWithoutTmp_picturesNestedInput = { - create?: XOR - connectOrCreate?: ReportCreateOrConnectWithoutTmp_picturesInput - upsert?: ReportUpsertWithoutTmp_picturesInput - disconnect?: boolean - delete?: boolean - connect?: ReportWhereUniqueInput - update?: XOR - } - - export type UserCreateNestedManyWithoutUdapInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: UserCreateManyUdapInputEnvelope - connect?: Enumerable - } - - export type UserUncheckedCreateNestedManyWithoutUdapInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: UserCreateManyUdapInputEnvelope - connect?: Enumerable - } - - export type UserUpdateManyWithoutUdapNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: UserCreateManyUdapInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type UserUncheckedUpdateManyWithoutUdapNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: UserCreateManyUdapInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type DelegationCreateNestedManyWithoutUser_delegation_createdByTouserInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: DelegationCreateManyUser_delegation_createdByTouserInputEnvelope - connect?: Enumerable - } - - export type DelegationCreateNestedManyWithoutUser_delegation_delegatedToTouserInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: DelegationCreateManyUser_delegation_delegatedToTouserInputEnvelope - connect?: Enumerable - } - - export type ReportCreateNestedManyWithoutUserInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: ReportCreateManyUserInputEnvelope - connect?: Enumerable - } - - export type UdapCreateNestedOneWithoutUserInput = { - create?: XOR - connectOrCreate?: UdapCreateOrConnectWithoutUserInput - connect?: UdapWhereUniqueInput - } - - export type DelegationUncheckedCreateNestedManyWithoutUser_delegation_createdByTouserInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: DelegationCreateManyUser_delegation_createdByTouserInputEnvelope - connect?: Enumerable - } - - export type DelegationUncheckedCreateNestedManyWithoutUser_delegation_delegatedToTouserInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: DelegationCreateManyUser_delegation_delegatedToTouserInputEnvelope - connect?: Enumerable - } - - export type ReportUncheckedCreateNestedManyWithoutUserInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: ReportCreateManyUserInputEnvelope - connect?: Enumerable - } - - export type DelegationUpdateManyWithoutUser_delegation_createdByTouserNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: DelegationCreateManyUser_delegation_createdByTouserInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type DelegationUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: DelegationCreateManyUser_delegation_delegatedToTouserInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type ReportUpdateManyWithoutUserNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: ReportCreateManyUserInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type UdapUpdateOneRequiredWithoutUserNestedInput = { - create?: XOR - connectOrCreate?: UdapCreateOrConnectWithoutUserInput - upsert?: UdapUpsertWithoutUserInput - connect?: UdapWhereUniqueInput - update?: XOR - } - - export type DelegationUncheckedUpdateManyWithoutUser_delegation_createdByTouserNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: DelegationCreateManyUser_delegation_createdByTouserInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: DelegationCreateManyUser_delegation_delegatedToTouserInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type ReportUncheckedUpdateManyWithoutUserNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: ReportCreateManyUserInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - 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 NestedBoolNullableFilter = { - equals?: boolean | null - not?: NestedBoolNullableFilter | boolean | null - } - - 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 NestedBoolNullableWithAggregatesFilter = { - equals?: boolean | null - not?: NestedBoolNullableWithAggregatesFilter | boolean | null - _count?: NestedIntNullableFilter - _min?: NestedBoolNullableFilter - _max?: NestedBoolNullableFilter - } - - 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 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 NestedIntNullableWithAggregatesFilter = { - equals?: number | null - in?: Enumerable | number | null - notIn?: Enumerable | number | null - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedIntNullableWithAggregatesFilter | number | null - _count?: NestedIntNullableFilter - _avg?: NestedFloatNullableFilter - _sum?: NestedIntNullableFilter - _min?: NestedIntNullableFilter - _max?: NestedIntNullableFilter - } - - export type NestedFloatNullableFilter = { - equals?: number | null - in?: Enumerable | number | null - notIn?: Enumerable | number | null - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedFloatNullableFilter | number | null - } - - 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 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 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 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 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 NestedIntWithAggregatesFilter = { - equals?: number - in?: Enumerable | number - notIn?: Enumerable | number - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedIntWithAggregatesFilter | number - _count?: NestedIntFilter - _avg?: NestedFloatFilter - _sum?: NestedIntFilter - _min?: NestedIntFilter - _max?: NestedIntFilter - } - - export type NestedFloatFilter = { - equals?: number - in?: Enumerable | number - notIn?: Enumerable | number - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedFloatFilter | number - } - - export type UserCreateWithoutDelegation_delegation_createdByTouserInput = { - id: string - name: string - delegation_delegation_delegatedToTouser?: DelegationCreateNestedManyWithoutUser_delegation_delegatedToTouserInput - report?: ReportCreateNestedManyWithoutUserInput - udap: UdapCreateNestedOneWithoutUserInput - } - - export type UserUncheckedCreateWithoutDelegation_delegation_createdByTouserInput = { - id: string - name: string - udap_id: string - delegation_delegation_delegatedToTouser?: DelegationUncheckedCreateNestedManyWithoutUser_delegation_delegatedToTouserInput - report?: ReportUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutDelegation_delegation_createdByTouserInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type UserCreateWithoutDelegation_delegation_delegatedToTouserInput = { - id: string - name: string - delegation_delegation_createdByTouser?: DelegationCreateNestedManyWithoutUser_delegation_createdByTouserInput - report?: ReportCreateNestedManyWithoutUserInput - udap: UdapCreateNestedOneWithoutUserInput - } - - export type UserUncheckedCreateWithoutDelegation_delegation_delegatedToTouserInput = { - id: string - name: string - udap_id: string - delegation_delegation_createdByTouser?: DelegationUncheckedCreateNestedManyWithoutUser_delegation_createdByTouserInput - report?: ReportUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutDelegation_delegation_delegatedToTouserInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type UserUpsertWithoutDelegation_delegation_createdByTouserInput = { - update: XOR - create: XOR - } - - export type UserUpdateWithoutDelegation_delegation_createdByTouserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - delegation_delegation_delegatedToTouser?: DelegationUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput - report?: ReportUpdateManyWithoutUserNestedInput - udap?: UdapUpdateOneRequiredWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutDelegation_delegation_createdByTouserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - udap_id?: StringFieldUpdateOperationsInput | string - delegation_delegation_delegatedToTouser?: DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput - report?: ReportUncheckedUpdateManyWithoutUserNestedInput - } - - export type UserUpsertWithoutDelegation_delegation_delegatedToTouserInput = { - update: XOR - create: XOR - } - - export type UserUpdateWithoutDelegation_delegation_delegatedToTouserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - delegation_delegation_createdByTouser?: DelegationUpdateManyWithoutUser_delegation_createdByTouserNestedInput - report?: ReportUpdateManyWithoutUserNestedInput - udap?: UdapUpdateOneRequiredWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutDelegation_delegation_delegatedToTouserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - udap_id?: StringFieldUpdateOperationsInput | string - delegation_delegation_createdByTouser?: DelegationUncheckedUpdateManyWithoutUser_delegation_createdByTouserNestedInput - report?: ReportUncheckedUpdateManyWithoutUserNestedInput - } - - export type ReportCreateWithoutPicturesInput = { - id: string - title?: string | null - projectDescription?: string | null - redactedBy?: string | null - meetDate?: Date | string | null - applicantName?: string | null - applicantAddress?: string | null - projectCadastralRef?: string | null - projectSpaceType?: string | null - decision?: string | null - precisions?: string | null - contacts?: string | null - furtherInformation?: string | null - createdAt: Date | string - serviceInstructeur?: number | null - pdf?: string | null - disabled?: boolean | null - udap_id?: string | null - redactedById?: string | null - applicantEmail?: string | null - city?: string | null - zipCode?: string | null - user: UserCreateNestedOneWithoutReportInput - tmp_pictures?: Tmp_picturesCreateNestedManyWithoutReportInput - } - - export type ReportUncheckedCreateWithoutPicturesInput = { - id: string - title?: string | null - projectDescription?: string | null - redactedBy?: string | null - meetDate?: Date | string | null - applicantName?: string | null - applicantAddress?: string | null - projectCadastralRef?: string | null - projectSpaceType?: string | null - decision?: string | null - precisions?: string | null - contacts?: string | null - furtherInformation?: string | null - createdBy: string - createdAt: Date | string - serviceInstructeur?: number | null - pdf?: string | null - disabled?: boolean | null - udap_id?: string | null - redactedById?: string | null - applicantEmail?: string | null - city?: string | null - zipCode?: string | null - tmp_pictures?: Tmp_picturesUncheckedCreateNestedManyWithoutReportInput - } - - export type ReportCreateOrConnectWithoutPicturesInput = { - where: ReportWhereUniqueInput - create: XOR - } - - export type ReportUpsertWithoutPicturesInput = { - update: XOR - create: XOR - } - - export type ReportUpdateWithoutPicturesInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - user?: UserUpdateOneRequiredWithoutReportNestedInput - tmp_pictures?: Tmp_picturesUpdateManyWithoutReportNestedInput - } - - export type ReportUncheckedUpdateWithoutPicturesInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdBy?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - tmp_pictures?: Tmp_picturesUncheckedUpdateManyWithoutReportNestedInput - } - - export type PicturesCreateWithoutReportInput = { - id: string - url?: string | null - createdAt?: Date | string | null - finalUrl?: string | null - } - - export type PicturesUncheckedCreateWithoutReportInput = { - id: string - url?: string | null - createdAt?: Date | string | null - finalUrl?: string | null - } - - export type PicturesCreateOrConnectWithoutReportInput = { - where: PicturesWhereUniqueInput - create: XOR - } - - export type PicturesCreateManyReportInputEnvelope = { - data: Enumerable - skipDuplicates?: boolean - } - - export type UserCreateWithoutReportInput = { - id: string - name: string - delegation_delegation_createdByTouser?: DelegationCreateNestedManyWithoutUser_delegation_createdByTouserInput - delegation_delegation_delegatedToTouser?: DelegationCreateNestedManyWithoutUser_delegation_delegatedToTouserInput - udap: UdapCreateNestedOneWithoutUserInput - } - - export type UserUncheckedCreateWithoutReportInput = { - id: string - name: string - udap_id: string - delegation_delegation_createdByTouser?: DelegationUncheckedCreateNestedManyWithoutUser_delegation_createdByTouserInput - delegation_delegation_delegatedToTouser?: DelegationUncheckedCreateNestedManyWithoutUser_delegation_delegatedToTouserInput - } - - export type UserCreateOrConnectWithoutReportInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type Tmp_picturesCreateWithoutReportInput = { - id: string - createdAt?: Date | string | null - } - - export type Tmp_picturesUncheckedCreateWithoutReportInput = { - id: string - createdAt?: Date | string | null - } - - export type Tmp_picturesCreateOrConnectWithoutReportInput = { - where: Tmp_picturesWhereUniqueInput - create: XOR - } - - export type Tmp_picturesCreateManyReportInputEnvelope = { - data: Enumerable - skipDuplicates?: boolean - } - - export type PicturesUpsertWithWhereUniqueWithoutReportInput = { - where: PicturesWhereUniqueInput - update: XOR - create: XOR - } - - export type PicturesUpdateWithWhereUniqueWithoutReportInput = { - where: PicturesWhereUniqueInput - data: XOR - } - - export type PicturesUpdateManyWithWhereWithoutReportInput = { - where: PicturesScalarWhereInput - data: XOR - } - - export type PicturesScalarWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - reportId?: StringNullableFilter | string | null - url?: StringNullableFilter | string | null - createdAt?: DateTimeNullableFilter | Date | string | null - finalUrl?: StringNullableFilter | string | null - } - - export type UserUpsertWithoutReportInput = { - update: XOR - create: XOR - } - - export type UserUpdateWithoutReportInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - delegation_delegation_createdByTouser?: DelegationUpdateManyWithoutUser_delegation_createdByTouserNestedInput - delegation_delegation_delegatedToTouser?: DelegationUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput - udap?: UdapUpdateOneRequiredWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutReportInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - udap_id?: StringFieldUpdateOperationsInput | string - delegation_delegation_createdByTouser?: DelegationUncheckedUpdateManyWithoutUser_delegation_createdByTouserNestedInput - delegation_delegation_delegatedToTouser?: DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput - } - - export type Tmp_picturesUpsertWithWhereUniqueWithoutReportInput = { - where: Tmp_picturesWhereUniqueInput - update: XOR - create: XOR - } - - export type Tmp_picturesUpdateWithWhereUniqueWithoutReportInput = { - where: Tmp_picturesWhereUniqueInput - data: XOR - } - - export type Tmp_picturesUpdateManyWithWhereWithoutReportInput = { - where: Tmp_picturesScalarWhereInput - data: XOR - } - - export type Tmp_picturesScalarWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - reportId?: StringNullableFilter | string | null - createdAt?: DateTimeNullableFilter | Date | string | null - } - - export type ReportCreateWithoutTmp_picturesInput = { - id: string - title?: string | null - projectDescription?: string | null - redactedBy?: string | null - meetDate?: Date | string | null - applicantName?: string | null - applicantAddress?: string | null - projectCadastralRef?: string | null - projectSpaceType?: string | null - decision?: string | null - precisions?: string | null - contacts?: string | null - furtherInformation?: string | null - createdAt: Date | string - serviceInstructeur?: number | null - pdf?: string | null - disabled?: boolean | null - udap_id?: string | null - redactedById?: string | null - applicantEmail?: string | null - city?: string | null - zipCode?: string | null - pictures?: PicturesCreateNestedManyWithoutReportInput - user: UserCreateNestedOneWithoutReportInput - } - - export type ReportUncheckedCreateWithoutTmp_picturesInput = { - id: string - title?: string | null - projectDescription?: string | null - redactedBy?: string | null - meetDate?: Date | string | null - applicantName?: string | null - applicantAddress?: string | null - projectCadastralRef?: string | null - projectSpaceType?: string | null - decision?: string | null - precisions?: string | null - contacts?: string | null - furtherInformation?: string | null - createdBy: string - createdAt: Date | string - serviceInstructeur?: number | null - pdf?: string | null - disabled?: boolean | null - udap_id?: string | null - redactedById?: string | null - applicantEmail?: string | null - city?: string | null - zipCode?: string | null - pictures?: PicturesUncheckedCreateNestedManyWithoutReportInput - } - - export type ReportCreateOrConnectWithoutTmp_picturesInput = { - where: ReportWhereUniqueInput - create: XOR - } - - export type ReportUpsertWithoutTmp_picturesInput = { - update: XOR - create: XOR - } - - export type ReportUpdateWithoutTmp_picturesInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - pictures?: PicturesUpdateManyWithoutReportNestedInput - user?: UserUpdateOneRequiredWithoutReportNestedInput - } - - export type ReportUncheckedUpdateWithoutTmp_picturesInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdBy?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - pictures?: PicturesUncheckedUpdateManyWithoutReportNestedInput - } - - export type UserCreateWithoutUdapInput = { - id: string - name: string - delegation_delegation_createdByTouser?: DelegationCreateNestedManyWithoutUser_delegation_createdByTouserInput - delegation_delegation_delegatedToTouser?: DelegationCreateNestedManyWithoutUser_delegation_delegatedToTouserInput - report?: ReportCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateWithoutUdapInput = { - id: string - name: string - delegation_delegation_createdByTouser?: DelegationUncheckedCreateNestedManyWithoutUser_delegation_createdByTouserInput - delegation_delegation_delegatedToTouser?: DelegationUncheckedCreateNestedManyWithoutUser_delegation_delegatedToTouserInput - report?: ReportUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutUdapInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type UserCreateManyUdapInputEnvelope = { - data: Enumerable - skipDuplicates?: boolean - } - - export type UserUpsertWithWhereUniqueWithoutUdapInput = { - where: UserWhereUniqueInput - update: XOR - create: XOR - } - - export type UserUpdateWithWhereUniqueWithoutUdapInput = { - where: UserWhereUniqueInput - data: XOR - } - - export type UserUpdateManyWithWhereWithoutUdapInput = { - where: UserScalarWhereInput - data: XOR - } - - export type UserScalarWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - name?: StringFilter | string - udap_id?: StringFilter | string - } - - export type DelegationCreateWithoutUser_delegation_createdByTouserInput = { - user_delegation_delegatedToTouser: UserCreateNestedOneWithoutDelegation_delegation_delegatedToTouserInput - } - - export type DelegationUncheckedCreateWithoutUser_delegation_createdByTouserInput = { - delegatedTo: string - } - - export type DelegationCreateOrConnectWithoutUser_delegation_createdByTouserInput = { - where: DelegationWhereUniqueInput - create: XOR - } - - export type DelegationCreateManyUser_delegation_createdByTouserInputEnvelope = { - data: Enumerable - skipDuplicates?: boolean - } - - export type DelegationCreateWithoutUser_delegation_delegatedToTouserInput = { - user_delegation_createdByTouser: UserCreateNestedOneWithoutDelegation_delegation_createdByTouserInput - } - - export type DelegationUncheckedCreateWithoutUser_delegation_delegatedToTouserInput = { - createdBy: string - } - - export type DelegationCreateOrConnectWithoutUser_delegation_delegatedToTouserInput = { - where: DelegationWhereUniqueInput - create: XOR - } - - export type DelegationCreateManyUser_delegation_delegatedToTouserInputEnvelope = { - data: Enumerable - skipDuplicates?: boolean - } - - export type ReportCreateWithoutUserInput = { - id: string - title?: string | null - projectDescription?: string | null - redactedBy?: string | null - meetDate?: Date | string | null - applicantName?: string | null - applicantAddress?: string | null - projectCadastralRef?: string | null - projectSpaceType?: string | null - decision?: string | null - precisions?: string | null - contacts?: string | null - furtherInformation?: string | null - createdAt: Date | string - serviceInstructeur?: number | null - pdf?: string | null - disabled?: boolean | null - udap_id?: string | null - redactedById?: string | null - applicantEmail?: string | null - city?: string | null - zipCode?: string | null - pictures?: PicturesCreateNestedManyWithoutReportInput - tmp_pictures?: Tmp_picturesCreateNestedManyWithoutReportInput - } - - export type ReportUncheckedCreateWithoutUserInput = { - id: string - title?: string | null - projectDescription?: string | null - redactedBy?: string | null - meetDate?: Date | string | null - applicantName?: string | null - applicantAddress?: string | null - projectCadastralRef?: string | null - projectSpaceType?: string | null - decision?: string | null - precisions?: string | null - contacts?: string | null - furtherInformation?: string | null - createdAt: Date | string - serviceInstructeur?: number | null - pdf?: string | null - disabled?: boolean | null - udap_id?: string | null - redactedById?: string | null - applicantEmail?: string | null - city?: string | null - zipCode?: string | null - pictures?: PicturesUncheckedCreateNestedManyWithoutReportInput - tmp_pictures?: Tmp_picturesUncheckedCreateNestedManyWithoutReportInput - } - - export type ReportCreateOrConnectWithoutUserInput = { - where: ReportWhereUniqueInput - create: XOR - } - - export type ReportCreateManyUserInputEnvelope = { - data: Enumerable - skipDuplicates?: boolean - } - - export type UdapCreateWithoutUserInput = { - id: string - department: string - completeCoords?: string | null - visible?: boolean | null - name?: string | null - address?: string | null - zipCode?: string | null - city?: string | null - phone?: string | null - email?: string | null - marianne_text?: string | null - drac_text?: string | null - udap_text?: string | null - } - - export type UdapUncheckedCreateWithoutUserInput = { - id: string - department: string - completeCoords?: string | null - visible?: boolean | null - name?: string | null - address?: string | null - zipCode?: string | null - city?: string | null - phone?: string | null - email?: string | null - marianne_text?: string | null - drac_text?: string | null - udap_text?: string | null - } - - export type UdapCreateOrConnectWithoutUserInput = { - where: UdapWhereUniqueInput - create: XOR - } - - export type DelegationUpsertWithWhereUniqueWithoutUser_delegation_createdByTouserInput = { - where: DelegationWhereUniqueInput - update: XOR - create: XOR - } - - export type DelegationUpdateWithWhereUniqueWithoutUser_delegation_createdByTouserInput = { - where: DelegationWhereUniqueInput - data: XOR - } - - export type DelegationUpdateManyWithWhereWithoutUser_delegation_createdByTouserInput = { - where: DelegationScalarWhereInput - data: XOR - } - - export type DelegationScalarWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - createdBy?: StringFilter | string - delegatedTo?: StringFilter | string - } - - export type DelegationUpsertWithWhereUniqueWithoutUser_delegation_delegatedToTouserInput = { - where: DelegationWhereUniqueInput - update: XOR - create: XOR - } - - export type DelegationUpdateWithWhereUniqueWithoutUser_delegation_delegatedToTouserInput = { - where: DelegationWhereUniqueInput - data: XOR - } - - export type DelegationUpdateManyWithWhereWithoutUser_delegation_delegatedToTouserInput = { - where: DelegationScalarWhereInput - data: XOR - } - - export type ReportUpsertWithWhereUniqueWithoutUserInput = { - where: ReportWhereUniqueInput - update: XOR - create: XOR - } - - export type ReportUpdateWithWhereUniqueWithoutUserInput = { - where: ReportWhereUniqueInput - data: XOR - } - - export type ReportUpdateManyWithWhereWithoutUserInput = { - where: ReportScalarWhereInput - data: XOR - } - - export type ReportScalarWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - title?: StringNullableFilter | string | null - projectDescription?: StringNullableFilter | string | null - redactedBy?: StringNullableFilter | string | null - meetDate?: DateTimeNullableFilter | Date | string | null - applicantName?: StringNullableFilter | string | null - applicantAddress?: StringNullableFilter | string | null - projectCadastralRef?: StringNullableFilter | string | null - projectSpaceType?: StringNullableFilter | string | null - decision?: StringNullableFilter | string | null - precisions?: StringNullableFilter | string | null - contacts?: StringNullableFilter | string | null - furtherInformation?: StringNullableFilter | string | null - createdBy?: StringFilter | string - createdAt?: DateTimeFilter | Date | string - serviceInstructeur?: IntNullableFilter | number | null - pdf?: StringNullableFilter | string | null - disabled?: BoolNullableFilter | boolean | null - udap_id?: StringNullableFilter | string | null - redactedById?: StringNullableFilter | string | null - applicantEmail?: StringNullableFilter | string | null - city?: StringNullableFilter | string | null - zipCode?: StringNullableFilter | string | null - } - - export type UdapUpsertWithoutUserInput = { - update: XOR - create: XOR - } - - export type UdapUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - department?: StringFieldUpdateOperationsInput | string - completeCoords?: NullableStringFieldUpdateOperationsInput | string | null - visible?: NullableBoolFieldUpdateOperationsInput | boolean | null - name?: NullableStringFieldUpdateOperationsInput | string | null - address?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - phone?: NullableStringFieldUpdateOperationsInput | string | null - email?: NullableStringFieldUpdateOperationsInput | string | null - marianne_text?: NullableStringFieldUpdateOperationsInput | string | null - drac_text?: NullableStringFieldUpdateOperationsInput | string | null - udap_text?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type UdapUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - department?: StringFieldUpdateOperationsInput | string - completeCoords?: NullableStringFieldUpdateOperationsInput | string | null - visible?: NullableBoolFieldUpdateOperationsInput | boolean | null - name?: NullableStringFieldUpdateOperationsInput | string | null - address?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - phone?: NullableStringFieldUpdateOperationsInput | string | null - email?: NullableStringFieldUpdateOperationsInput | string | null - marianne_text?: NullableStringFieldUpdateOperationsInput | string | null - drac_text?: NullableStringFieldUpdateOperationsInput | string | null - udap_text?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type PicturesCreateManyReportInput = { - id: string - url?: string | null - createdAt?: Date | string | null - finalUrl?: string | null - } - - export type Tmp_picturesCreateManyReportInput = { - id: string - createdAt?: Date | string | null - } - - export type PicturesUpdateWithoutReportInput = { - id?: StringFieldUpdateOperationsInput | string - url?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - finalUrl?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type PicturesUncheckedUpdateWithoutReportInput = { - id?: StringFieldUpdateOperationsInput | string - url?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - finalUrl?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type PicturesUncheckedUpdateManyWithoutPicturesInput = { - id?: StringFieldUpdateOperationsInput | string - url?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - finalUrl?: NullableStringFieldUpdateOperationsInput | string | null - } - - export type Tmp_picturesUpdateWithoutReportInput = { - id?: StringFieldUpdateOperationsInput | string - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type Tmp_picturesUncheckedUpdateWithoutReportInput = { - id?: StringFieldUpdateOperationsInput | string - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type Tmp_picturesUncheckedUpdateManyWithoutTmp_picturesInput = { - id?: StringFieldUpdateOperationsInput | string - createdAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type UserCreateManyUdapInput = { - id: string - name: string - } - - export type UserUpdateWithoutUdapInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - delegation_delegation_createdByTouser?: DelegationUpdateManyWithoutUser_delegation_createdByTouserNestedInput - delegation_delegation_delegatedToTouser?: DelegationUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput - report?: ReportUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutUdapInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - delegation_delegation_createdByTouser?: DelegationUncheckedUpdateManyWithoutUser_delegation_createdByTouserNestedInput - delegation_delegation_delegatedToTouser?: DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput - report?: ReportUncheckedUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - } - - export type DelegationCreateManyUser_delegation_createdByTouserInput = { - delegatedTo: string - } - - export type DelegationCreateManyUser_delegation_delegatedToTouserInput = { - createdBy: string - } - - export type ReportCreateManyUserInput = { - id: string - title?: string | null - projectDescription?: string | null - redactedBy?: string | null - meetDate?: Date | string | null - applicantName?: string | null - applicantAddress?: string | null - projectCadastralRef?: string | null - projectSpaceType?: string | null - decision?: string | null - precisions?: string | null - contacts?: string | null - furtherInformation?: string | null - createdAt: Date | string - serviceInstructeur?: number | null - pdf?: string | null - disabled?: boolean | null - udap_id?: string | null - redactedById?: string | null - applicantEmail?: string | null - city?: string | null - zipCode?: string | null - } - - export type DelegationUpdateWithoutUser_delegation_createdByTouserInput = { - user_delegation_delegatedToTouser?: UserUpdateOneRequiredWithoutDelegation_delegation_delegatedToTouserNestedInput - } - - export type DelegationUncheckedUpdateWithoutUser_delegation_createdByTouserInput = { - delegatedTo?: StringFieldUpdateOperationsInput | string - } - - export type DelegationUncheckedUpdateManyWithoutDelegation_delegation_createdByTouserInput = { - delegatedTo?: StringFieldUpdateOperationsInput | string - } - - export type DelegationUpdateWithoutUser_delegation_delegatedToTouserInput = { - user_delegation_createdByTouser?: UserUpdateOneRequiredWithoutDelegation_delegation_createdByTouserNestedInput - } - - export type DelegationUncheckedUpdateWithoutUser_delegation_delegatedToTouserInput = { - createdBy?: StringFieldUpdateOperationsInput | string - } - - export type DelegationUncheckedUpdateManyWithoutDelegation_delegation_delegatedToTouserInput = { - createdBy?: StringFieldUpdateOperationsInput | string - } - - export type ReportUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - pictures?: PicturesUpdateManyWithoutReportNestedInput - tmp_pictures?: Tmp_picturesUpdateManyWithoutReportNestedInput - } - - export type ReportUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - pictures?: PicturesUncheckedUpdateManyWithoutReportNestedInput - tmp_pictures?: Tmp_picturesUncheckedUpdateManyWithoutReportNestedInput - } - - export type ReportUncheckedUpdateManyWithoutReportInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - projectDescription?: NullableStringFieldUpdateOperationsInput | string | null - redactedBy?: NullableStringFieldUpdateOperationsInput | string | null - meetDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - applicantName?: NullableStringFieldUpdateOperationsInput | string | null - applicantAddress?: NullableStringFieldUpdateOperationsInput | string | null - projectCadastralRef?: NullableStringFieldUpdateOperationsInput | string | null - projectSpaceType?: NullableStringFieldUpdateOperationsInput | string | null - decision?: NullableStringFieldUpdateOperationsInput | string | null - precisions?: NullableStringFieldUpdateOperationsInput | string | null - contacts?: NullableStringFieldUpdateOperationsInput | string | null - furtherInformation?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - serviceInstructeur?: NullableIntFieldUpdateOperationsInput | number | null - pdf?: NullableStringFieldUpdateOperationsInput | string | null - disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null - udap_id?: NullableStringFieldUpdateOperationsInput | string | null - redactedById?: NullableStringFieldUpdateOperationsInput | string | null - applicantEmail?: NullableStringFieldUpdateOperationsInput | string | null - city?: NullableStringFieldUpdateOperationsInput | string | null - zipCode?: NullableStringFieldUpdateOperationsInput | string | null - } - - - - /** - * 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 deleted file mode 100644 index 10251fc4..00000000 --- a/packages/electric-client/src/generated/client/runtime/library.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@prisma/client/runtime'; \ No newline at end of file diff --git a/packages/electric-client/src/generated/typebox/atdatabases_migrations_applied.ts b/packages/electric-client/src/generated/typebox/atdatabases_migrations_applied.ts deleted file mode 100644 index 7f39e70e..00000000 --- a/packages/electric-client/src/generated/typebox/atdatabases_migrations_applied.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const atdatabases_migrations_applied = Type.Object({ - id: Type.Integer(), - index: Type.Number(), - name: Type.String(), - script: Type.String(), - applied_at: Type.String(), - ignored_error: Type.Optional(Type.String()), - obsolete: Type.Boolean(), -}); - -export type atdatabases_migrations_appliedType = Static< - typeof atdatabases_migrations_applied ->; diff --git a/packages/electric-client/src/generated/typebox/atdatabases_migrations_appliedInput.ts b/packages/electric-client/src/generated/typebox/atdatabases_migrations_appliedInput.ts deleted file mode 100644 index af0ae2cf..00000000 --- a/packages/electric-client/src/generated/typebox/atdatabases_migrations_appliedInput.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const atdatabases_migrations_appliedInput = Type.Object({ - id: Type.Optional(Type.Integer()), - index: Type.Number(), - name: Type.String(), - script: Type.String(), - applied_at: Type.String(), - ignored_error: Type.Optional(Type.String()), - obsolete: Type.Boolean(), -}); - -export type atdatabases_migrations_appliedInputType = Static< - typeof atdatabases_migrations_appliedInput ->; diff --git a/packages/electric-client/src/generated/typebox/atdatabases_migrations_version.ts b/packages/electric-client/src/generated/typebox/atdatabases_migrations_version.ts deleted file mode 100644 index d6f56ad7..00000000 --- a/packages/electric-client/src/generated/typebox/atdatabases_migrations_version.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const atdatabases_migrations_version = Type.Object({ - id: Type.Number(), - version: Type.Optional(Type.String()), -}); - -export type atdatabases_migrations_versionType = Static< - typeof atdatabases_migrations_version ->; diff --git a/packages/electric-client/src/generated/typebox/atdatabases_migrations_versionInput.ts b/packages/electric-client/src/generated/typebox/atdatabases_migrations_versionInput.ts deleted file mode 100644 index 860bfdee..00000000 --- a/packages/electric-client/src/generated/typebox/atdatabases_migrations_versionInput.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const atdatabases_migrations_versionInput = Type.Object({ - id: Type.Number(), - version: Type.Optional(Type.String()), -}); - -export type atdatabases_migrations_versionInputType = Static< - typeof atdatabases_migrations_versionInput ->; diff --git a/packages/electric-client/src/generated/typebox/chip.ts b/packages/electric-client/src/generated/typebox/chip.ts deleted file mode 100644 index 2c18638b..00000000 --- a/packages/electric-client/src/generated/typebox/chip.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const chip = Type.Object({ - key: Type.String(), - value: Type.String(), - udap_id: Type.String(), - text: Type.String(), -}); - -export type chipType = Static; diff --git a/packages/electric-client/src/generated/typebox/chipInput.ts b/packages/electric-client/src/generated/typebox/chipInput.ts deleted file mode 100644 index e60351d3..00000000 --- a/packages/electric-client/src/generated/typebox/chipInput.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const chipInput = Type.Object({ - key: Type.String(), - value: Type.String(), - udap_id: Type.String(), - text: Type.String(), -}); - -export type chipInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/chips.ts b/packages/electric-client/src/generated/typebox/chips.ts deleted file mode 100644 index d29055d9..00000000 --- a/packages/electric-client/src/generated/typebox/chips.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const chips = Type.Object({ - key: Type.String(), - value: Type.String(), - udap_id: Type.String(), - text: Type.String(), -}); - -export type chipsType = Static; diff --git a/packages/electric-client/src/generated/typebox/chipsInput.ts b/packages/electric-client/src/generated/typebox/chipsInput.ts deleted file mode 100644 index a7df1aa2..00000000 --- a/packages/electric-client/src/generated/typebox/chipsInput.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const chipsInput = Type.Object({ - key: Type.String(), - value: Type.String(), - udap_id: Type.String(), - text: Type.String(), -}); - -export type chipsInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/clause.ts b/packages/electric-client/src/generated/typebox/clause.ts deleted file mode 100644 index b323e6fc..00000000 --- a/packages/electric-client/src/generated/typebox/clause.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const clause = Type.Object({ - key: Type.String(), - value: Type.String(), - udap_id: Type.String(), - text: Type.String(), - hidden: Type.Optional(Type.Boolean()), -}); - -export type clauseType = Static; diff --git a/packages/electric-client/src/generated/typebox/clauseInput.ts b/packages/electric-client/src/generated/typebox/clauseInput.ts deleted file mode 100644 index bf8c3d2b..00000000 --- a/packages/electric-client/src/generated/typebox/clauseInput.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const clauseInput = Type.Object({ - key: Type.String(), - value: Type.String(), - udap_id: Type.String(), - text: Type.String(), - hidden: Type.Optional(Type.Boolean()), -}); - -export type clauseInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/clause_v2.ts b/packages/electric-client/src/generated/typebox/clause_v2.ts deleted file mode 100644 index 4cbb381d..00000000 --- a/packages/electric-client/src/generated/typebox/clause_v2.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const clause_v2 = Type.Object({ - id: Type.String(), - key: Type.String(), - value: Type.String(), - position: Type.Optional(Type.Number()), - udap_id: Type.Optional(Type.String()), - text: Type.String(), -}); - -export type clause_v2Type = Static; diff --git a/packages/electric-client/src/generated/typebox/clause_v2Input.ts b/packages/electric-client/src/generated/typebox/clause_v2Input.ts deleted file mode 100644 index 09c23d9f..00000000 --- a/packages/electric-client/src/generated/typebox/clause_v2Input.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const clause_v2Input = Type.Object({ - id: Type.String(), - key: Type.String(), - value: Type.String(), - position: Type.Optional(Type.Number()), - udap_id: Type.Optional(Type.String()), - text: Type.String(), -}); - -export type clause_v2InputType = Static; diff --git a/packages/electric-client/src/generated/typebox/delegation.ts b/packages/electric-client/src/generated/typebox/delegation.ts deleted file mode 100644 index ef48fed3..00000000 --- a/packages/electric-client/src/generated/typebox/delegation.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const delegation = Type.Object({ - createdBy: Type.String(), - delegatedTo: Type.String(), - user_delegation_createdByTouser: Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - }), - user_delegation_delegatedToTouser: Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - }), -}); - -export type delegationType = Static; diff --git a/packages/electric-client/src/generated/typebox/delegationInput.ts b/packages/electric-client/src/generated/typebox/delegationInput.ts deleted file mode 100644 index 7a14b660..00000000 --- a/packages/electric-client/src/generated/typebox/delegationInput.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const delegationInput = Type.Object({ - createdBy: Type.String(), - delegatedTo: Type.String(), - user_delegation_createdByTouser: Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - }), - user_delegation_delegatedToTouser: Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - }), -}); - -export type delegationInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/delegations.ts b/packages/electric-client/src/generated/typebox/delegations.ts deleted file mode 100644 index 2522e945..00000000 --- a/packages/electric-client/src/generated/typebox/delegations.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const delegations = Type.Object({ - createdBy: Type.String(), - delegatedTo: Type.String(), -}); - -export type delegationsType = Static; diff --git a/packages/electric-client/src/generated/typebox/delegationsInput.ts b/packages/electric-client/src/generated/typebox/delegationsInput.ts deleted file mode 100644 index fc11544a..00000000 --- a/packages/electric-client/src/generated/typebox/delegationsInput.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const delegationsInput = Type.Object({ - createdBy: Type.String(), - delegatedTo: Type.String(), -}); - -export type delegationsInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/index.ts b/packages/electric-client/src/generated/typebox/index.ts deleted file mode 100644 index 65f33d80..00000000 --- a/packages/electric-client/src/generated/typebox/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -export * from './atdatabases_migrations_applied'; -export * from './atdatabases_migrations_appliedInput'; -export * from './atdatabases_migrations_version'; -export * from './atdatabases_migrations_versionInput'; -export * from './clause'; -export * from './clauseInput'; -export * from './report'; -export * from './reportInput'; -export * from './delegation'; -export * from './delegationInput'; -export * from './udap'; -export * from './udapInput'; -export * from './user'; -export * from './userInput'; -export * from './whitelist'; -export * from './whitelistInput'; -export * from './internal_user'; -export * from './internal_userInput'; -export * from './service_instructeurs'; -export * from './service_instructeursInput'; -export * from './clause_v2'; -export * from './clause_v2Input'; -export * from './pdf_snapshot'; -export * from './pdf_snapshotInput'; -export * from './pictures'; -export * from './picturesInput'; -export * from './tmp_pictures'; -export * from './tmp_picturesInput'; -export * from './picture_lines'; -export * from './picture_linesInput'; diff --git a/packages/electric-client/src/generated/typebox/internal_user.ts b/packages/electric-client/src/generated/typebox/internal_user.ts deleted file mode 100644 index 6c055550..00000000 --- a/packages/electric-client/src/generated/typebox/internal_user.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const internal_user = Type.Object({ - id: Type.String(), - email: Type.String(), - role: Type.String(), - password: Type.String(), - temporaryLink: Type.Optional(Type.String()), - temporaryLinkExpiresAt: Type.Optional(Type.String()), - userId: Type.String(), - user: Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - }), -}); - -export type internal_userType = Static; diff --git a/packages/electric-client/src/generated/typebox/internal_userInput.ts b/packages/electric-client/src/generated/typebox/internal_userInput.ts deleted file mode 100644 index ce7e81d9..00000000 --- a/packages/electric-client/src/generated/typebox/internal_userInput.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const internal_userInput = Type.Object({ - id: Type.String(), - email: Type.String(), - role: Type.String(), - password: Type.String(), - temporaryLink: Type.Optional(Type.String()), - temporaryLinkExpiresAt: Type.Optional(Type.String()), - userId: Type.String(), - user: Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - }), -}); - -export type internal_userInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/pdf_snapshot.ts b/packages/electric-client/src/generated/typebox/pdf_snapshot.ts deleted file mode 100644 index 693209d3..00000000 --- a/packages/electric-client/src/generated/typebox/pdf_snapshot.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const pdf_snapshot = Type.Object({ - id: Type.String(), - report_id: Type.Optional(Type.String()), - html: Type.Optional(Type.String()), - report: Type.Optional(Type.String()), - user_id: Type.Optional(Type.String()), -}); - -export type pdf_snapshotType = Static; diff --git a/packages/electric-client/src/generated/typebox/pdf_snapshotInput.ts b/packages/electric-client/src/generated/typebox/pdf_snapshotInput.ts deleted file mode 100644 index df4da339..00000000 --- a/packages/electric-client/src/generated/typebox/pdf_snapshotInput.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const pdf_snapshotInput = Type.Object({ - id: Type.String(), - report_id: Type.Optional(Type.String()), - html: Type.Optional(Type.String()), - report: Type.Optional(Type.String()), - user_id: Type.Optional(Type.String()), -}); - -export type pdf_snapshotInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/picture_lines.ts b/packages/electric-client/src/generated/typebox/picture_lines.ts deleted file mode 100644 index 11b908eb..00000000 --- a/packages/electric-client/src/generated/typebox/picture_lines.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const picture_lines = Type.Object({ - id: Type.String(), - pictureId: Type.Optional(Type.String()), - lines: Type.String(), - createdAt: Type.Optional(Type.String()), - pictures: Type.Optional( - Type.Object({ - id: Type.String(), - reportId: Type.Optional(Type.String()), - url: Type.Optional(Type.String()), - createdAt: Type.Optional(Type.String()), - finalUrl: Type.Optional(Type.String()), - }) - ), -}); - -export type picture_linesType = Static; diff --git a/packages/electric-client/src/generated/typebox/picture_linesInput.ts b/packages/electric-client/src/generated/typebox/picture_linesInput.ts deleted file mode 100644 index 2cdae0db..00000000 --- a/packages/electric-client/src/generated/typebox/picture_linesInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const picture_linesInput = Type.Object({ - id: Type.String(), - pictureId: Type.Optional(Type.String()), - lines: Type.String(), - createdAt: Type.Optional(Type.String()), - pictures: Type.Optional( - Type.Object({ - id: Type.String(), - reportId: Type.Optional(Type.String()), - url: Type.Optional(Type.String()), - createdAt: Type.Optional(Type.String()), - finalUrl: Type.Optional(Type.String()), - }) - ), -}); - -export type picture_linesInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/pictures.ts b/packages/electric-client/src/generated/typebox/pictures.ts deleted file mode 100644 index e1125026..00000000 --- a/packages/electric-client/src/generated/typebox/pictures.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const pictures = Type.Object({ - id: Type.String(), - reportId: Type.Optional(Type.String()), - url: Type.Optional(Type.String()), - createdAt: Type.Optional(Type.String()), - finalUrl: Type.Optional(Type.String()), - picture_lines: Type.Array( - Type.Object({ - id: Type.String(), - pictureId: Type.Optional(Type.String()), - lines: Type.String(), - createdAt: Type.Optional(Type.String()), - }) - ), - report: Type.Optional( - Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - projectDescription: Type.Optional(Type.String()), - redactedBy: Type.Optional(Type.String()), - meetDate: Type.Optional(Type.String()), - applicantName: Type.Optional(Type.String()), - applicantAddress: Type.Optional(Type.String()), - projectCadastralRef: Type.Optional(Type.String()), - projectSpaceType: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - furtherInformation: Type.Optional(Type.String()), - createdBy: Type.String(), - createdAt: Type.String(), - serviceInstructeur: Type.Optional(Type.Number()), - pdf: Type.Optional(Type.String()), - disabled: Type.Optional(Type.Boolean()), - udap_id: Type.Optional(Type.String()), - redactedById: Type.Optional(Type.String()), - applicantEmail: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - }) - ), -}); - -export type picturesType = Static; diff --git a/packages/electric-client/src/generated/typebox/picturesInput.ts b/packages/electric-client/src/generated/typebox/picturesInput.ts deleted file mode 100644 index 51b025eb..00000000 --- a/packages/electric-client/src/generated/typebox/picturesInput.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const picturesInput = Type.Object({ - id: Type.String(), - reportId: Type.Optional(Type.String()), - url: Type.Optional(Type.String()), - createdAt: Type.Optional(Type.String()), - finalUrl: Type.Optional(Type.String()), - picture_lines: Type.Array( - Type.Object({ - id: Type.String(), - pictureId: Type.Optional(Type.String()), - lines: Type.String(), - createdAt: Type.Optional(Type.String()), - }) - ), - report: Type.Optional( - Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - projectDescription: Type.Optional(Type.String()), - redactedBy: Type.Optional(Type.String()), - meetDate: Type.Optional(Type.String()), - applicantName: Type.Optional(Type.String()), - applicantAddress: Type.Optional(Type.String()), - projectCadastralRef: Type.Optional(Type.String()), - projectSpaceType: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - furtherInformation: Type.Optional(Type.String()), - createdBy: Type.String(), - createdAt: Type.String(), - serviceInstructeur: Type.Optional(Type.Number()), - pdf: Type.Optional(Type.String()), - disabled: Type.Optional(Type.Boolean()), - udap_id: Type.Optional(Type.String()), - redactedById: Type.Optional(Type.String()), - applicantEmail: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - }) - ), -}); - -export type picturesInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/report.ts b/packages/electric-client/src/generated/typebox/report.ts deleted file mode 100644 index 1c0bc842..00000000 --- a/packages/electric-client/src/generated/typebox/report.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const report = Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - projectDescription: Type.Optional(Type.String()), - redactedBy: Type.Optional(Type.String()), - meetDate: Type.Optional(Type.String()), - applicantName: Type.Optional(Type.String()), - applicantAddress: Type.Optional(Type.String()), - projectCadastralRef: Type.Optional(Type.String()), - projectSpaceType: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - furtherInformation: Type.Optional(Type.String()), - createdBy: Type.String(), - createdAt: Type.String(), - serviceInstructeur: Type.Optional(Type.Number()), - pdf: Type.Optional(Type.String()), - disabled: Type.Optional(Type.Boolean()), - udap_id: Type.Optional(Type.String()), - redactedById: Type.Optional(Type.String()), - applicantEmail: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - pictures: Type.Array( - Type.Object({ - id: Type.String(), - reportId: Type.Optional(Type.String()), - url: Type.Optional(Type.String()), - createdAt: Type.Optional(Type.String()), - finalUrl: Type.Optional(Type.String()), - }) - ), - user: Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - }), - tmp_pictures: Type.Array( - Type.Object({ - id: Type.String(), - reportId: Type.Optional(Type.String()), - createdAt: Type.Optional(Type.String()), - }) - ), -}); - -export type reportType = Static; diff --git a/packages/electric-client/src/generated/typebox/reportInput.ts b/packages/electric-client/src/generated/typebox/reportInput.ts deleted file mode 100644 index 40f7e6c2..00000000 --- a/packages/electric-client/src/generated/typebox/reportInput.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const reportInput = Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - projectDescription: Type.Optional(Type.String()), - redactedBy: Type.Optional(Type.String()), - meetDate: Type.Optional(Type.String()), - applicantName: Type.Optional(Type.String()), - applicantAddress: Type.Optional(Type.String()), - projectCadastralRef: Type.Optional(Type.String()), - projectSpaceType: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - furtherInformation: Type.Optional(Type.String()), - createdBy: Type.String(), - createdAt: Type.String(), - serviceInstructeur: Type.Optional(Type.Number()), - pdf: Type.Optional(Type.String()), - disabled: Type.Optional(Type.Boolean()), - udap_id: Type.Optional(Type.String()), - redactedById: Type.Optional(Type.String()), - applicantEmail: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - pictures: Type.Array( - Type.Object({ - id: Type.String(), - reportId: Type.Optional(Type.String()), - url: Type.Optional(Type.String()), - createdAt: Type.Optional(Type.String()), - finalUrl: Type.Optional(Type.String()), - }) - ), - user: Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - }), - tmp_pictures: Type.Array( - Type.Object({ - id: Type.String(), - reportId: Type.Optional(Type.String()), - createdAt: Type.Optional(Type.String()), - }) - ), -}); - -export type reportInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/report_to_chip.ts b/packages/electric-client/src/generated/typebox/report_to_chip.ts deleted file mode 100644 index cd67bc65..00000000 --- a/packages/electric-client/src/generated/typebox/report_to_chip.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const report_to_chip = Type.Object({ - id: Type.String(), - report_id: Type.String(), - chip_id: Type.String(), - chip: Type.Object({ - id: Type.String(), - label: Type.String(), - value: Type.String(), - }), - report: Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - project_description: Type.Optional(Type.String()), - redacted_by: Type.Optional(Type.String()), - meet_date: Type.Optional(Type.String()), - applicant_name: Type.Optional(Type.String()), - applicant_address: Type.Optional(Type.String()), - project_cadastral_ref: Type.Optional(Type.String()), - project_space_type: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - further_information: Type.Optional(Type.String()), - created_by_id: Type.String(), - created_by_username: Type.String(), - created_at: Type.String(), - service_instructeur: Type.Optional(Type.String()), - }), -}); - -export type report_to_chipType = Static; diff --git a/packages/electric-client/src/generated/typebox/report_to_chipInput.ts b/packages/electric-client/src/generated/typebox/report_to_chipInput.ts deleted file mode 100644 index d71986b2..00000000 --- a/packages/electric-client/src/generated/typebox/report_to_chipInput.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const report_to_chipInput = Type.Object({ - id: Type.String(), - report_id: Type.String(), - chip_id: Type.String(), - chip: Type.Object({ - id: Type.String(), - label: Type.String(), - value: Type.String(), - }), - report: Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - project_description: Type.Optional(Type.String()), - redacted_by: Type.Optional(Type.String()), - meet_date: Type.Optional(Type.String()), - applicant_name: Type.Optional(Type.String()), - applicant_address: Type.Optional(Type.String()), - project_cadastral_ref: Type.Optional(Type.String()), - project_space_type: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - further_information: Type.Optional(Type.String()), - created_by_id: Type.String(), - created_by_username: Type.String(), - created_at: Type.String(), - service_instructeur: Type.Optional(Type.String()), - }), -}); - -export type report_to_chipInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/report_to_clause.ts b/packages/electric-client/src/generated/typebox/report_to_clause.ts deleted file mode 100644 index 2a6fe52a..00000000 --- a/packages/electric-client/src/generated/typebox/report_to_clause.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const report_to_clause = Type.Object({ - id: Type.String(), - reportId: Type.String(), - clauseId: Type.String(), - clause: Type.Object({ - id: Type.String(), - label: Type.String(), - value: Type.String(), - }), - report: Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - projectDescription: Type.Optional(Type.String()), - redactedBy: Type.Optional(Type.String()), - meetDate: Type.Optional(Type.String()), - applicantName: Type.Optional(Type.String()), - applicantAddress: Type.Optional(Type.String()), - projectCadastralRef: Type.Optional(Type.String()), - projectSpaceType: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - furtherInformation: Type.Optional(Type.String()), - createdBy: Type.String(), - createdAt: Type.String(), - serviceInstructeur: Type.Optional(Type.Number()), - pdf: Type.Optional(Type.String()), - disabled: Type.Optional(Type.Boolean()), - udap_id: Type.Optional(Type.String()), - }), -}); - -export type report_to_clauseType = Static; diff --git a/packages/electric-client/src/generated/typebox/report_to_clauseInput.ts b/packages/electric-client/src/generated/typebox/report_to_clauseInput.ts deleted file mode 100644 index e5c9115e..00000000 --- a/packages/electric-client/src/generated/typebox/report_to_clauseInput.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const report_to_clauseInput = Type.Object({ - id: Type.String(), - reportId: Type.String(), - clauseId: Type.String(), - clause: Type.Object({ - id: Type.String(), - label: Type.String(), - value: Type.String(), - }), - report: Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - projectDescription: Type.Optional(Type.String()), - redactedBy: Type.Optional(Type.String()), - meetDate: Type.Optional(Type.String()), - applicantName: Type.Optional(Type.String()), - applicantAddress: Type.Optional(Type.String()), - projectCadastralRef: Type.Optional(Type.String()), - projectSpaceType: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - furtherInformation: Type.Optional(Type.String()), - createdBy: Type.String(), - createdAt: Type.String(), - serviceInstructeur: Type.Optional(Type.Number()), - pdf: Type.Optional(Type.String()), - disabled: Type.Optional(Type.Boolean()), - udap_id: Type.Optional(Type.String()), - }), -}); - -export type report_to_clauseInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/service_instructeurs.ts b/packages/electric-client/src/generated/typebox/service_instructeurs.ts deleted file mode 100644 index 0c5e7960..00000000 --- a/packages/electric-client/src/generated/typebox/service_instructeurs.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const service_instructeurs = Type.Object({ - id: Type.Number(), - full_name: Type.String(), - short_name: Type.String(), - email: Type.Optional(Type.String()), - tel: Type.Optional(Type.String()), - udap_id: Type.Optional(Type.String()), -}); - -export type service_instructeursType = Static; diff --git a/packages/electric-client/src/generated/typebox/service_instructeursInput.ts b/packages/electric-client/src/generated/typebox/service_instructeursInput.ts deleted file mode 100644 index aa13d295..00000000 --- a/packages/electric-client/src/generated/typebox/service_instructeursInput.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const service_instructeursInput = Type.Object({ - id: Type.Number(), - full_name: Type.String(), - short_name: Type.String(), - email: Type.Optional(Type.String()), - tel: Type.Optional(Type.String()), - udap_id: Type.Optional(Type.String()), -}); - -export type service_instructeursInputType = Static< - typeof service_instructeursInput ->; diff --git a/packages/electric-client/src/generated/typebox/tmp_pictures.ts b/packages/electric-client/src/generated/typebox/tmp_pictures.ts deleted file mode 100644 index 54957735..00000000 --- a/packages/electric-client/src/generated/typebox/tmp_pictures.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const tmp_pictures = Type.Object({ - id: Type.String(), - reportId: Type.Optional(Type.String()), - createdAt: Type.Optional(Type.String()), - report: Type.Optional( - Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - projectDescription: Type.Optional(Type.String()), - redactedBy: Type.Optional(Type.String()), - meetDate: Type.Optional(Type.String()), - applicantName: Type.Optional(Type.String()), - applicantAddress: Type.Optional(Type.String()), - projectCadastralRef: Type.Optional(Type.String()), - projectSpaceType: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - furtherInformation: Type.Optional(Type.String()), - createdBy: Type.String(), - createdAt: Type.String(), - serviceInstructeur: Type.Optional(Type.Number()), - pdf: Type.Optional(Type.String()), - disabled: Type.Optional(Type.Boolean()), - udap_id: Type.Optional(Type.String()), - redactedById: Type.Optional(Type.String()), - applicantEmail: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - }) - ), -}); - -export type tmp_picturesType = Static; diff --git a/packages/electric-client/src/generated/typebox/tmp_picturesInput.ts b/packages/electric-client/src/generated/typebox/tmp_picturesInput.ts deleted file mode 100644 index 96b22563..00000000 --- a/packages/electric-client/src/generated/typebox/tmp_picturesInput.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const tmp_picturesInput = Type.Object({ - id: Type.String(), - reportId: Type.Optional(Type.String()), - createdAt: Type.Optional(Type.String()), - report: Type.Optional( - Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - projectDescription: Type.Optional(Type.String()), - redactedBy: Type.Optional(Type.String()), - meetDate: Type.Optional(Type.String()), - applicantName: Type.Optional(Type.String()), - applicantAddress: Type.Optional(Type.String()), - projectCadastralRef: Type.Optional(Type.String()), - projectSpaceType: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - furtherInformation: Type.Optional(Type.String()), - createdBy: Type.String(), - createdAt: Type.String(), - serviceInstructeur: Type.Optional(Type.Number()), - pdf: Type.Optional(Type.String()), - disabled: Type.Optional(Type.Boolean()), - udap_id: Type.Optional(Type.String()), - redactedById: Type.Optional(Type.String()), - applicantEmail: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - }) - ), -}); - -export type tmp_picturesInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/udap.ts b/packages/electric-client/src/generated/typebox/udap.ts deleted file mode 100644 index 373d55e7..00000000 --- a/packages/electric-client/src/generated/typebox/udap.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const udap = Type.Object({ - id: Type.String(), - department: Type.String(), - completeCoords: Type.Optional(Type.String()), - visible: Type.Optional(Type.Boolean()), - name: Type.Optional(Type.String()), - address: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - phone: Type.Optional(Type.String()), - email: Type.Optional(Type.String()), - marianne_text: Type.Optional(Type.String()), - drac_text: Type.Optional(Type.String()), - udap_text: Type.Optional(Type.String()), - user: Type.Array( - Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - }) - ), -}); - -export type udapType = Static; diff --git a/packages/electric-client/src/generated/typebox/udapInput.ts b/packages/electric-client/src/generated/typebox/udapInput.ts deleted file mode 100644 index 8868c2c2..00000000 --- a/packages/electric-client/src/generated/typebox/udapInput.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const udapInput = Type.Object({ - id: Type.String(), - department: Type.String(), - completeCoords: Type.Optional(Type.String()), - visible: Type.Optional(Type.Boolean()), - name: Type.Optional(Type.String()), - address: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - phone: Type.Optional(Type.String()), - email: Type.Optional(Type.String()), - marianne_text: Type.Optional(Type.String()), - drac_text: Type.Optional(Type.String()), - udap_text: Type.Optional(Type.String()), - user: Type.Array( - Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - }) - ), -}); - -export type udapInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/udaps.ts b/packages/electric-client/src/generated/typebox/udaps.ts deleted file mode 100644 index b2c37ab3..00000000 --- a/packages/electric-client/src/generated/typebox/udaps.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const udaps = Type.Object({ - id: Type.String(), - department: Type.String(), - complete_coords: Type.Optional(Type.String()), - visible: Type.Optional(Type.Boolean()), - name: Type.Optional(Type.String()), - address: Type.Optional(Type.String()), - zip_code: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - phone: Type.Optional(Type.String()), - email: Type.Optional(Type.String()), - users: Type.Array( - Type.Object({ - id: Type.String(), - email: Type.String(), - name: Type.String(), - temporaryLink: Type.Optional(Type.String()), - temporaryLinkExpiresAt: Type.Optional(Type.String()), - password: Type.String(), - udap_id: Type.Optional(Type.String()), - }) - ), -}); - -export type udapsType = Static; diff --git a/packages/electric-client/src/generated/typebox/udapsInput.ts b/packages/electric-client/src/generated/typebox/udapsInput.ts deleted file mode 100644 index c5f15c42..00000000 --- a/packages/electric-client/src/generated/typebox/udapsInput.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const udapsInput = Type.Object({ - id: Type.String(), - department: Type.String(), - complete_coords: Type.Optional(Type.String()), - visible: Type.Optional(Type.Boolean()), - name: Type.Optional(Type.String()), - address: Type.Optional(Type.String()), - zip_code: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - phone: Type.Optional(Type.String()), - email: Type.Optional(Type.String()), - users: Type.Array( - Type.Object({ - id: Type.String(), - email: Type.String(), - name: Type.String(), - temporaryLink: Type.Optional(Type.String()), - temporaryLinkExpiresAt: Type.Optional(Type.String()), - password: Type.String(), - udap_id: Type.Optional(Type.String()), - }) - ), -}); - -export type udapsInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/user.ts b/packages/electric-client/src/generated/typebox/user.ts deleted file mode 100644 index 4ddd3a6d..00000000 --- a/packages/electric-client/src/generated/typebox/user.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const user = Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - delegation_delegation_createdByTouser: Type.Array( - Type.Object({ - createdBy: Type.String(), - delegatedTo: Type.String(), - }) - ), - delegation_delegation_delegatedToTouser: Type.Array( - Type.Object({ - createdBy: Type.String(), - delegatedTo: Type.String(), - }) - ), - internal_user: Type.Array( - Type.Object({ - id: Type.String(), - email: Type.String(), - role: Type.String(), - password: Type.String(), - temporaryLink: Type.Optional(Type.String()), - temporaryLinkExpiresAt: Type.Optional(Type.String()), - userId: Type.String(), - }) - ), - report: Type.Array( - Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - projectDescription: Type.Optional(Type.String()), - redactedBy: Type.Optional(Type.String()), - meetDate: Type.Optional(Type.String()), - applicantName: Type.Optional(Type.String()), - applicantAddress: Type.Optional(Type.String()), - projectCadastralRef: Type.Optional(Type.String()), - projectSpaceType: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - furtherInformation: Type.Optional(Type.String()), - createdBy: Type.String(), - createdAt: Type.String(), - serviceInstructeur: Type.Optional(Type.Number()), - pdf: Type.Optional(Type.String()), - disabled: Type.Optional(Type.Boolean()), - udap_id: Type.Optional(Type.String()), - redactedById: Type.Optional(Type.String()), - applicantEmail: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - }) - ), - udap: Type.Object({ - id: Type.String(), - department: Type.String(), - completeCoords: Type.Optional(Type.String()), - visible: Type.Optional(Type.Boolean()), - name: Type.Optional(Type.String()), - address: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - phone: Type.Optional(Type.String()), - email: Type.Optional(Type.String()), - marianne_text: Type.Optional(Type.String()), - drac_text: Type.Optional(Type.String()), - udap_text: Type.Optional(Type.String()), - }), -}); - -export type userType = Static; diff --git a/packages/electric-client/src/generated/typebox/userInput.ts b/packages/electric-client/src/generated/typebox/userInput.ts deleted file mode 100644 index bebd0869..00000000 --- a/packages/electric-client/src/generated/typebox/userInput.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const userInput = Type.Object({ - id: Type.String(), - name: Type.String(), - udap_id: Type.String(), - delegation_delegation_createdByTouser: Type.Array( - Type.Object({ - createdBy: Type.String(), - delegatedTo: Type.String(), - }) - ), - delegation_delegation_delegatedToTouser: Type.Array( - Type.Object({ - createdBy: Type.String(), - delegatedTo: Type.String(), - }) - ), - internal_user: Type.Array( - Type.Object({ - id: Type.String(), - email: Type.String(), - role: Type.String(), - password: Type.String(), - temporaryLink: Type.Optional(Type.String()), - temporaryLinkExpiresAt: Type.Optional(Type.String()), - userId: Type.String(), - }) - ), - report: Type.Array( - Type.Object({ - id: Type.String(), - title: Type.Optional(Type.String()), - projectDescription: Type.Optional(Type.String()), - redactedBy: Type.Optional(Type.String()), - meetDate: Type.Optional(Type.String()), - applicantName: Type.Optional(Type.String()), - applicantAddress: Type.Optional(Type.String()), - projectCadastralRef: Type.Optional(Type.String()), - projectSpaceType: Type.Optional(Type.String()), - decision: Type.Optional(Type.String()), - precisions: Type.Optional(Type.String()), - contacts: Type.Optional(Type.String()), - furtherInformation: Type.Optional(Type.String()), - createdBy: Type.String(), - createdAt: Type.String(), - serviceInstructeur: Type.Optional(Type.Number()), - pdf: Type.Optional(Type.String()), - disabled: Type.Optional(Type.Boolean()), - udap_id: Type.Optional(Type.String()), - redactedById: Type.Optional(Type.String()), - applicantEmail: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - }) - ), - udap: Type.Object({ - id: Type.String(), - department: Type.String(), - completeCoords: Type.Optional(Type.String()), - visible: Type.Optional(Type.Boolean()), - name: Type.Optional(Type.String()), - address: Type.Optional(Type.String()), - zipCode: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - phone: Type.Optional(Type.String()), - email: Type.Optional(Type.String()), - marianne_text: Type.Optional(Type.String()), - drac_text: Type.Optional(Type.String()), - udap_text: Type.Optional(Type.String()), - }), -}); - -export type userInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/users.ts b/packages/electric-client/src/generated/typebox/users.ts deleted file mode 100644 index 9b12061a..00000000 --- a/packages/electric-client/src/generated/typebox/users.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const users = Type.Object({ - id: Type.String(), - email: Type.String(), - name: Type.String(), - temporaryLink: Type.Optional(Type.String()), - temporaryLinkExpiresAt: Type.Optional(Type.String()), - password: Type.String(), - udap_id: Type.Optional(Type.String()), - udaps: Type.Optional( - Type.Object({ - id: Type.String(), - department: Type.String(), - complete_coords: Type.Optional(Type.String()), - visible: Type.Optional(Type.Boolean()), - name: Type.Optional(Type.String()), - address: Type.Optional(Type.String()), - zip_code: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - phone: Type.Optional(Type.String()), - email: Type.Optional(Type.String()), - }) - ), -}); - -export type usersType = Static; diff --git a/packages/electric-client/src/generated/typebox/usersInput.ts b/packages/electric-client/src/generated/typebox/usersInput.ts deleted file mode 100644 index c9a76e6d..00000000 --- a/packages/electric-client/src/generated/typebox/usersInput.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const usersInput = Type.Object({ - id: Type.String(), - email: Type.String(), - name: Type.String(), - temporaryLink: Type.Optional(Type.String()), - temporaryLinkExpiresAt: Type.Optional(Type.String()), - password: Type.String(), - udap_id: Type.Optional(Type.String()), - udaps: Type.Optional( - Type.Object({ - id: Type.String(), - department: Type.String(), - complete_coords: Type.Optional(Type.String()), - visible: Type.Optional(Type.Boolean()), - name: Type.Optional(Type.String()), - address: Type.Optional(Type.String()), - zip_code: Type.Optional(Type.String()), - city: Type.Optional(Type.String()), - phone: Type.Optional(Type.String()), - email: Type.Optional(Type.String()), - }) - ), -}); - -export type usersInputType = Static; diff --git a/packages/electric-client/src/generated/typebox/whitelist.ts b/packages/electric-client/src/generated/typebox/whitelist.ts deleted file mode 100644 index 69262362..00000000 --- a/packages/electric-client/src/generated/typebox/whitelist.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const whitelist = Type.Object({ - email: Type.String(), -}); - -export type whitelistType = Static; diff --git a/packages/electric-client/src/generated/typebox/whitelistInput.ts b/packages/electric-client/src/generated/typebox/whitelistInput.ts deleted file mode 100644 index c9845cd7..00000000 --- a/packages/electric-client/src/generated/typebox/whitelistInput.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Type, Static } from "@sinclair/typebox"; - -export const whitelistInput = Type.Object({ - email: Type.String(), -}); - -export type whitelistInputType = Static; diff --git a/packages/electric-client/src/index.ts b/packages/electric-client/src/index.ts deleted file mode 100644 index 29841759..00000000 --- a/packages/electric-client/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./generated/client"; diff --git a/packages/electric-client/tsconfig.json b/packages/electric-client/tsconfig.json deleted file mode 100644 index 6d859a46..00000000 --- a/packages/electric-client/tsconfig.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "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 816fad6e..40b1c71b 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -15,22 +15,23 @@ "dsfr": "copy-dsfr-to-public && pnpm panda-ds", "icons": "only-include-used-icons", "panda-ds": "vite-node ./scripts/generatePandaDS.ts", - "panda-ds:dev": "vite-node --watch ./scripts/generatePandaDS.ts", - "client:generate": "pnpm electric-sql generate && pnpm client:complete", - "client:complete": "vite-node ./scripts/completePrismaClient.ts" + "panda-ds:dev": "vite-node --watch ./scripts/generatePandaDS.ts" }, "dependencies": { "@ark-ui/anatomy": "^3.0.0", "@ark-ui/react": "^2.2.3", "@codegouvfr/react-dsfr": "^1.9.2", - "@cr-vif/electric-client": "workspace:*", "@cr-vif/pdf": "workspace:*", "@emotion/react": "^11.11.4", "@emotion/server": "^11.11.0", "@emotion/styled": "^11.11.0", "@gouvfr/dsfr-chart": "^1.0.0", + "@journeyapps/wa-sqlite": "^0.4.2", "@mikecousins/react-pdf": "^7.1.0", "@mui/material": "^5.15.15", + "@powersync/kysely-driver": "^1.0.0", + "@powersync/react": "^1.5.1", + "@powersync/web": "^1.10.2", "@prisma/client": "^4.8.1", "@rawwee/react-pdf-html": "^1.0.2", "@react-pdf/renderer": "^4.0.0", @@ -51,9 +52,10 @@ "browser-image-compression": "^2.0.2", "buffer": "^6.0.3", "date-fns": "^3.6.0", - "electric-sql": "^0.12.1", "idb-keyval": "^6.2.1", "install": "^0.13.0", + "js-logger": "^1.6.1", + "kysely": "^0.27.4", "npm": "^10.5.0", "ofetch": "^1.3.4", "pastable": "^2.2.1", diff --git a/packages/frontend/src/api.gen.ts b/packages/frontend/src/api.gen.ts index 0a16c35b..aa2781c8 100644 --- a/packages/frontend/src/api.gen.ts +++ b/packages/frontend/src/api.gen.ts @@ -10,31 +10,10 @@ export namespace Endpoints { method: "POST"; path: "/api/create-user"; parameters: { - body: { name: string; udap_id: string; email: string; password: string }; + body: { email: string; password: string; name: string; udap_id: string }; }; response: { - user?: - | { - id: string; - name: string; - udap_id: string; - udap: { - id: string; - department: string; - completeCoords?: string | undefined; - visible?: boolean | undefined; - name?: string | undefined; - address?: string | undefined; - zipCode?: string | undefined; - city?: string | undefined; - phone?: string | undefined; - email?: string | undefined; - marianne_text?: string | undefined; - drac_text?: string | undefined; - udap_text?: string | undefined; - }; - } - | undefined; + user?: { id: string; name: string; udap_id: string; udap: unknown } | undefined; token: string; expiresAt: string; refreshToken: string; @@ -47,28 +26,7 @@ export namespace Endpoints { body: { email: string; password: string }; }; response: { - user?: - | { - id: string; - name: string; - udap_id: string; - udap: { - id: string; - department: string; - completeCoords?: string | undefined; - visible?: boolean | undefined; - name?: string | undefined; - address?: string | undefined; - zipCode?: string | undefined; - city?: string | undefined; - phone?: string | undefined; - email?: string | undefined; - marianne_text?: string | undefined; - drac_text?: string | undefined; - udap_text?: string | undefined; - }; - } - | undefined; + user?: { id: string; name: string; udap_id: string; udap: unknown } | undefined; token: string; expiresAt: string; refreshToken: string; @@ -81,28 +39,7 @@ export namespace Endpoints { query: { token: string; refreshToken: string }; }; response: { - user?: - | { - id: string; - name: string; - udap_id: string; - udap: { - id: string; - department: string; - completeCoords?: string | undefined; - visible?: boolean | undefined; - name?: string | undefined; - address?: string | undefined; - zipCode?: string | undefined; - city?: string | undefined; - phone?: string | undefined; - email?: string | undefined; - marianne_text?: string | undefined; - drac_text?: string | undefined; - udap_text?: string | undefined; - }; - } - | undefined; + user?: { id: string; name: string; udap_id: string; udap: unknown } | undefined; token: string; expiresAt: string; refreshToken: string; @@ -162,8 +99,9 @@ export namespace Endpoints { method: "POST"; path: "/api/upload/picture/{pictureId}/lines"; parameters: { - query: { reportId: string }; path: { pictureId: string }; + + body: { lines: Array<{ points: Array<{ x: number; y: number }>; color: string }> }; }; response: string; }; @@ -183,6 +121,21 @@ export namespace Endpoints { }; response: Partial<{}>; }; + export type post_ApiuploadData = { + method: "POST"; + path: "/api/upload-data"; + parameters: { + body: { + op_id: number; + tx_id?: number | Schemas.null | Array | undefined; + id: string; + type: string; + op: string; + data?: unknown | undefined; + }; + }; + response: Partial<{}>; + }; // } @@ -197,6 +150,7 @@ export type EndpointByMethod = { "/api/upload/image": Endpoints.post_Apiuploadimage; "/api/upload/picture/{pictureId}/lines": Endpoints.post_ApiuploadpicturePictureIdlines; "/api/pdf/report": Endpoints.post_Apipdfreport; + "/api/upload-data": Endpoints.post_ApiuploadData; }; get: { "/api/refresh-token": Endpoints.get_ApirefreshToken; diff --git a/packages/frontend/src/components/AppBanner.tsx b/packages/frontend/src/components/AppBanner.tsx index 62fd57ef..6407ec9b 100644 --- a/packages/frontend/src/components/AppBanner.tsx +++ b/packages/frontend/src/components/AppBanner.tsx @@ -1 +1,15 @@ -export const AppBanner = () => {}; +import { styled } from "#styled-system/jsx"; +import { useStatus } from "@powersync/react"; +import { PropsWithChildren } from "react"; + +export const AppBanner = ({ children }: PropsWithChildren) => { + const powerSyncStatus = useStatus(); + + const status = powerSyncStatus.connected + ? powerSyncStatus.dataFlowStatus.downloading || powerSyncStatus.dataFlowStatus.uploading + ? "saving" + : "saved" + : "offline"; + + return {children}; +}; diff --git a/packages/frontend/src/components/Banner.tsx b/packages/frontend/src/components/Banner.tsx index 750d83c7..4cde1cc2 100644 --- a/packages/frontend/src/components/Banner.tsx +++ b/packages/frontend/src/components/Banner.tsx @@ -5,7 +5,7 @@ import { forwardRef } from "react"; export const Banner = forwardRef( ({ status, className, ...props }, ref) => { - return

; + return
; }, ); diff --git a/packages/frontend/src/components/ReportSearch.tsx b/packages/frontend/src/components/ReportSearch.tsx index 5846c97a..7e19dcdf 100644 --- a/packages/frontend/src/components/ReportSearch.tsx +++ b/packages/frontend/src/components/ReportSearch.tsx @@ -2,12 +2,12 @@ import { Center, Stack, styled } from "#styled-system/jsx"; import { css, cx } from "#styled-system/css"; import Input from "@codegouvfr/react-dsfr/Input"; import { useState } from "react"; -import { useLiveQuery } from "electric-sql/react"; -import { db } from "../db"; +import { db } from "../db/db"; import { Spinner } from "./Spinner"; import noResultsImage from "../assets/noResults.svg"; import { ReportList } from "../features/ReportList"; import { useUser } from "../contexts/AuthContext"; +import { useDbQuery } from "../db/db"; export const ReportSearch = ({ inputProps, @@ -40,38 +40,55 @@ const isNullOrContains = (field: string, search: string) => { }; const useSearchResultsQuery = (search: string, additionnalWhere: { [key: string]: any } = {}) => { - return useLiveQuery( - db.report.liveMany({ - where: { - OR: [ - isNullOrContains("title", search), - isNullOrContains("redactedBy", search), - isNullOrContains("applicantName", search), - isNullOrContains("applicantAddress", search), - isNullOrContains("city", search), - isNullOrContains("zipCode", search), - ], - disabled: false, - ...additionnalWhere, - }, - include: { - user: true, - }, - }), + return useDbQuery( + db + .selectFrom("report") + .where((eb) => + eb.or([ + eb("title", "like", `%${search}%`), + eb("redactedBy", "like", `%${search}%`), + eb("applicantName", "like", `%${search}%`), + eb("applicantAddress", "like", `%${search}%`), + eb("city", "like", `%${search}%`), + eb("zipCode", "like", `%${search}%`), + ]), + ) + .leftJoin("user", "user.id", "report.createdBy") + .selectAll(["report"]) + .orderBy("createdAt desc") + .select(["user.name as createdByName"]), ); + // return useLiveQuery( + // db.report.liveMany({ + // where: { + // OR: [ + // isNullOrContains("title", search), + // isNullOrContains("redactedBy", search), + // isNullOrContains("applicantName", search), + // isNullOrContains("applicantAddress", search), + // isNullOrContains("city", search), + // isNullOrContains("zipCode", search), + // ], + // disabled: false, + // ...additionnalWhere, + // }, + // include: { + // user: true, + // }, + // }), + // ); }; export const SearchResults = ({ search, hideEmpty }: { search: string; hideEmpty?: boolean }) => { const query = useSearchResultsQuery(search); const user = useUser()!; const isEmpty = search === ""; - const isLoading = !query.updatedAt; if (isEmpty) { return null; } - if (isLoading) { + if (query.isLoading) { return (
@@ -79,15 +96,15 @@ export const SearchResults = ({ search, hideEmpty }: { search: string; hideEmpty ); } - const { results } = query; - const noResults = !results || results.length === 0; + const { data } = query; + const noResults = !data || data.length === 0; if (noResults) { return ; } - const myReports = results.filter((report) => report.createdBy === user.id); - const otherReports = results.filter((report) => report.createdBy !== user.id); + const myReports = data.filter((report) => report.createdBy === user.id); + const otherReports = data.filter((report) => report.createdBy !== user.id); return (
diff --git a/packages/frontend/src/components/SyncForm.tsx b/packages/frontend/src/components/SyncForm.tsx index 87907a0f..0c4abfe3 100644 --- a/packages/frontend/src/components/SyncForm.tsx +++ b/packages/frontend/src/components/SyncForm.tsx @@ -1,20 +1,18 @@ -import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { db } from "../db"; +import { useMutation } from "@tanstack/react-query"; +import { db } from "../db/db"; import { type UseFormReturn, useWatch } from "react-hook-form"; import useDebounce from "react-use/lib/useDebounce"; import { Banner } from "./Banner"; -import { useNavigate, useRouter } from "@tanstack/react-router"; +import { useNavigate } from "@tanstack/react-router"; import Button from "@codegouvfr/react-dsfr/Button"; import { Center, Flex, styled } from "#styled-system/jsx"; import { fr } from "@codegouvfr/react-dsfr"; import { sva, cx, css } from "#styled-system/css"; -import { useNetworkState } from "react-use"; import { useIntersectionObserver } from "../hooks/useIntersectionObserver"; import Input from "@codegouvfr/react-dsfr/Input"; -import { Report } from "@cr-vif/electric-client/frontend"; -import { useEffect } from "react"; -import { ElectricStatus, useElectricStatus } from "../contexts/AuthContext"; import { useIsFormDisabled } from "../features/DisabledContext"; +import { Report } from "../db/AppSchema"; +import { useAppStatus } from "../hooks/useAppStatus"; export function SyncFormBanner({ form, baseObject }: { form: UseFormReturn; baseObject: Record }) { const newObject = useWatch({ control: form.control }); @@ -28,11 +26,6 @@ export function SyncFormBanner({ form, baseObject }: { form: UseFormReturn navigate({ to: "/" }); - // const goBack = () => router.history.back(); - const { online } = useNetworkState(); - - const status = !online ? "offline" : Object.keys(diff).length ? "pending" : "saved"; - const formStatus = useStatus(status); const { ref, isIntersecting } = useIntersectionObserver({ threshold: 0.999999, @@ -43,9 +36,11 @@ export function SyncFormBanner({ form, baseObject }: { form: UseFormReturn - +
{isCollapsed ? newObject.title : "Titre compte-rendu :"} - + {/*
*/} - + {isCollapsed ? ( <> @@ -111,7 +106,7 @@ export function SyncFormBanner({ form, baseObject }: { form: UseFormReturn {newObject.title} - + ) : null} @@ -120,27 +115,8 @@ export function SyncFormBanner({ form, baseObject }: { form: UseFormReturn = { - error: "offline", - loading: "pending", - pending: "pending", - idle: "offline", - success: "saved", -}; - -export const useStatus = (overrideStatus?: SyncFormStatus) => { - const electricStatus = useElectricStatus(); - if (electricStatus === "error" || overrideStatus === "offline") return "offline"; - - const formStatus = electricStatusToStatus[electricStatus]; - - if (formStatus === "pending") return "pending"; - - return overrideStatus || formStatus; -}; - -export const Status = ({ status, className }: { status?: SyncFormStatus; className?: string }) => { - const formStatus = useStatus(status); +export const Status = ({ className }: { status?: SyncFormStatus; className?: string }) => { + const status = useAppStatus(); return ( - {messages[formStatus]} + {messages[status]} ); }; @@ -257,12 +233,9 @@ export type SyncFormStatus = "offline" | "pending" | "saved" | "saving"; async function syncObject(id: string, diff: Record) { if (!Object.keys(diff).length) return; - console.log("saving", diff); + console.log("saving", id, diff); - await db.report.update({ - where: { id }, - data: diff, - }); + await db.updateTable("report").where("id", "=", id).set(diff).execute(); } function isPrimitive(value: any) { diff --git a/packages/frontend/src/components/chips/ContactChips.tsx b/packages/frontend/src/components/chips/ContactChips.tsx index 70ad6118..5f869a99 100644 --- a/packages/frontend/src/components/chips/ContactChips.tsx +++ b/packages/frontend/src/components/chips/ContactChips.tsx @@ -1,8 +1,8 @@ import { useFormContext, useWatch } from "react-hook-form"; -import type { Report } from "@cr-vif/electric-client/frontend"; import { ChipGroup, type ChipGroupOption } from "../Chip"; import { FlexProps } from "#styled-system/jsx"; import { useChipOptions } from "../../features/chips/useChipOptions"; +import { Report } from "../../db/AppSchema"; export const ContactChips = (props: FlexProps & { disabled?: boolean }) => { const form = useFormContext(); diff --git a/packages/frontend/src/components/chips/DecisionChips.tsx b/packages/frontend/src/components/chips/DecisionChips.tsx index 8f6b2448..2f56af92 100644 --- a/packages/frontend/src/components/chips/DecisionChips.tsx +++ b/packages/frontend/src/components/chips/DecisionChips.tsx @@ -1,10 +1,10 @@ import { useFormContext, useWatch } from "react-hook-form"; -import type { Report } from "@cr-vif/electric-client/frontend"; import { ChipGroup, type ChipGroupOption } from "../Chip"; import { useChipOptions } from "../../features/chips/useChipOptions"; +import { Report } from "../../db/AppSchema"; export const DecisionChips = ({ disabled }: { disabled?: boolean }) => { - const form = useFormContext(); + const form = useFormContext(); const selected = useWatch({ control: form.control, name: "decision" }); const value = selected ? [selected] : []; diff --git a/packages/frontend/src/components/chips/FurtherInfoChips.tsx b/packages/frontend/src/components/chips/FurtherInfoChips.tsx index 2122f148..364f4247 100644 --- a/packages/frontend/src/components/chips/FurtherInfoChips.tsx +++ b/packages/frontend/src/components/chips/FurtherInfoChips.tsx @@ -1,8 +1,8 @@ import { useFormContext, useWatch } from "react-hook-form"; -import type { Report } from "@cr-vif/electric-client/frontend"; import { ChipGroup, type ChipGroupOption } from "../Chip"; import { FlexProps } from "#styled-system/jsx"; import { useChipOptions } from "../../features/chips/useChipOptions"; +import { Report } from "../../db/AppSchema"; export const FurtherInfoChips = (props: FlexProps & { disabled?: boolean }) => { const form = useFormContext(); diff --git a/packages/frontend/src/components/chips/SpaceTypeChips.tsx b/packages/frontend/src/components/chips/SpaceTypeChips.tsx index bece3d9d..bc526666 100644 --- a/packages/frontend/src/components/chips/SpaceTypeChips.tsx +++ b/packages/frontend/src/components/chips/SpaceTypeChips.tsx @@ -1,8 +1,8 @@ import { useFormContext, useWatch } from "react-hook-form"; -import type { Report } from "@cr-vif/electric-client/frontend"; import { ChipGroup, type ChipGroupOption } from "../Chip"; import { FlexProps } from "#styled-system/jsx"; import { useChipOptions } from "../../features/chips/useChipOptions"; +import { Report } from "../../db/AppSchema"; export const SpaceTypeChips = (props: FlexProps & { disabled?: boolean }) => { const form = useFormContext(); diff --git a/packages/frontend/src/contexts/AuthContext.tsx b/packages/frontend/src/contexts/AuthContext.tsx index ab7e41a9..4239dcac 100644 --- a/packages/frontend/src/contexts/AuthContext.tsx +++ b/packages/frontend/src/contexts/AuthContext.tsx @@ -54,55 +54,9 @@ export const AuthProvider = ({ children }: PropsWithChildren) => { refetchOnWindowFocus: false, }); - const electricQuery = useQuery({ - queryKey: ["electric", data?.token!], - queryFn: async () => { - console.log("connecting to electric"); - if (electric.isConnected) electric.disconnect(); - - await electric.connect(data!.token); - await electric.db.clause_v2.sync({ where: { udap_id: { in: ["ALL", data!.user!.udap_id!] } } }); - await electric.db.user.sync({ where: { udap_id: data!.user!.udap_id } }); - await electric.db.report.sync({ - where: { - udap_id: data!.user!.udap_id, - }, - include: { - user: true, - pictures: true, - }, - }); - await electric.db.service_instructeurs.sync({ where: { udap_id: data!.user!.udap_id } }); - await electric.db.delegation.sync({ - where: { - OR: [{ createdBy: data!.user!.id }, { delegatedTo: data!.user!.id }], - }, - include: { - user_delegation_createdByTouser: true, - }, - }); - await electric.db.pdf_snapshot.sync({ - where: { - user_id: data!.user!.id, - }, - }); - await electric.db.picture_lines.sync({}); - - return true; - }, - enabled: !!data?.token && refreshTokenQuery.isSuccess, - refetchOnWindowFocus: false, - onError: (e) => console.error("aaaaa", e), - }); - - if (electricQuery.isError) { - console.error("electricQuery error", electricQuery.error); - } - const value = { ...data, setData: setDataAndSaveInStorage, - electricStatus: electricQuery.status, }; return {children}; @@ -126,11 +80,6 @@ export const useLogout = () => { }; }; -export const useElectricStatus = () => { - const { electricStatus } = useContext(AuthContext); - return electricStatus; -}; - export const useUser = () => { const { user } = useContext(AuthContext); return user; @@ -142,3 +91,5 @@ type AuthContextProps = Partial> & { }; export type ElectricStatus = "error" | "pending" | "success" | "idle" | "loading"; + +export const useElectricStatus = () => "idle" as ElectricStatus; diff --git a/packages/frontend/src/db.ts b/packages/frontend/src/db.ts deleted file mode 100644 index 76c628be..00000000 --- a/packages/frontend/src/db.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { initElectric } from "./service-worker/electric"; - -const { electric, db } = await initElectric(); - -export { electric, db }; diff --git a/packages/frontend/src/db/AppSchema.ts b/packages/frontend/src/db/AppSchema.ts new file mode 100644 index 00000000..9b4fd85b --- /dev/null +++ b/packages/frontend/src/db/AppSchema.ts @@ -0,0 +1,123 @@ +import { Schema, Table, column } from "@powersync/web"; + +const report = new Table({ + title: column.text, + projectDescription: column.text, + redactedBy: column.text, + meetDate: column.text, + applicantName: column.text, + applicantAddress: column.text, + projectCadastralRef: column.text, + projectSpaceType: column.text, + decision: column.text, + precisions: column.text, + contacts: column.text, + furtherInformation: column.text, + createdBy: column.text, + createdAt: column.text, + serviceInstructeur: column.text, + pdf: column.text, + disabled: column.integer, + udap_id: column.text, + redactedById: column.text, + applicantEmail: column.text, + city: column.text, + zipCode: column.text, +}); + +const udap = new Table({ + department: column.text, + completeCoords: column.text, + visible: column.integer, + name: column.text, + address: column.text, + zipCode: column.text, + city: column.text, + phone: column.text, + email: column.text, + marianne_text: column.text, + drac_text: column.text, + udap_text: column.text, +}); + +const user = new Table({ + name: column.text, + udap_id: column.text, +}); + +const delegation = new Table({ + createdBy: column.text, + delegatedTo: column.text, +}); + +const pdf_snapshot = new Table({ + report_id: column.text, + html: column.text, + report: column.text, + user_id: column.text, +}); + +const service_instructeurs = new Table({ + full_name: column.text, + short_name: column.text, + email: column.text, + tel: column.text, + udap_id: column.text, +}); + +const clause_v2 = new Table({ + key: column.text, + value: column.text, + position: column.integer, + udap_id: column.text, + text: column.text, +}); + +const pictures = new Table({ + reportId: column.text, + url: column.text, + createdAt: column.text, + finalUrl: column.text, +}); + +const picture_lines = new Table({ + pictureId: column.text, + lines: column.text, + createdAt: column.text, +}); + +const transactions = new Table({ + id: column.text, + entity_id: column.text, + type: column.text, + op_id: column.text, + tx_id: column.text, + data: column.text, + op: column.text, + user_id: column.text, +}); + +export const AppSchema = new Schema({ + report, + udap, + user, + delegation, + pdf_snapshot, + service_instructeurs, + clause_v2, + pictures, + picture_lines, + transactions, +}); + +export type Database = (typeof AppSchema)["types"]; +export type Report = Database["report"]; +export type Udap = Database["udap"]; +export type User = Database["user"]; +export type Delegation = Database["delegation"]; +export type PdfSnapshot = Database["pdf_snapshot"]; +export type ServiceInstructeurs = Database["service_instructeurs"]; +export type Clause_v2 = Database["clause_v2"]; +export type Pictures = Database["pictures"]; +export type PictureLines = Database["picture_lines"]; +export type Transactions = Database["transactions"]; diff --git a/packages/frontend/src/db/Connector.ts b/packages/frontend/src/db/Connector.ts new file mode 100644 index 00000000..c513c63b --- /dev/null +++ b/packages/frontend/src/db/Connector.ts @@ -0,0 +1,75 @@ +import { UpdateType, PowerSyncBackendConnector, AbstractPowerSyncDatabase, CrudBatch } from "@powersync/web"; +import { safeJSONParse } from "pastable"; +import { api } from "../api"; +import { get } from "idb-keyval"; +import { getPicturesStore } from "../features/idb"; +import { ENV } from "../envVars"; + +const emitterChannel = new BroadcastChannel("sw-messages"); + +export class Connector implements PowerSyncBackendConnector { + async fetchCredentials() { + const token = await getTokenOrRefresh(); + + return { + endpoint: ENV.VITE_POWERSYNC_URL, + token, + }; + } + + hasUpdated = false; + + async uploadData(database: AbstractPowerSyncDatabase) { + // See example implementation here: https://docs.powersync.com/client-sdk-references/javascript-web#3-integrate-with-your-backend + const batchTransactions = await database.getCrudBatch(); + if (!batchTransactions) return; + + for (const operation of batchTransactions.crud) { + console.log("applying operation", operation.toJSON()); + + if (operation.table === "pictures" && operation.op === "PUT") { + const formData = new FormData(); + const buffer = await get(operation.id, getPicturesStore()); + + formData.append("file", new Blob([buffer]), "file"); + + await api.post("/api/upload/image", { + body: formData, + query: { + id: operation.id, + reportId: operation.opData?.reportId, + }, + } as any); + + emitterChannel.postMessage({ type: "status", id: operation.id, status: "success" }); + + continue; + } + + await api.post("/api/upload-data", { body: operation.toJSON() }); + } + + batchTransactions.complete(); + } +} + +const getTokenOrRefresh = async () => { + const authData = safeJSONParse(window.localStorage.getItem("crvif/auth") ?? ""); + if (!authData) throw new Error("No auth data found"); + + if (new Date(authData.expiresAt) < new Date()) { + const resp = await api.get("/api/refresh-token", { + query: { token: authData.token, refreshToken: authData.refreshToken! }, + }); + + if (resp.token === null) { + console.log("token expired but couldn't find a refresh token, logging out"); + window.localStorage.removeItem("crvif/auth"); + } else { + console.log("token refreshed"); + window.localStorage.setItem("crvif/auth", JSON.stringify({ ...authData, ...resp })); + } + } + + return authData.token; +}; diff --git a/packages/frontend/src/db/db.ts b/packages/frontend/src/db/db.ts new file mode 100644 index 00000000..a55d283a --- /dev/null +++ b/packages/frontend/src/db/db.ts @@ -0,0 +1,30 @@ +import { PowerSyncDatabase } from "@powersync/web"; +import { AppSchema, Database } from "./AppSchema"; +import { Connector } from "./Connector"; +import { wrapPowerSyncWithKysely } from "@powersync/kysely-driver"; +import { useQuery } from "@powersync/react"; + +export const powerSyncDb = new PowerSyncDatabase({ + schema: AppSchema, + database: { + dbFilename: "crvif-sync.db", + }, +}); + +export const db = wrapPowerSyncWithKysely(powerSyncDb); +export const useDbQuery = useQuery; + +export const setupPowersync = async () => { + const connector = new Connector(); + await powerSyncDb.init(); + await powerSyncDb.connect(connector, { + params: { + schema_version: 1, + }, + }); +}; + +export const clearDb = async () => { + await db.destroy(); + await powerSyncDb.disconnectAndClear(); +}; diff --git a/packages/frontend/src/envVars.ts b/packages/frontend/src/envVars.ts index 4f74390c..6105d6e0 100644 --- a/packages/frontend/src/envVars.ts +++ b/packages/frontend/src/envVars.ts @@ -5,11 +5,10 @@ export const isDev = !z.boolean().parse(import.meta.env.PROD); const envSchema = z.object({ VITE_BACKEND_URL: z.string(), VITE_ELECTRIC_URL: z.string(), + VITE_POWERSYNC_URL: z.string(), }); const isSW = typeof window === "undefined"; -console.log("isSW", isSW); -console.log("isDev", isDev); const safeParseEnv = (env: Record): z.infer => { try { diff --git a/packages/frontend/src/features/InfoForm.tsx b/packages/frontend/src/features/InfoForm.tsx index 9decc61f..c1940c1f 100644 --- a/packages/frontend/src/features/InfoForm.tsx +++ b/packages/frontend/src/features/InfoForm.tsx @@ -1,26 +1,19 @@ -import { InputGroup, InputGroupWithTitle } from "#components/InputGroup"; +import { InputGroupWithTitle } from "#components/InputGroup"; import { SpaceTypeChips } from "#components/chips/SpaceTypeChips"; -import { css, cx } from "#styled-system/css"; -import { Box, Center, Divider, Flex, Grid, Stack, styled } from "#styled-system/jsx"; +import { css } from "#styled-system/css"; +import { Box, Center, Divider, Flex, Stack, styled } from "#styled-system/jsx"; import { useTabsContext } from "@ark-ui/react/tabs"; import Button from "@codegouvfr/react-dsfr/Button"; import Input from "@codegouvfr/react-dsfr/Input"; import Select from "@codegouvfr/react-dsfr/Select"; -import type { Pictures, Report, Tmp_pictures } from "@cr-vif/electric-client/frontend"; -import { useMutation, useQuery } from "@tanstack/react-query"; import { format, parse } from "date-fns"; -import { useLiveQuery } from "electric-sql/react"; -import { get, set } from "idb-keyval"; -import { ChangeEvent, useEffect, useRef, useState } from "react"; +import { useRef } from "react"; import { useFormContext, useWatch } from "react-hook-form"; -import { v4 } from "uuid"; import { useUser } from "../contexts/AuthContext"; -import { db } from "../db"; +import { Report } from "../db/AppSchema"; +import { db, useDbQuery } from "../db/db"; import { useIsFormDisabled } from "./DisabledContext"; import { ServiceInstructeurSelect } from "./ServiceInstructeurSelect"; -import { deleteImageFromIdb, getPicturesStore, getToUploadStore, getUploadStatusStore, syncImages } from "./idb"; -import Badge from "@codegouvfr/react-dsfr/Badge"; -import { UploadImage } from "./upload/UploadImage"; export const InfoForm = () => { const form = useFormContext(); @@ -59,18 +52,27 @@ export const InfoForm = () => { tryToSetMeetDate(); }; - const redactedByQuery = useLiveQuery( - db.delegation.liveMany({ where: { delegatedTo: user.id }, include: { user_delegation_createdByTouser: true } }), + const redactedByQuery = useDbQuery( + db + .selectFrom("delegation") + .where("delegatedTo", "=", user.id) + .innerJoin("user", "user.id", "delegation.createdBy") + .selectAll("delegation") + .select("user.name as createdByName"), ); + // const redactedByQuery = useLiveQuery( + // db.delegation.liveMany({ where: { delegatedTo: user.id }, include: { user_delegation_createdByTouser: true } }), + // ); + const redactedByOptions: { value: string; label: string }[] = [ { value: user.id, label: user.name, }, - ...(redactedByQuery.results?.map((delegation) => ({ - value: (delegation as any).user_delegation_createdByTouser?.id, - label: (delegation as any).user_delegation_createdByTouser?.name, + ...(redactedByQuery.data?.map((delegation) => ({ + value: delegation.createdBy!, + label: delegation.createdByName!, })) ?? []), ]; diff --git a/packages/frontend/src/features/NotesForm.tsx b/packages/frontend/src/features/NotesForm.tsx index 2cf52a9f..6bb99dca 100644 --- a/packages/frontend/src/features/NotesForm.tsx +++ b/packages/frontend/src/features/NotesForm.tsx @@ -2,13 +2,13 @@ import { Center, Divider, Flex, Stack, styled } from "#styled-system/jsx"; import { useFormContext } from "react-hook-form"; import { InputGroupWithTitle } from "#components/InputGroup"; import Input from "@codegouvfr/react-dsfr/Input"; -import type { Report } from "@cr-vif/electric-client/frontend"; import { DecisionChips } from "#components/chips/DecisionChips"; import { ContactChips } from "#components/chips/ContactChips"; import { css } from "#styled-system/css"; import { FurtherInfoChips } from "#components/chips/FurtherInfoChips"; import Button from "@codegouvfr/react-dsfr/Button"; import { useIsFormDisabled } from "./DisabledContext"; +import { Report } from "../db/AppSchema"; import { UploadImage } from "./upload/UploadImage"; export const NotesForm = () => { diff --git a/packages/frontend/src/features/ReportActions.tsx b/packages/frontend/src/features/ReportActions.tsx index 0b03f886..0cd4f3a0 100644 --- a/packages/frontend/src/features/ReportActions.tsx +++ b/packages/frontend/src/features/ReportActions.tsx @@ -4,7 +4,6 @@ import Button, { ButtonProps } from "@codegouvfr/react-dsfr/Button"; import { forwardRef } from "react"; import { useUser } from "../contexts/AuthContext"; import { useMutation } from "@tanstack/react-query"; -import { db } from "../db"; import { downloadFile } from "../utils"; import { v4 } from "uuid"; import { omit } from "pastable"; @@ -12,6 +11,7 @@ import { ReportWithUser } from "./ReportList"; import { useNavigate } from "@tanstack/react-router"; import { api } from "../api"; import { useCanEditReport } from "../hooks/useCanEditReport"; +import { db } from "../db/db"; export const ReportActions = forwardRef(({ report }, ref) => { const user = useUser()!; @@ -27,19 +27,17 @@ export const ReportActions = forwardRef { - const payload = omit(report, ["id", "createdAt", "pdf", "user", "title"]); + const payload = omit(report, ["id", "createdAt", "pdf", "title"]); - return db.report.create({ - data: { - ...payload, - id: `report-${v4()}`, - title: `${report.title ?? "Sans titre"} - copie`, - createdAt: new Date(), - redactedBy: user.name, - redactedById: user.id, - createdBy: user.id, - pdf: undefined, - }, + return db.insertInto("report").values({ + ...payload, + id: `report-${v4()}`, + title: `${report.title ?? "Sans titre"} - copie`, + createdAt: new Date().toISOString(), + redactedBy: user.name, + redactedById: user.id, + createdBy: user.id, + pdf: undefined, }); }); @@ -99,5 +97,5 @@ const ReportAction = ({ const useDeleteMutation = () => useMutation(async (id: string) => { - await db.report.update({ where: { id }, data: { disabled: true } }); + await db.updateTable("report").set({ disabled: 0 }).where("id", "=", id).execute(); }); diff --git a/packages/frontend/src/features/ReportList.tsx b/packages/frontend/src/features/ReportList.tsx index e2766f91..1e04a79a 100644 --- a/packages/frontend/src/features/ReportList.tsx +++ b/packages/frontend/src/features/ReportList.tsx @@ -1,9 +1,7 @@ import { Center, Divider, Flex, Grid, Stack, styled } from "#styled-system/jsx"; import { flex } from "#styled-system/patterns"; -import { useLiveQuery } from "electric-sql/react"; import { useUser } from "../contexts/AuthContext"; -import type { Report } from "@cr-vif/electric-client/frontend"; -import { db } from "../db"; +import { db, useDbQuery } from "../db/db"; import Button from "@codegouvfr/react-dsfr/Button"; import Badge from "@codegouvfr/react-dsfr/Badge"; import { css, cx } from "#styled-system/css"; @@ -17,89 +15,92 @@ import { Pagination } from "@codegouvfr/react-dsfr/Pagination"; import welcomeImage from "../assets/welcome.svg"; import { useIsDesktop } from "../hooks/useIsDesktop"; import { chunk } from "pastable"; +import { Report } from "../db/AppSchema"; -export type ReportWithUser = Report & { user?: { email: string; name: string } }; +export type ReportWithUser = Report & { createdByName: string | null }; export const MyReports = () => { const [page, setPage] = useState(0); const user = useUser()!; - const myReports = useLiveQuery( - db.report.liveMany({ - where: { disabled: false, OR: [{ createdBy: user.id }, { redactedById: user.id }] }, - take: 20, - skip: page * 20, - orderBy: [{ meetDate: "desc" }, { createdAt: "desc" }], - include: { - user: true, - }, - }), + + const reportsQuery = useDbQuery( + db + .selectFrom("report") + .where("disabled", "=", 0) + .where((eb) => eb.or([eb("createdBy", "=", user.id), eb("redactedById", "=", user.id)])) + .limit(20) + .offset(page * 20) + .orderBy("meetDate desc") + .orderBy("createdAt desc") + .leftJoin("user", "user.id", "report.createdBy") + .selectAll(["report"]) + .select(["user.name as createdByName"]), ); - const nbReports = useLiveQuery<[{ count: number }]>( - db.liveRawQuery({ - sql: `SELECT COUNT(*) AS count FROM report WHERE (createdBy = ? OR redactedById = ?) AND disabled = FALSE`, - args: [user.id, user.id], - }), + const reports = reportsQuery.data; + const reportsCountQuery = useDbQuery( + db + .selectFrom("report") + .where("disabled", "=", 0) + .where((eb) => eb.or([eb("createdBy", "=", user.id), eb("redactedById", "=", user.id)])) + .select(db.fn.countAll().as("count")), ); - if (myReports.error || nbReports.error) { - console.error(myReports.error, nbReports.error); + const reportsCount = reportsCountQuery.data?.[0]?.count as number; + + const hasError = reportsQuery.error || reportsCountQuery.error; + const isLoading = reportsQuery.isLoading || reportsCountQuery.isLoading; + + if (hasError) { + console.error(reportsQuery.error, reportsCountQuery.error); return
Une erreur s'est produite
; } - const isLoading = !myReports.updatedAt; if (isLoading) return null; - return ( - - ); + return ; }; export const AllReports = () => { const [page, setPage] = useState(0); - const user = useUser()!; - const allReports = useLiveQuery( - db.report.liveMany({ - where: { disabled: false, udap_id: user.udap?.id }, - take: 20, - skip: page * 20, - orderBy: { createdAt: "desc" }, - include: { - user: true, - }, - }), + + const reportsQuery = useDbQuery( + db + .selectFrom("report") + .where("disabled", "=", 0) + .where("report.udap_id", "=", user.udap_id) + .limit(20) + .offset(page * 20) + .orderBy("createdAt desc") + .leftJoin("user", "user.id", "report.createdBy") + .selectAll(["report"]) + .select(["user.name as createdByName"]), ); - const nbReports = useLiveQuery<[{ count: number }]>( - db.liveRawQuery({ - sql: `SELECT COUNT(*) AS count FROM report WHERE disabled=FALSE AND udap_id = ?`, - args: [user.udap?.id], - }), + const reports = reportsQuery.data; + const reportsCountQuery = useDbQuery( + db + .selectFrom("report") + .where("disabled", "=", 0) + .where("report.udap_id", "=", user.udap_id) + .select(db.fn.countAll().as("count")), ); - if (allReports.error || nbReports.error) { - console.error(allReports.error); + const reportsCount = reportsCountQuery.data?.[0]?.count as number; + + const hasError = reportsQuery.error || reportsCountQuery.error; + const isLoading = reportsQuery.isLoading || reportsCountQuery.isLoading; + + if (hasError) { + console.error(reportsQuery.error, reportsCountQuery.error); return
Une erreur s'est produite
; } - const isLoading = !allReports.updatedAt; if (isLoading) return null; - return ( - - ); + return ; }; const NoReport = () => { @@ -195,7 +196,10 @@ const ReportListItem = ({ const whereText = report.city ? `à ${report.city}` : null; const forText = report.applicantName ? uppercaseFirstLetterIf(`pour ${report.applicantName}`, !whereText) : null; - const byText = uppercaseFirstLetterIf(`par ${report.redactedBy ?? report.user?.name ?? ""}`, !whereText && !forText); + const byText = uppercaseFirstLetterIf( + `par ${report.redactedBy ?? report.createdByName ?? ""}`, + !whereText && !forText, + ); return ( diff --git a/packages/frontend/src/features/ServiceInstructeurSelect.tsx b/packages/frontend/src/features/ServiceInstructeurSelect.tsx index 5acc5e49..ece617fd 100644 --- a/packages/frontend/src/features/ServiceInstructeurSelect.tsx +++ b/packages/frontend/src/features/ServiceInstructeurSelect.tsx @@ -4,29 +4,20 @@ import Input from "@codegouvfr/react-dsfr/Input"; import { useState } from "react"; // import { serviceInstructeurs } from "@cr-vif/pdf"; import { useFormContext, useWatch } from "react-hook-form"; -import { Report, Service_instructeurs } from "@cr-vif/electric-client/frontend"; -import { useLiveQuery } from "electric-sql/react"; -import { db } from "../db"; -import { useUser } from "../contexts/AuthContext"; +import { db, useDbQuery } from "../db/db"; +import { Report, ServiceInstructeurs } from "../db/AppSchema"; export const ServiceInstructeurSelect = ({ disabled }: { disabled?: boolean }) => { const form = useFormContext(); - const user = useUser()!; const [inputValue, setInputValue] = useState(""); - const serviceInstructeursQuery = useLiveQuery( - db.service_instructeurs.liveMany({ - where: { - udap_id: user.udap_id, - }, - }), - ); + const serviceInstructeursQuery = useDbQuery(db.selectFrom("service_instructeurs").selectAll()); - const rawItems = serviceInstructeursQuery.results ?? []; + const rawItems = serviceInstructeursQuery.data ?? []; - const items = rawItems.filter((item) => item.short_name.toLowerCase().includes(inputValue.toLowerCase())); + const items = rawItems.filter((item) => item.short_name?.toLowerCase().includes(inputValue.toLowerCase())); - const selectItem = (item: ServiceInstructeur | null) => { + const selectItem = (item: ServiceInstructeurs | null) => { form.setValue("serviceInstructeur", item?.id || null); }; @@ -36,8 +27,8 @@ export const ServiceInstructeurSelect = ({ disabled }: { disabled?: boolean }) = (item as ServiceInstructeur)?.short_name ?? ""} - itemToValue={(item) => (item as ServiceInstructeur)?.id.toString() ?? ""} + itemToString={(item) => (item as ServiceInstructeurs)?.short_name ?? ""} + itemToValue={(item) => (item as ServiceInstructeurs)?.id.toString() ?? ""} items={items} value={value ? [value.toString()] : undefined} inputValue={value ? items.find((item) => item.id === value)?.short_name : inputValue} @@ -45,7 +36,7 @@ export const ServiceInstructeurSelect = ({ disabled }: { disabled?: boolean }) = if (value) selectItem(null); setInputValue(e.value); }} - onValueChange={(e) => selectItem(e.items?.[0] as ServiceInstructeur)} + onValueChange={(e) => selectItem(e.items?.[0] as ServiceInstructeurs)} > @@ -80,5 +71,3 @@ export const ServiceInstructeurSelect = ({ disabled }: { disabled?: boolean }) = const ProxyInput = (props: any) => { return ; }; - -type ServiceInstructeur = Service_instructeurs; diff --git a/packages/frontend/src/features/chips/useChipOptions.tsx b/packages/frontend/src/features/chips/useChipOptions.tsx index 2b878812..5cbf5630 100644 --- a/packages/frontend/src/features/chips/useChipOptions.tsx +++ b/packages/frontend/src/features/chips/useChipOptions.tsx @@ -1,26 +1,22 @@ import { useUser } from "../../contexts/AuthContext"; -import { useLiveQuery } from "electric-sql/react"; -import { db } from "../../db"; import { groupBy } from "pastable"; -import { Clause_v2 } from "@cr-vif/electric-client/frontend"; +import { db, useDbQuery } from "../../db/db"; +import { Clause_v2 } from "../../db/AppSchema"; export const useChipOptions = (key?: string) => { const user = useUser()!; - // retrieve all chips with the given key - const decisionsChipsQuery = useLiveQuery( - db.clause_v2.liveMany({ - where: { - ...(key ? { key } : {}), - udap_id: { in: ["ALL", user.udap.id] }, - }, - }), - ); + let query = db + .selectFrom("clause_v2") + .where((eb) => eb.or([eb("udap_id", "=", "ALL"), eb("udap_id", "=", user.udap_id)])); - const grouped = groupBy(decisionsChipsQuery.results ?? [], (item) => `${item.key}-${item.value}`); + if (key) query = query.where("key", "=", key); + + const chipsQuery = useDbQuery(query.selectAll()); + + const grouped = groupBy(chipsQuery.data ?? [], (item) => `${item.key}-${item.value}`); - // keep only the most specific chip for each value const chips = Object.values(grouped).map((value) => { if (value.length > 1) return value.find((chip) => chip.udap_id !== "ALL") ?? value[0]; return value[0]; diff --git a/packages/frontend/src/features/idb.ts b/packages/frontend/src/features/idb.ts index 2cc67e76..1e4993cf 100644 --- a/packages/frontend/src/features/idb.ts +++ b/packages/frontend/src/features/idb.ts @@ -3,17 +3,6 @@ import { createStore, del } from "idb-keyval"; export const getPicturesStore = () => createStore("toSync", "images"); export const getToUploadStore = () => createStore("toUpload", "images"); export const getUploadStatusStore = () => createStore("uploadStatus", "images"); -export const getToPingStore = () => createStore("toPing", "images"); - -export const syncImages = async () => { - const registration = await navigator.serviceWorker.ready; - await registration.sync.register("images"); -}; - -export const syncPictureLines = async () => { - const registration = await navigator.serviceWorker.ready; - await registration.sync.register("picture-lines"); -}; export const deleteImageFromIdb = async (id: string) => { await del(id, getPicturesStore()); diff --git a/packages/frontend/src/features/menu/ClauseMenu.tsx b/packages/frontend/src/features/menu/ClauseMenu.tsx index ab65a27c..ea4070af 100644 --- a/packages/frontend/src/features/menu/ClauseMenu.tsx +++ b/packages/frontend/src/features/menu/ClauseMenu.tsx @@ -1,5 +1,3 @@ -import { useLiveQuery } from "electric-sql/react"; -import { db } from "../../db"; import { Spinner } from "#components/Spinner"; import { groupBy } from "pastable"; import { useUser } from "../../contexts/AuthContext"; @@ -10,29 +8,27 @@ import type { ModalContentProps } from "./MenuButton"; import { ReactNode, useEffect, useState } from "react"; import Button, { ButtonProps } from "@codegouvfr/react-dsfr/Button"; import { css, cx } from "#styled-system/css"; -import { Clause_v2 } from "@cr-vif/electric-client/frontend"; import Input from "@codegouvfr/react-dsfr/Input"; import { FormProvider, useFieldArray, useForm, useFormContext } from "react-hook-form"; import { useMutation } from "@tanstack/react-query"; import Select from "@codegouvfr/react-dsfr/Select"; import { v4 } from "uuid"; import { fr } from "@codegouvfr/react-dsfr"; +import { db, useDbQuery } from "../../db/db"; +import { Clause_v2 } from "../../db/AppSchema"; export const ClauseMenu = ({ isNational, ...props }: { isNational: boolean } & ModalContentProps) => { const user = useUser()!; - const clausesQuery = useLiveQuery( - db.clause_v2.liveMany({ - where: { - key: { - in: isNational ? ["type-espace", "decision"] : ["contacts-utiles", "bonnes-pratiques"], - }, - OR: [{ udap_id: "ALL" }, { udap_id: user.udap_id! }], - }, - }), + const clausesQuery = useDbQuery( + db + .selectFrom("clause_v2") + .where("key", "in", isNational ? ["type-espace", "decision"] : ["contacts-utiles", "bonnes-pratiques"]) + .where("udap_id", "in", ["ALL", user.udap_id]) + .selectAll(), ); - if (!clausesQuery.updatedAt) return ; + if (clausesQuery.isLoading) return ; if (isNational) return ( @@ -50,14 +46,14 @@ export const ClauseMenu = ({ isNational, ...props }: { isNational: boolean } & M {...props} /> - + ); return ( ({ ...c, text: c.text?.replaceAll("\\n", "\n") ?? "" })) ?? []} + clauses={clausesQuery.data?.map((c) => ({ ...c, text: c.text?.replaceAll("\\n", "\n") ?? "" })) ?? []} {...props} isNational={isNational} /> @@ -116,10 +112,11 @@ const ClauseForm = ({ const applyDiffMutation = useMutation( async (diff: { updatedClauses: Clause_v2[] }) => { for (const clause of diff.updatedClauses) { - await db.clause_v2.update({ - where: { id: clause.id }, - data: { text: clause.text, value: clause.value }, - }); + await db + .updateTable("clause_v2") + .set({ text: clause.text, value: clause.value }) + .where("id", "=", clause.id) + .execute(); } }, { @@ -136,7 +133,6 @@ const ClauseForm = ({ const onSubmit = (data: Form) => { const diff = getDiff(clauses, data.clauses); - console.log(clauses, data.clauses, diff); applyDiffMutation.mutate(diff); }; @@ -309,7 +305,7 @@ const ClauseView = ({ clause }: { clause: ClauseWithIndex }) => { {clause.value} - {clause.text.split("\\n").map((text, i) => { + {(clause.text || "").split("\\n").map((text, i) => { return ( {text} @@ -325,7 +321,7 @@ const ClauseEdit = ({ clause }: { clause: ClauseWithIndex }) => { const deleteClauseMutation = useMutation( async () => { - await db.clause_v2.delete({ where: { id: clause.id } }); + await db.deleteFrom("clause_v2").where("id", "=", clause.id).execute(); }, { onSuccess: () => {}, @@ -377,7 +373,7 @@ const ClauseAdd = ({ onSuccess, isNational }: { onSuccess: () => void; isNationa const addClauseMutation = useMutation( async (clause: Clause_v2) => { - await db.clause_v2.create({ data: clause }); + await db.insertInto("clause_v2").values(clause).execute(); }, { onSuccess, diff --git a/packages/frontend/src/features/menu/HelpMenu.tsx b/packages/frontend/src/features/menu/HelpMenu.tsx index 285497cf..7075028b 100644 --- a/packages/frontend/src/features/menu/HelpMenu.tsx +++ b/packages/frontend/src/features/menu/HelpMenu.tsx @@ -1,15 +1,16 @@ import { Divider, Stack, styled } from "#styled-system/jsx"; import Button from "@codegouvfr/react-dsfr/Button"; -import { electric } from "../../db"; import { MenuTitle } from "./MenuTitle"; +import { clearDb } from "../../db/db"; export const HelpMenu = ({ backButtonOnClick }: { backButtonOnClick: () => void }) => { const deleteLocalData = () => { - if (electric.isConnected) electric.disconnect(); localStorage.clear(); indexedDB.deleteDatabase("crvif.db"); - unregisterSWs() - window.location.reload(); + unregisterSWs(); + clearDb().then(() => { + window.location.reload(); + }); }; return ( <> @@ -26,12 +27,10 @@ export const HelpMenu = ({ backButtonOnClick }: { backButtonOnClick: () => void }; const unregisterSWs = async () => { - if ('serviceWorker' in navigator) { + if ("serviceWorker" in navigator) { const registrations = await navigator.serviceWorker.getRegistrations(); - + // Unregister all service workers - await Promise.all( - registrations.map(registration => registration.unregister()) - ); - } -}; \ No newline at end of file + await Promise.all(registrations.map((registration) => registration.unregister())); + } +}; diff --git a/packages/frontend/src/features/menu/Share.tsx b/packages/frontend/src/features/menu/Share.tsx index cb9f1536..483d6d6f 100644 --- a/packages/frontend/src/features/menu/Share.tsx +++ b/packages/frontend/src/features/menu/Share.tsx @@ -1,46 +1,37 @@ import { Divider, Flex, Stack, styled } from "#styled-system/jsx"; -import { useLiveQuery } from "electric-sql/react"; import { useUser } from "../../contexts/AuthContext"; -import { db } from "../../db"; -import { Delegation, User } from "@cr-vif/electric-client/frontend"; import { ToggleSwitch } from "@codegouvfr/react-dsfr/ToggleSwitch"; import { useMutation } from "@tanstack/react-query"; import { css } from "#styled-system/css"; import { MenuTitle } from "./MenuTitle"; import { ClauseFormBanner } from "./ClauseMenu"; import { fr } from "@codegouvfr/react-dsfr"; +import { db, useDbQuery } from "../../db/db"; +import { Delegation, User } from "../../db/AppSchema"; +import { v4 } from "uuid"; export const ShareReport = ({ backButtonOnClick }: { backButtonOnClick: () => void }) => { const user = useUser()!; - const coworkersQuery = useLiveQuery( - db.user.liveMany({ - where: { - udap_id: user.udap_id, - id: { not: user.id }, - }, - }), + const coworkersQuery = useDbQuery( + db.selectFrom("user").where("udap_id", "=", user.udap_id).where("id", "!=", user.id).selectAll(), ); - const delegationsQuery = useLiveQuery( - db.delegation.liveMany({ - where: { - createdBy: user.id, - }, - }), - ); + const delegationsQuery = useDbQuery(db.selectFrom("delegation").where("createdBy", "=", user.id).selectAll()); - const delegatedToMeQuery = useLiveQuery( - db.delegation.liveMany({ - where: { - delegatedTo: user.id, - }, - include: { - user_delegation_createdByTouser: true, - }, - }), + const delegatedToMeQuery = useDbQuery( + db + .selectFrom("delegation") + .where("delegatedTo", "=", user.id) + .innerJoin("user", "delegation.createdBy", "user.id") + .selectAll(["delegation"]) + .select(["user.name as createdByName"]), ); + const coworkers = coworkersQuery.data ?? []; + const delegations = delegationsQuery.data ?? []; + const delegatedToMe = delegatedToMeQuery.data ?? []; + return ( <> vo Ces personnes peuvent créer, modifier et supprimer vos CR : - + Ces personnes vous permettent de créer, modifier et supprimer leurs CR : - {delegatedToMeQuery.results?.map((delegation) => ( + {delegatedToMe?.map((delegation) => ( {(delegation as any).user_delegation_createdByTouser?.name} @@ -79,14 +70,14 @@ export const ShareReport = ({ backButtonOnClick }: { backButtonOnClick: () => vo const ManageDelegations = ({ coworkers, delegations }: { coworkers: User[]; delegations: Delegation[] }) => { const user = useUser()!; - const createMutation = useMutation((delegation: Delegation) => db.delegation.create({ data: delegation })); + const createMutation = useMutation((delegation: Omit) => + db + .insertInto("delegation") + .values({ ...delegation, id: v4() }) + .execute(), + ); const removeMutation = useMutation((delegation: Delegation) => - db.delegation.deleteMany({ - where: { - createdBy: delegation.createdBy, - delegatedTo: delegation.delegatedTo, - }, - }), + db.deleteFrom("delegation").where("id", "=", delegation.id).execute(), ); return ( diff --git a/packages/frontend/src/features/testPowersync.tsx b/packages/frontend/src/features/testPowersync.tsx new file mode 100644 index 00000000..237ab56f --- /dev/null +++ b/packages/frontend/src/features/testPowersync.tsx @@ -0,0 +1,10 @@ +import { useQuery, useStatus } from "@powersync/react"; + +export const TestPowersync = () => { + return null; + const a = useQuery("SELECT * FROM report"); + const status = useStatus(); + console.log(status.connected); + console.log(a); + return
{(a.data || []).map((r) => r.id).join(", ")}
; +}; diff --git a/packages/frontend/src/features/upload/DrawingCanvas.tsx b/packages/frontend/src/features/upload/DrawingCanvas.tsx index 932a646d..ac4a911d 100644 --- a/packages/frontend/src/features/upload/DrawingCanvas.tsx +++ b/packages/frontend/src/features/upload/DrawingCanvas.tsx @@ -3,9 +3,8 @@ import { fr } from "@codegouvfr/react-dsfr"; import React, { useState, useRef, useEffect } from "react"; import { css, cva } from "#styled-system/css"; import Button from "@codegouvfr/react-dsfr/Button"; -import { db } from "../../db"; import { v4 } from "uuid"; -import { Picture_lines } from "@cr-vif/electric-client/frontend"; +import { db } from "../../db/db"; type DrawEvent = React.MouseEvent | React.TouchEvent; export type Line = { points: Array<{ x: number; y: number }>; color: string }; @@ -15,14 +14,12 @@ export const ImageCanvas = ({ lines: dbLines, containerRef, closeModal, - notifyPictureLines, }: { url: string; containerRef: any; pictureId: string; lines: Array; closeModal: () => void; - notifyPictureLines: (args: { pictureId: string; lines: Array }) => void; }) => { const [tool, setTool] = useState("draw"); const [lines, setLines] = useState; color: string }>>([]); @@ -133,17 +130,7 @@ export const ImageCanvas = ({ return x >= 0 && x <= imageRef.current.width && y >= 0 && y <= imageRef.current.height; }; - // const getMousePos = (e) => { - // const clientX = "clientX" in e ? e.clientX : e.touches[0].clientX; - // const clientY = "clientY" in e ? e.clientY : e.touches[0].clientY; - - // const canvas = canvasRef.current!; - // const rect = canvas.getBoundingClientRect(); - // const x = (clientX - rect.left - offset.x) / scale; - // const y = (clientY - rect.top - offset.y) / scale; - // return { x, y }; - // }; - const getMousePos = (e) => { + const getMousePos = (e: any) => { const canvas = canvasRef.current!; const rect = canvas.getBoundingClientRect(); const dpr = window.devicePixelRatio || 1; @@ -156,7 +143,7 @@ export const ImageCanvas = ({ return { x, y }; }; - const handleMouseDown = (e) => { + const handleMouseDown = (e: any) => { const clientX = "clientX" in e ? e.clientX : e.touches[0].clientX; const clientY = "clientY" in e ? e.clientY : e.touches[0].clientY; const pos = getMousePos(e); @@ -173,7 +160,7 @@ export const ImageCanvas = ({ } }; - const handleMouseMove = (e) => { + const handleMouseMove = (e: any) => { const pos = getMousePos(e); if (isDrawing) { @@ -203,90 +190,52 @@ export const ImageCanvas = ({ setStartPan(null); }; - const handleWheel = (e) => { - // e.preventDefault(); - // const scaleBy = 1.1; - // const newScale = e.deltaY < 0 ? scale * scaleBy : scale / scaleBy; - // // Calculate zoom point - // const pos = getMousePos(e); - // const newOffset = { - // x: offset.x - pos.x * (newScale - scale), - // y: offset.y - pos.y * (newScale - scale), - // }; - // setScale(newScale); - // setOffset(newOffset); - }; + const handleWheel = (e: any) => {}; const handleUndo = () => { setLines(lines.slice(0, -1)); }; - // const [lastDistance, setLastDistance] = useState(null); - // const getDistance = (touches) => { - // return Math.hypot(touches[0].clientX - touches[1].clientX, touches[0].clientY - touches[1].clientY); - // }; - - const handleTouchStart = (e) => { - // if (e.touches.length === 2) { - // e.preventDefault(); - // setLastDistance(getDistance(e.touches)); - // } else { + const handleTouchStart = (e: any) => { handleMouseDown(e); - // } }; - const handleTouchMove = (e) => { - // if (e.touches.length === 2) { - // e.preventDefault(); - - // const newDistance = getDistance(e.touches); - // if (lastDistance) { - // const delta = newDistance - lastDistance; - // const scaleChange = delta > 0 ? 1.01 : 0.99; - // setScale(scale * scaleChange); - // } - // setLastDistance(newDistance); - // } else { + const handleTouchMove = (e: any) => { handleMouseMove(e); - // } }; - const handleTouchEnd = (e) => { + const handleTouchEnd = (e: any) => { // setLastDistance(null); - handleMouseUp(e); + handleMouseUp(); }; const handleSave = async () => { - const existingLines = await db.picture_lines.findFirst({ where: { pictureId } }); + const existingLinesQuery = await db + .selectFrom("picture_lines") + .where("pictureId", "=", pictureId) + .selectAll() + .execute(); + const existingLines = existingLinesQuery?.[0]; + if (existingLines) { console.log("updating lines", existingLines, lines); - await db.picture_lines.update({ - where: { id: existingLines.id }, - data: { lines: JSON.stringify(lines) }, - }); + await db + .updateTable("picture_lines") + .where("id", "=", existingLines.id) + .set({ lines: JSON.stringify(lines), pictureId }) + .execute(); } else { console.log("creating lines", lines); - await db.picture_lines.create({ - data: { id: v4(), pictureId, lines: JSON.stringify(lines) }, - }); + await db + .insertInto("picture_lines") + .values({ id: v4(), pictureId, lines: JSON.stringify(lines) }) + .execute(); } - notifyPictureLines({ pictureId, lines }); closeModal(); }; return ( - {/* - onClick={() => setScale(scale * 1.1)} - - - onClick={() => setScale(scale / 1.1)} - - - onClick={handleUndo} - disabled={lines.length === 0} - -*/} {/* @ts-ignore */} */} diff --git a/packages/frontend/src/features/upload/UploadImage.tsx b/packages/frontend/src/features/upload/UploadImage.tsx index cc9e298f..0b3d7e8f 100644 --- a/packages/frontend/src/features/upload/UploadImage.tsx +++ b/packages/frontend/src/features/upload/UploadImage.tsx @@ -1,21 +1,10 @@ import { useState, useRef, ChangeEvent, useEffect } from "react"; import { v4 } from "uuid"; -import { db } from "../../db"; -import { - deleteImageFromIdb, - getPicturesStore, - getToPingStore, - getToUploadStore, - getUploadStatusStore, - syncImages, - syncPictureLines, -} from "../idb"; +import { deleteImageFromIdb, getPicturesStore, getUploadStatusStore } from "../idb"; import { Box, Center, Flex, Grid, Stack, styled } from "#styled-system/jsx"; import { InputGroup } from "#components/InputGroup.tsx"; import { cx } from "#styled-system/css"; -import { Tmp_pictures, Pictures, Report } from "@cr-vif/electric-client/frontend"; import { useMutation, useQuery } from "@tanstack/react-query"; -import { useLiveQuery } from "electric-sql/react"; import { del, get, set } from "idb-keyval"; import { useFormContext } from "react-hook-form"; import Badge from "@codegouvfr/react-dsfr/Badge"; @@ -24,6 +13,8 @@ import { css } from "#styled-system/css"; import { createModal } from "@codegouvfr/react-dsfr/Modal"; import { ImageCanvas, Line } from "./DrawingCanvas"; import { api } from "../../api"; +import { db, useDbQuery } from "../../db/db"; +import { Pictures, Report } from "../../db/AppSchema"; import imageCompression from "browser-image-compression"; const modal = createModal({ @@ -35,27 +26,16 @@ export const UploadImage = ({ reportId }: { reportId: string }) => { const [statusMap, setStatusMap] = useState>({}); const [selectedPicture, setSelectedPicture] = useState<{ id: string; url: string } | null>(null); - const notifyPictureLines = useMutation(async ({ pictureId, lines }: { pictureId: string; lines: Array }) => { - try { - emitterChannel.postMessage({ type: "status", id: pictureId, status: "uploading" }); - - const result = await api.post(`/api/upload/picture/${pictureId}/lines` as any, { body: { lines } }); - await del(pictureId, getToPingStore()); - - emitterChannel.postMessage({ type: "status", id: pictureId, status: "success" }); - - return result; - } catch (e) { - await set(pictureId, JSON.stringify(lines), getToPingStore()); - syncPictureLines(); - } - }); - const linesQuery = useQuery({ queryKey: ["lines", selectedPicture?.id], queryFn: async () => { - const pictureLines = await db.picture_lines.findFirst({ where: { pictureId: selectedPicture?.id } }); - return JSON.parse(pictureLines?.lines ?? "[]"); + const linesQuery = await db + .selectFrom("picture_lines") + .where("pictureId", "=", selectedPicture!.id) + .selectAll() + .execute(); + + return JSON.parse(linesQuery?.[0]?.lines ?? "[]"); }, enabled: !!selectedPicture, }); @@ -68,27 +48,10 @@ export const UploadImage = ({ reportId }: { reportId: string }) => { ref.current!.value = ""; const buffer = await processImage(file); - await db.tmp_pictures.create({ data: { id: picId, reportId, createdAt: new Date() } }); await set(picId, buffer, getPicturesStore()); + await db.insertInto("pictures").values({ id: picId, reportId, createdAt: new Date().toISOString() }).execute(); - try { - const formData = new FormData(); - - formData.append("file", new Blob([buffer]), "file"); - formData.append("reportId", reportId); - formData.append("pictureId", picId); - emitterChannel.postMessage({ type: "status", id: picId, status: "uploading" }); - - await api.post("/api/upload/image", { - body: formData, - query: { reportId: reportId, id: picId }, - } as any); - - emitterChannel.postMessage({ type: "status", id: picId, status: "success" }); - } catch { - await set(picId, reportId, getToUploadStore()); - syncImages(); - } + setStatusMap((prev) => ({ ...prev, [picId]: "uploading" })); }); const onChange = async (e: ChangeEvent) => { @@ -100,7 +63,6 @@ export const UploadImage = ({ reportId }: { reportId: string }) => { useEffect(() => { const listener = (event: MessageEvent) => { - console.log(event.data); if (event.data.type === "status") { console.log("status", event.data.id, event.data.status); setStatusMap((prev) => ({ ...prev, [event.data.id]: event.data.status })); @@ -140,7 +102,6 @@ export const UploadImage = ({ reportId }: { reportId: string }) => { {selectedPicture ? ( setSelectedPicture(null)} - notifyPictureLines={notifyPictureLines.mutate} pictureId={selectedPicture.id} url={selectedPicture.url} containerRef={containerRef} @@ -174,7 +135,6 @@ export const UploadImage = ({ reportId }: { reportId: string }) => { }; const broadcastChannel = new BroadcastChannel("sw-messages"); -const emitterChannel = new BroadcastChannel("sw-messages"); const ReportPictures = ({ statusMap, @@ -187,18 +147,20 @@ const ReportPictures = ({ const reportId = form.getValues().id; - const tmpPicturesQuery = useLiveQuery( - db.tmp_pictures.liveMany({ where: { reportId }, orderBy: { createdAt: "desc" } }), - ); + const picturesQuery = useDbQuery(db.selectFrom("pictures").where("reportId", "=", reportId).selectAll()); - const picturesQuery = useLiveQuery( - db.pictures.liveMany({ - where: { reportId }, - orderBy: { createdAt: "desc" }, - }), - ); + // const tmpPicturesQuery = useLiveQuery( + // db.tmp_pictures.liveMany({ where: { reportId }, orderBy: { createdAt: "desc" } }), + // ); - const pictures = mergePictureArrays(tmpPicturesQuery.results ?? [], picturesQuery.results ?? []); + // const picturesQuery = useLiveQuery( + // db.pictures.liveMany({ + // where: { reportId }, + // orderBy: { createdAt: "desc" }, + // }), + // ); + + const pictures = picturesQuery.data ?? []; return ( @@ -221,24 +183,6 @@ const ReportPictures = ({ ); }; -const mergePictureArrays = (a: Tmp_pictures[], b: Pictures[]) => { - const map = new Map(); - - const sortByDate = (a: Tmp_pictures, b: Tmp_pictures) => { - return new Date(a.createdAt!).getTime() - new Date(b.createdAt!).getTime(); - }; - - for (const item of a) { - map.set(item.id, item); - } - - for (const item of b) { - map.set(item.id, item); - } - - return Array.from(map.values()).sort(sortByDate); -}; - const PictureThumbnail = ({ picture, index, @@ -252,8 +196,7 @@ const PictureThumbnail = ({ }) => { const deletePictureMutation = useMutation(async () => { await deleteImageFromIdb(picture.id); - await db.tmp_pictures.delete({ where: { id: picture.id } }).catch(() => {}); - await db.pictures.delete({ where: { id: picture.id } }).catch(() => {}); + await db.deleteFrom("pictures").where("id", "=", picture.id).execute(); return "ok"; }); @@ -273,7 +216,9 @@ const PictureThumbnail = ({ refetchOnWindowFocus: false, }); - const pictureLines = useLiveQuery(db.picture_lines.liveMany({ where: { pictureId: picture.id } })); + const pictureLines = useDbQuery(db.selectFrom("picture_lines").where("pictureId", "=", picture.id).selectAll()); + + // const pictureLines = useLiveQuery(db.picture_lines.liveMany({ where: { pictureId: picture.id } })); const idbStatusQuery = useQuery({ queryKey: ["picture-status", picture.id], @@ -286,12 +231,12 @@ const PictureThumbnail = ({ useEffect(() => { drawCanvas(); - }, [bgUrlQuery.data, pictureLines.results]); + }, [bgUrlQuery.data, pictureLines.data]); const drawCanvas = () => { if (!canvasRef.current) return; if (!bgUrlQuery.data) return; - if (!pictureLines.results) return; + if (!pictureLines.data) return; const canvas = canvasRef.current; const ctx = canvas.getContext("2d")!; @@ -321,7 +266,7 @@ const PictureThumbnail = ({ ctx.drawImage(image, 0, 0, image.width, image.height); - const lines = JSON.parse(pictureLines.results?.[0]?.lines ?? "[]"); + const lines = JSON.parse(pictureLines.data?.[0]?.lines ?? "[]"); ctx.lineWidth = 5; ctx.lineCap = "round"; diff --git a/packages/frontend/src/hooks/useAppStatus.tsx b/packages/frontend/src/hooks/useAppStatus.tsx new file mode 100644 index 00000000..f08ab73d --- /dev/null +++ b/packages/frontend/src/hooks/useAppStatus.tsx @@ -0,0 +1,13 @@ +import { useStatus } from "@powersync/react"; + +export const useAppStatus = () => { + const powerSyncStatus = useStatus(); + + const status = powerSyncStatus.connected + ? powerSyncStatus.dataFlowStatus.downloading || powerSyncStatus.dataFlowStatus.uploading + ? "saving" + : "saved" + : "offline"; + + return status; +}; diff --git a/packages/frontend/src/hooks/useCanEditReport.tsx b/packages/frontend/src/hooks/useCanEditReport.tsx index a0b20bd3..1517dfc2 100644 --- a/packages/frontend/src/hooks/useCanEditReport.tsx +++ b/packages/frontend/src/hooks/useCanEditReport.tsx @@ -1,18 +1,22 @@ -import { Report } from "@cr-vif/electric-client/frontend"; import { useUser } from "../contexts/AuthContext"; -import { useLiveQuery } from "electric-sql/react"; -import { db } from "../db"; +import { Report } from "../db/AppSchema"; +import { db, useDbQuery } from "../db/db"; export const useCanEditReport = (report: Report) => { const user = useUser()!; const isOwner = report.redactedById === user.id; const isCreator = report.createdBy === user.id; - const userDelegations = useLiveQuery( - db.delegation.liveFirst({ where: { createdBy: report.createdBy, delegatedTo: user.id } }), + const delegationsQuery = useDbQuery( + db + .selectFrom("delegation") + .where("createdBy", "=", report.createdBy) + .where("delegatedTo", "=", user.id) + .selectAll(), ); - const hasDelegation = !!userDelegations.results; + const hasDelegation = !!delegationsQuery.data?.[0]; + const canEdit = isOwner || isCreator || hasDelegation; return canEdit; diff --git a/packages/frontend/src/main.tsx b/packages/frontend/src/main.tsx index 1eb9715a..f51457f6 100644 --- a/packages/frontend/src/main.tsx +++ b/packages/frontend/src/main.tsx @@ -1,14 +1,17 @@ import { startReactDsfr } from "@codegouvfr/react-dsfr/spa"; -import React from "react"; +import React, { PropsWithChildren, useEffect, useMemo } from "react"; import ReactDOM from "react-dom/client"; import { App } from "./App"; -import { AuthProvider } from "./contexts/AuthContext"; +import { AuthProvider, useAuthContext } from "./contexts/AuthContext"; import "./index.css"; import { Link } from "@tanstack/react-router"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { ErrorBoundary } from "react-error-boundary"; import { registerSW } from "virtual:pwa-register"; import { initFonts } from "@cr-vif/pdf"; +import { powerSyncDb, setupPowersync } from "./db/db"; +import { PowerSyncContext } from "@powersync/react"; +import { TestPowersync } from "./features/testPowersync"; if ("serviceWorker" in navigator) { registerSW({}); @@ -28,12 +31,22 @@ const queryClient = new QueryClient({ }, }); +setupPowersync(); + +const WithPowersync = ({ children }: PropsWithChildren) => { + return {children}; +}; + ReactDOM.createRoot(document.getElementById("root")!).render( Une erreur s'est produite}> + {/* */} - + + + + diff --git a/packages/frontend/src/routes/edit.$reportId.tsx b/packages/frontend/src/routes/edit.$reportId.tsx index df46a13a..3135f18d 100644 --- a/packages/frontend/src/routes/edit.$reportId.tsx +++ b/packages/frontend/src/routes/edit.$reportId.tsx @@ -3,7 +3,6 @@ import { SyncFormBanner } from "#components/SyncForm"; import { Tabs } from "#components/Tabs"; import { css } from "#styled-system/css"; import { Box, Flex } from "#styled-system/jsx"; -import type { Report } from "@cr-vif/electric-client/frontend"; import { createFileRoute, useNavigate } from "@tanstack/react-router"; import { useLiveQuery } from "electric-sql/react"; import { useEffect, useRef } from "react"; @@ -16,28 +15,31 @@ import { type UseFormProps, type UseFormRegister, } from "react-hook-form"; -import { db, electric } from "../db"; import { InfoForm } from "../features/InfoForm"; import { NotesForm } from "../features/NotesForm"; import { DisabledContext } from "../features/DisabledContext"; import { useQuery } from "@tanstack/react-query"; import { useCanEditReport } from "../hooks/useCanEditReport"; +import { db, useDbQuery } from "../db/db"; +import { Report } from "../db/AppSchema"; const EditReport = () => { const { reportId } = Route.useParams(); - useQuery({ - queryKey: ["report", reportId], - queryFn: () => - electric.db.report.sync({ - where: { id: reportId }, - include: { - pictures: true, - }, - }), - }); + // useQuery({ + // queryKey: ["report", reportId], + // queryFn: () => + // electric.db.report.sync({ + // where: { id: reportId }, + // include: { + // pictures: true, + // }, + // }), + // }); + + const reportQuery = useDbQuery(db.selectFrom("report").where("id", "=", reportId).selectAll()); - const { results: report } = useLiveQuery(db.report.liveUnique({ where: { id: reportId } })); + const report = reportQuery.data?.[0]; return {report ? : null}; }; diff --git a/packages/frontend/src/routes/index.tsx b/packages/frontend/src/routes/index.tsx index 2f9ab2c2..93da308f 100644 --- a/packages/frontend/src/routes/index.tsx +++ b/packages/frontend/src/routes/index.tsx @@ -12,8 +12,9 @@ import { createFileRoute, redirect, useNavigate } from "@tanstack/react-router"; import { useState } from "react"; import { v4 } from "uuid"; import { ElectricStatus, useElectricStatus, useUser } from "../contexts/AuthContext"; -import { db } from "../db"; import { AllReports, MyReports } from "../features/ReportList"; +import { db, powerSyncDb, useDbQuery } from "../db/db"; +import { useStatus } from "@powersync/react"; const Index = () => { const [search, setSearch] = useState(""); @@ -41,21 +42,38 @@ const Index = () => { const navigate = useNavigate(); const createReportMutation = useMutation({ - mutationFn: () => - db.report.create({ - data: { - id: `report-${v4()}`, + mutationFn: async () => { + const id = "report-" + v4(); + await db + .insertInto("report") + .values({ + id, createdBy: user.id, - createdAt: new Date(), - meetDate: new Date(), - disabled: false, - udap_id: user.udap.id, + createdAt: new Date().toISOString(), + meetDate: new Date().toISOString(), + disabled: 0, + udap_id: user.udap_id, redactedBy: user.name, redactedById: user.id, - }, - }), - onSuccess: (data) => { - data.id && navigate({ to: "/edit/$reportId", params: { reportId: data.id } }); + }) + .execute(); + + return id; + }, + // db.report.create({ + // data: { + // id: `report-${v4()}`, + // createdBy: user.id, + // createdAt: new Date(), + // meetDate: new Date(), + // disabled: false, + // udap_id: user.udap.id, + // redactedBy: user.name, + // redactedById: user.id, + // }, + // }), + onSuccess: (id) => { + id && navigate({ to: "/edit/$reportId", params: { reportId: id } }); }, }); @@ -155,17 +173,8 @@ const Index = () => { }; const SimpleBanner = (props: CenterProps) => { - const electricStatus = useElectricStatus(); - - const electricStatusToStatus: Record = { - error: "offline", - loading: "pending", - pending: "pending", - idle: "offline", - success: "saved", - }; - - const status: SyncFormStatus = electricStatusToStatus[electricStatus] || "saved"; + const powerSyncStatus = useStatus(); + const status = powerSyncStatus.connected ? "saved" : "offline"; return ; }; diff --git a/packages/frontend/src/routes/pdf.$reportId.tsx b/packages/frontend/src/routes/pdf.$reportId.tsx index 2e5b8cd2..048e29fe 100644 --- a/packages/frontend/src/routes/pdf.$reportId.tsx +++ b/packages/frontend/src/routes/pdf.$reportId.tsx @@ -6,21 +6,18 @@ import { css, cx } from "#styled-system/css"; import { Center, Flex, Stack, styled } from "#styled-system/jsx"; import Button from "@codegouvfr/react-dsfr/Button"; import Input from "@codegouvfr/react-dsfr/Input"; -import type { Report, Service_instructeurs, Udap } from "@cr-vif/electric-client/frontend"; import { ReportPDFDocument, ReportPDFDocumentProps, getReportHtmlString } from "@cr-vif/pdf"; import { usePdf } from "@mikecousins/react-pdf"; import { pdf } from "@react-pdf/renderer"; import { useMutation, useQuery } from "@tanstack/react-query"; import { createFileRoute, useNavigate, useRouter } from "@tanstack/react-router"; import { Editor } from "@tiptap/react"; -import { useLiveQuery } from "electric-sql/react"; import { makeArrayOf } from "pastable"; import { PropsWithChildren, ReactNode, useContext, useEffect, useMemo, useRef, useState } from "react"; import { FormProvider, useForm, useFormContext } from "react-hook-form"; import { api } from "../api"; import sentImage from "../assets/sent.svg"; import { useUser } from "../contexts/AuthContext"; -import { db } from "../db"; import { useChipOptions } from "../features/chips/useChipOptions"; import { TextEditor } from "../features/text-editor/TextEditor"; import { TextEditorContext, TextEditorContextProvider } from "../features/text-editor/TextEditorContext"; @@ -30,7 +27,8 @@ import { v4 } from "uuid"; import Alert from "@codegouvfr/react-dsfr/Alert"; import { fr } from "@codegouvfr/react-dsfr"; import { transformBold } from "../features/menu/ClauseMenu"; -import { Pictures } from "../../../electric-client/src/generated/client/index"; +import { db, useDbQuery } from "../db/db"; +import { Pictures, Report, Udap } from "../db/AppSchema"; type Mode = "edit" | "view" | "send" | "sent"; @@ -59,23 +57,38 @@ export const PDF = () => { navigate({ search: { mode: mode === "edit" ? "view" : "edit" }, replace: true }); }; - const reportQuery = useLiveQuery( - db.report.liveUnique({ where: { id: reportId }, include: { user: true, pictures: true } }), - ); - const reportRef = useRef<(Report & { pictures?: Pictures[] }) | null>(null); + const reportQuery = useQuery({ + queryKey: ["report", reportId], + queryFn: async () => { + const reportQuery = await db.selectFrom("report").where("id", "=", reportId).selectAll().execute(); + const picturesQuery = await db.selectFrom("pictures").where("reportId", "=", reportId).selectAll().execute(); + const report = reportQuery?.[0]; + const pictures = picturesQuery ?? []; + + return { ...report, pictures }; + }, + }); + + // useDbQuery(db.selectFrom("report").where("id", "=", reportId).selectAll(), undefined, { + // runQueryOnce: true, + // }); + // const picturesQuery = useDbQuery(db.selectFrom("pictures").where("report_id", "=", reportId).selectAll(), undefined, { + const report = reportQuery.data; const snapshotQuery = useQuery({ queryKey: ["report-snapshot", reportId], queryFn: async () => { - const snapshot = await db.pdf_snapshot.findFirst({ where: { report_id: reportId } }); + const snapshotQuery = await db.selectFrom("pdf_snapshot").where("report_id", "=", reportId).selectAll().execute(); + const snapshot = snapshotQuery?.[0]; + if (!snapshot || !snapshot.report) return null; try { const snapshotReport = JSON.parse(snapshot.report); const diff = getDiff(snapshotReport, { - ...reportQuery.results!, - createdAt: reportQuery.results!.createdAt?.toISOString(), - meetDate: reportQuery.results!.meetDate?.toISOString(), + ...report, + createdAt: new Date(report!.createdAt!).toISOString(), + meetDate: new Date(report!.meetDate!).toISOString(), }); if (Object.keys(diff).length) return null; @@ -85,36 +98,40 @@ export const PDF = () => { return null; } }, - enabled: !!reportQuery.results, + enabled: !!report, }); - const serviceInstructeurQuery = useLiveQuery( - db.service_instructeurs.liveUnique({ where: { id: reportQuery.results?.serviceInstructeur ?? undefined } }), - ); - const serviceInstructeur = serviceInstructeurQuery.results; - const isServiceInstructeurLoaded = reportQuery.results?.serviceInstructeur ? !!serviceInstructeur : true; + const serviceInstructeurQuery = useQuery({ + queryKey: ["service-instructeur", report?.serviceInstructeur], + queryFn: async () => { + return await db + .selectFrom("service_instructeurs") + .where("id", "=", report!.serviceInstructeur!) + .selectAll() + .execute(); + }, + enabled: !!report?.serviceInstructeur, + }); - if (!reportRef.current && reportQuery.results) { - reportRef.current = reportQuery.results; - } + const serviceInstructeur = serviceInstructeurQuery.data?.[0]; + const isServiceInstructeurLoaded = report?.serviceInstructeur ? !!serviceInstructeur : true; - const report = reportRef.current; const htmlString = snapshotQuery.data; const saveSnapshotMutation = useMutation( async ({ report, html }: { report: string; html: string }) => { - await db.pdf_snapshot.deleteMany({ - where: { report_id: reportId, user_id: user.id }, - }); - await db.pdf_snapshot.create({ - data: { + await db.deleteFrom("pdf_snapshot").where("report_id", "=", reportId).where("user_id", "=", user.id).execute(); + + await db + .insertInto("pdf_snapshot") + .values({ id: v4(), report_id: reportId, report, html, user_id: user.id, - }, - }); + }) + .execute(); }, { onSuccess: () => toggleMode() }, ); @@ -276,8 +293,11 @@ const SendForm = ({ const getBaseRecipients = async (report: Report) => { const serviceEmail = report.serviceInstructeur - ? (await db.service_instructeurs.findFirst({ where: { id: report.serviceInstructeur } }))?.email + ? ( + await db.selectFrom("service_instructeurs").where("id", "=", report.serviceInstructeur).selectAll().execute() + )?.[0]?.email : null; + const recipients = [serviceEmail, report.applicantEmail].filter(Boolean).join(", "); return recipients; }; @@ -383,8 +403,6 @@ export const WithReport = ({ const { editor } = useContext(TextEditorContext); const [htmlString] = useState(initialHtmlString); - console.log(report); - useEffect(() => { if (!editor) return; @@ -483,14 +501,14 @@ const PdfCanvasPage = ({ file, page }: { file: string; page: number }) => { const SendReportPage = ({ children }: PropsWithChildren) => { const { reportId } = Route.useParams(); - const reportQuery = useLiveQuery(db.report.liveUnique({ where: { id: reportId } })); + // const reportQuery = useLiveQuery(db.report.liveUnique({ where: { id: reportId } })); + const reportQuery = useDbQuery(db.selectFrom("report").where("id", "=", reportId).selectAll()); const form = useFormContext(); - const isLoading = !reportQuery.updatedAt; - if (isLoading) return null; + if (reportQuery.isLoading) return null; - const report = reportQuery.results; + const report = reportQuery.data?.[0]; if (!report) return
Report not found
; diff --git a/packages/frontend/src/routes/reset-password.$link.tsx b/packages/frontend/src/routes/reset-password.$link.tsx index 1a0a0581..a562dfa8 100644 --- a/packages/frontend/src/routes/reset-password.$link.tsx +++ b/packages/frontend/src/routes/reset-password.$link.tsx @@ -22,7 +22,6 @@ const ResetPasswordAction = () => {

Veuillez saisir votre nouveau mot de passe

mutation.mutate(values))}> - {/* TODO: LA */} Valider diff --git a/packages/frontend/src/service-worker/electric.ts b/packages/frontend/src/service-worker/electric.ts index 9960f9a7..f5ec833d 100644 --- a/packages/frontend/src/service-worker/electric.ts +++ b/packages/frontend/src/service-worker/electric.ts @@ -1,16 +1,10 @@ -import { ENV } from "../envVars"; -import { schema } from "@cr-vif/electric-client/frontend"; -import { electrify, ElectricDatabase } from "electric-sql/wa-sqlite"; -import type { ElectricConfig } from "electric-sql/config"; - export const initElectric = async () => { - console.log(ENV); - const config = { - url: ENV.VITE_ELECTRIC_URL, - } satisfies ElectricConfig; - const conn = await ElectricDatabase.init("crvif.db", "/"); - const electric = await electrify(conn, schema, config); - const db = electric.db; - - return { electric, db }; + // console.log(ENV); + // const config = { + // url: ENV.VITE_ELECTRIC_URL, + // } satisfies ElectricConfig; + // const conn = await ElectricDatabase.init("crvif.db", "/"); + // const electric = await electrify(conn, schema, config); + // const db = electric.db; + // return { electric, db }; }; diff --git a/packages/frontend/src/service-worker/sw.ts b/packages/frontend/src/service-worker/sw.ts index 2a111db6..df20930b 100644 --- a/packages/frontend/src/service-worker/sw.ts +++ b/packages/frontend/src/service-worker/sw.ts @@ -1,7 +1,4 @@ import { cleanupOutdatedCaches, createHandlerBoundToURL, precacheAndRoute } from "workbox-precaching"; -import { apiStore, createApiClientWithUrl, getTokenFromIdb } from "../api"; -import { getPicturesStore, getToPingStore, getToUploadStore, getUploadStatusStore } from "../features/idb"; -import { get, keys, del, set } from "idb-keyval"; import { NavigationRoute, registerRoute } from "workbox-routing"; import { isDev } from "../envVars"; @@ -23,140 +20,3 @@ if (!isDev) { const handler = createHandlerBoundToURL("/index.html"); registerRoute(new NavigationRoute(handler)); } - -const broadcastChannel = new BroadcastChannel("sw-messages"); - -self.addEventListener("sync", async (event: any) => { - event.waitUntil(syncPictureAndLines()); -}); - -const syncPictureAndLines = async () => { - await syncMissingPictures(); - await syncPictureLines(); -}; - -const syncPictureLines = async () => { - try { - const token = await getTokenFromIdb(); - if (!token) return void console.log("no token"); - - const pictureIds = await keys(getToPingStore()); - - console.log("syncing", pictureIds.length, "picture lines"); - - const url = await get("url", apiStore); - if (!url) return void console.error("no backend url in service worker"); - - const api = createApiClientWithUrl(url); - - for (let i = 0; i < pictureIds.length; i++) { - const picId = pictureIds[i]; - await set(picId, "uploading", getUploadStatusStore()); - console.log("syncing picture lines for", picId); - - const linesRaw = await get(picId, getToPingStore()); - const lines = JSON.parse(linesRaw); - broadcastChannel.postMessage({ type: "status", id: picId, status: "uploading" }); - - await api.post( - `/api/upload/picture/${picId}/lines` as any, - { - body: { lines }, - header: { Authorization: `Bearer ${token}` }, - } as any, - ); - - await del(picId, getToPingStore()); - - broadcastChannel.postMessage({ type: "status", id: picId, status: "success" }); - await set(picId, "success", getUploadStatusStore()); - } - } catch (e) { - console.error("sync error", e); - } -}; - -const syncMissingPictures = async () => { - try { - const token = await getTokenFromIdb(); - if (!token) return void console.log("no token"); - - const pictureIds = await keys(getToUploadStore()); - - console.log("syncing", pictureIds.length, "missing pictures"); - - await syncPicturesById(pictureIds as string[], token); - } catch (e) { - console.error("sync error", e); - } -}; - -const syncPicturesById = async (ids: string[], token: string) => { - const store = getPicturesStore(); - const toUploadStore = getToUploadStore(); - - const localIds = await keys(store); - const missingIds = ids.filter((picId) => localIds.includes(picId)); - - const url = await get("url", apiStore); - - if (!url) return void console.error("no backend url in service worker"); - - const api = createApiClientWithUrl(url); - - for (const picId of missingIds) { - try { - await set(picId, "uploading", getUploadStatusStore()); - broadcastChannel.postMessage({ type: "status", id: picId, status: "uploading" }); - - const reportId = await get(picId, toUploadStore); - - console.log("syncing picture", picId); - const buffer = await get(picId, store); - if (!buffer) { - console.log("missing buffer for id", picId); - continue; - } - - const formData = new FormData(); - formData.append("file", new Blob([buffer]), "file"); - formData.append("reportId", reportId); - formData.append("pictureId", picId); - - await api.post("/api/upload/image", { - body: formData, - query: { reportId: reportId, id: picId }, - header: { Authorization: `Bearer ${token}` }, - } as any); - - await del(picId, toUploadStore); - - await set(picId, "success", getUploadStatusStore()); - broadcastChannel.postMessage({ type: "status", id: picId, status: "success" }); - - console.log("done"); - } catch (e) { - await set(picId, "error", getUploadStatusStore()); - broadcastChannel.postMessage({ type: "status", id: picId, status: "error" }); - } - } -}; - -// const cleanupOldCaches = async () => { -// const db = await getDb(); - -// const keysToKeep = await db.pictures.findMany({ where: { url: null } }); - -// const store = getPicturesStore(); -// const localIds = await keys(store); - -// const keysToDelete = localIds.filter((id) => !keysToKeep.some((pic) => pic.id === id)); - -// console.log("deleting", keysToDelete.length, "old pictures"); - -// for (const key of keysToDelete) { -// await del(key, store); -// } - -// console.log("done"); -// }; diff --git a/packages/frontend/vite.config.ts b/packages/frontend/vite.config.ts index 0849f9a3..5417c80b 100644 --- a/packages/frontend/vite.config.ts +++ b/packages/frontend/vite.config.ts @@ -49,9 +49,17 @@ export default defineConfig({ filename: "sw.ts", }), ], + optimizeDeps: { + exclude: ["@journeyapps/wa-sqlite", "@powersync/web"], + include: ["@powersync/web > js-logger"], + }, envDir: "../..", preview: {}, build: { target: "esnext", }, + worker: { + format: "es", + plugins: () => [wasm(), topLevelAwait()], + }, }); diff --git a/packages/pdf/package.json b/packages/pdf/package.json index 81aaac30..60b4a380 100644 --- a/packages/pdf/package.json +++ b/packages/pdf/package.json @@ -13,7 +13,6 @@ "author": "", "license": "ISC", "devDependencies": { - "@cr-vif/electric-client": "workspace:*", "@types/react": "^18.2.64", "typescript": "^5.4.5" }, diff --git a/packages/pdf/src/report.tsx b/packages/pdf/src/report.tsx index 1ea7e244..f28b930b 100644 --- a/packages/pdf/src/report.tsx +++ b/packages/pdf/src/report.tsx @@ -1,8 +1,8 @@ import { Document, Font, Image, Page, Text, View } from "@react-pdf/renderer"; import { Html } from "react-pdf-html"; import React from "react"; -import type { Udap, Report, Service_instructeurs, Clause_v2, Pictures } from "@cr-vif/electric-client/frontend"; import { Buffer } from "buffer"; +import { Udap, Report, ServiceInstructeurs, Clause_v2, Pictures } from "../../frontend/src/db/AppSchema"; export const initFonts = (folder: string = "") => { // Font.register({ @@ -241,7 +241,7 @@ export const getReportHtmlString = ( report: ReportWithUser, chipOptions: Clause_v2[], udap: Udap, - serviceInstructeur?: Service_instructeurs, + serviceInstructeur?: ServiceInstructeurs, ) => { const spaceType = chipOptions.find((chip) => chip.key === "type-espace" && chip.value === report.projectSpaceType); const decision = chipOptions.find((chip) => chip.key === "decision" && chip.value === report.decision); @@ -334,7 +334,7 @@ export const getReportHtmlString = ( `); }; -const formatServiceInstructeur = (serviceInstructeur: Service_instructeurs) => { +const formatServiceInstructeur = (serviceInstructeur: ServiceInstructeurs) => { const contact = [serviceInstructeur.email, serviceInstructeur.tel].filter(Boolean).join(", "); return `${serviceInstructeur.full_name}${contact ? `, ${contact}` : ""}.`; }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6064d21..9ff4eea7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,9 +31,15 @@ importers: '@types/node': specifier: ^20.11.28 version: 20.12.3 - electric-sql: - specifier: ^0.12.1 - version: 0.12.1(pg@8.11.5)(prisma@4.8.1)(zod@3.21.1) + cross-env: + specifier: ^7.0.3 + version: 7.0.3 + dotenv: + specifier: ^16.4.5 + version: 16.4.5 + dotenv-expand: + specifier: ^11.0.6 + version: 11.0.6 prettier: specifier: ^3.2.5 version: 3.2.5 @@ -43,6 +49,9 @@ importers: typed-openapi: specifier: ^0.4.1 version: 0.4.1(openapi-types@12.1.3) + vite-node: + specifier: ^1.4.0 + version: 1.4.0(@types/node@20.12.3) packages/backend: dependencies: @@ -65,8 +74,8 @@ importers: specifier: ^3.0.0 version: 3.0.0 '@fastify/type-provider-typebox': - specifier: ^4.0.0 - version: 4.0.0(@sinclair/typebox@0.32.20) + specifier: ^4.1.0 + version: 4.1.0(@sinclair/typebox@0.32.20) '@prisma/client': specifier: ^4.8.1 version: 4.16.2(prisma@4.8.1) @@ -79,6 +88,9 @@ importers: '@sinclair/typebox': specifier: ^0.32.20 version: 0.32.20 + '@types/pg': + specifier: ^8.11.10 + version: 8.11.10 canvas: specifier: ^2.11.2 version: 2.11.2 @@ -96,7 +108,7 @@ importers: version: 11.0.6 drizzle-orm: specifier: ^0.30.4 - version: 0.30.6(@types/better-sqlite3@7.6.9)(@types/react@18.2.74)(pg@8.11.5)(postgres@3.4.4)(react@18.2.0) + version: 0.30.6(@types/better-sqlite3@7.6.9)(@types/pg@8.11.10)(@types/react@18.2.74)(kysely@0.27.4)(pg@8.13.1)(postgres@3.4.4)(react@18.2.0) drizzle-typebox: specifier: ^0.1.1 version: 0.1.1(@sinclair/typebox@0.32.20)(drizzle-orm@0.30.6) @@ -109,15 +121,24 @@ importers: fastify-multer: specifier: ^2.0.3 version: 2.0.3 + jose: + specifier: ^5.9.6 + version: 5.9.6 jsonwebtoken: specifier: ^9.0.2 version: 9.0.2 + kysely: + specifier: ^0.27.4 + version: 0.27.4 nodemailer: specifier: ^6.9.13 version: 6.9.13 pastable: specifier: ^2.2.1 version: 2.2.1(react@18.2.0) + pg: + specifier: ^8.13.1 + version: 8.13.1 postgres: specifier: ^3.4.4 version: 3.4.4 @@ -140,9 +161,6 @@ importers: specifier: ^3.22.4 version: 3.22.4 devDependencies: - '@cr-vif/electric-client': - specifier: workspace:* - version: link:../electric-client '@cr-vif/pdf': specifier: workspace:* version: link:../pdf @@ -176,6 +194,9 @@ importers: drizzle-kit: specifier: ^0.20.14 version: 0.20.14 + kysely-codegen: + specifier: ^0.17.0 + version: 0.17.0(kysely@0.27.4)(pg@8.13.1) tsup: specifier: ^8.0.2 version: 8.0.2(postcss@8.4.38)(typescript@5.4.3) @@ -188,34 +209,9 @@ importers: vite-node: 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) - '@sinclair/typebox': - specifier: ^0.32.20 - version: 0.32.20 - electric-sql: - specifier: ^0.12.1 - version: 0.12.1(pg@8.11.5)(prisma@4.8.1)(react-dom@18.2.0)(react@18.2.0)(vue@2.7.16)(wa-sqlite@0.9.13)(zod@3.22.4) - zod: - specifier: ^3.22.4 - version: 3.22.4 - devDependencies: - dotenv-cli: - specifier: ^7.4.1 - version: 7.4.1 - prisma: - specifier: ^4.8.1 - version: 4.8.1 - prisma-typebox-generator: - specifier: ^2.1.0 - version: 2.1.0 - vite-node: - specifier: ^1.4.0 - version: 1.4.0(@types/node@20.12.3) + vitest: + specifier: ^2.1.5 + version: 2.1.5(@types/node@20.12.3) packages/frontend: dependencies: @@ -228,9 +224,6 @@ importers: '@codegouvfr/react-dsfr': specifier: ^1.9.2 version: 1.9.6 - '@cr-vif/electric-client': - specifier: workspace:* - version: link:../electric-client '@cr-vif/pdf': specifier: workspace:* version: link:../pdf @@ -246,12 +239,24 @@ importers: '@gouvfr/dsfr-chart': specifier: ^1.0.0 version: 1.0.0(webpack@5.91.0) + '@journeyapps/wa-sqlite': + specifier: ^0.4.2 + version: 0.4.2 '@mikecousins/react-pdf': specifier: ^7.1.0 version: 7.1.0(pdfjs-dist@4.3.136)(react-dom@18.2.0)(react@18.2.0) '@mui/material': specifier: ^5.15.15 version: 5.15.15(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@types/react@18.2.74)(react-dom@18.2.0)(react@18.2.0) + '@powersync/kysely-driver': + specifier: ^1.0.0 + version: 1.0.0(@powersync/common@1.21.0) + '@powersync/react': + specifier: ^1.5.1 + version: 1.5.1(@powersync/common@1.21.0)(react@18.2.0) + '@powersync/web': + specifier: ^1.10.2 + version: 1.10.2(@journeyapps/wa-sqlite@0.4.2)(@powersync/common@1.21.0) '@prisma/client': specifier: ^4.8.1 version: 4.16.2(prisma@4.8.1) @@ -312,15 +317,18 @@ importers: date-fns: specifier: ^3.6.0 version: 3.6.0 - electric-sql: - specifier: ^0.12.1 - version: 0.12.1(pg@8.11.5)(prisma@4.8.1)(react-dom@18.2.0)(react@18.2.0)(vue@2.7.16)(wa-sqlite@0.9.13)(zod@3.22.4) idb-keyval: specifier: ^6.2.1 version: 6.2.1 install: specifier: ^0.13.0 version: 0.13.0 + js-logger: + specifier: ^1.6.1 + version: 1.6.1 + kysely: + specifier: ^0.27.4 + version: 0.27.4 npm: specifier: ^10.5.0 version: 10.5.0 @@ -488,9 +496,6 @@ importers: specifier: ^2.0.4 version: 2.0.4(patch_hash=ajbwlajmqkscjlvqhgfpcsaiai)(@react-pdf/renderer@3.4.2)(react@18.2.0) devDependencies: - '@cr-vif/electric-client': - specifier: workspace:* - version: link:../electric-client '@types/react': specifier: ^18.2.64 version: 18.2.74 @@ -3307,17 +3312,6 @@ packages: superjson: 2.2.1 dev: true - /@electric-sql/prisma-generator@1.1.5: - resolution: {integrity: sha512-O7+DCq1QDmFY7Y5BfeD9e7ftUWpKLAQ+lz2qRuExtMtkfsvZPwAOmu6HhTBaLdo+/rZz1wnAEdnzksFv4LlgAw==} - hasBin: true - dependencies: - '@prisma/generator-helper': 4.16.2 - code-block-writer: 11.0.3 - lodash: 4.17.21 - zod: 3.21.1 - transitivePeerDependencies: - - supports-color - /@emotion/babel-plugin@11.11.0: resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} dependencies: @@ -4194,10 +4188,10 @@ packages: - supports-color dev: false - /@fastify/type-provider-typebox@4.0.0(@sinclair/typebox@0.32.20): - resolution: {integrity: sha512-kTlN0saC/+xhcQPyBjb3YONQAMjiD/EHlCRjQjsr5E3NFjS5K8ZX5LGzXYDRjSa+sV4y8gTL5Q7FlObePv4iTA==} + /@fastify/type-provider-typebox@4.1.0(@sinclair/typebox@0.32.20): + resolution: {integrity: sha512-mXNBaBEoS6Yf4/O2ujNhu9yEZwvBC7niqRESsiftE9NP1hV6ZdV3ZsFbPf1S520BK3rTZ0F28zr+sMdIXNJlfw==} peerDependencies: - '@sinclair/typebox': '>=0.26 <=0.32' + '@sinclair/typebox': '>=0.26 <=0.33' dependencies: '@sinclair/typebox': 0.32.20 dev: false @@ -4295,6 +4289,10 @@ packages: wrap-ansi: 8.1.0 wrap-ansi-cjs: /wrap-ansi@7.0.0 + /@journeyapps/wa-sqlite@0.4.2: + resolution: {integrity: sha512-xdpDLbyC/DHkNcnXCfgBXUgfy+ff1w/sxVY6mjdGP8F4bgxnSQfUyN8+PNE2nTgYUx4y5ar57MEnSty4zjIm7Q==} + dev: false + /@jridgewell/gen-mapping@0.3.5: resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -4320,6 +4318,10 @@ packages: /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + /@jridgewell/sourcemap-codec@1.5.0: + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + dev: true + /@jridgewell/trace-mapping@0.3.25: resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} dependencies: @@ -5095,22 +5097,47 @@ packages: resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} dev: false - /@prisma/client@4.16.2(prisma@4.8.1): - resolution: {integrity: sha512-qCoEyxv1ZrQ4bKy39GnylE8Zq31IRmm8bNhNbZx7bF2cU5aiCCnSa93J2imF88MBjn7J9eUQneNxUQVJdl/rPQ==} - engines: {node: '>=14.17'} - requiresBuild: true + /@powersync/common@1.21.0: + resolution: {integrity: sha512-G77WGytQb3JwqE9vlxcQZwf8w/tBYGJfU99RqJMrD5Tyb4VrCeOrEcmulmL/M7Q+ZYOjpIhpVwQZB+pNocY0jg==} + dependencies: + js-logger: 1.6.1 + dev: false + + /@powersync/kysely-driver@1.0.0(@powersync/common@1.21.0): + resolution: {integrity: sha512-TqYRhp51ZwQFMXqZdQy59jGZsYfiIs10LvoE8dy70LOaVYUJ9DbFSmNocMkHtXYDQU0Z8h+EGVcBwskhQpRoRA==} peerDependencies: - prisma: '*' - peerDependenciesMeta: - prisma: - optional: true + '@powersync/common': ^1.20.2 dependencies: - '@prisma/engines-version': 4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81 - prisma: 4.8.1 + '@powersync/common': 1.21.0 + kysely: 0.27.4 + dev: false + + /@powersync/react@1.5.1(@powersync/common@1.21.0)(react@18.2.0): + resolution: {integrity: sha512-x/uKsNOoDzUjdXgCMMrJmpZQMTEpddk64XDjW684bFsld3fqL0t5t3ULOpAHsm1vl/hKh77Xa9nthLUCXpKSgw==} + peerDependencies: + '@powersync/common': ^1.21.0 + react: '*' + dependencies: + '@powersync/common': 1.21.0 + react: 18.2.0 + dev: false + + /@powersync/web@1.10.2(@journeyapps/wa-sqlite@0.4.2)(@powersync/common@1.21.0): + resolution: {integrity: sha512-s01lXkUx7GcdyWDV2p9StHWf9h0vm3TWi0Pc/hWGexOldbiiCFDad1QyC1OxMpSdIAEuFa6yb0Eu0BAsS05jYQ==} + peerDependencies: + '@journeyapps/wa-sqlite': ^0.4.2 + '@powersync/common': ^1.21.0 + dependencies: + '@journeyapps/wa-sqlite': 0.4.2 + '@powersync/common': 1.21.0 + async-mutex: 0.4.1 + bson: 6.9.0 + comlink: 4.4.2 + js-logger: 1.6.1 dev: false - /@prisma/client@4.8.1(prisma@4.8.1): - resolution: {integrity: sha512-d4xhZhETmeXK/yZ7K0KcVOzEfI5YKGGEr4F5SBV04/MU4ncN/HcE28sy3e4Yt8UFW0ZuImKFQJE+9rWt9WbGSQ==} + /@prisma/client@4.16.2(prisma@4.8.1): + resolution: {integrity: sha512-qCoEyxv1ZrQ4bKy39GnylE8Zq31IRmm8bNhNbZx7bF2cU5aiCCnSa93J2imF88MBjn7J9eUQneNxUQVJdl/rPQ==} engines: {node: '>=14.17'} requiresBuild: true peerDependencies: @@ -5119,203 +5146,18 @@ packages: prisma: optional: true dependencies: - '@prisma/engines-version': 4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe + '@prisma/engines-version': 4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81 prisma: 4.8.1 - - /@prisma/debug@2.30.0: - resolution: {integrity: sha512-PCEBFJxOmtLhPcl7VdLeVabSHJnlqWMCR4J1y6H+WvqtCt8oMwhgWu4z2Wgh2baphHC3T87+iQVU5BtZX+b5mA==} - dependencies: - '@types/debug': 4.1.7 - debug: 4.3.2 - ms: 2.1.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@prisma/debug@2.30.3: - resolution: {integrity: sha512-hMsCl6ZA718vgKuTRd1+qeetzGSVkZEIEUTfeT5rPtklgqDytQ01nRNN74gLeoSI64tyGg/pvSX1wgAioMuyiQ==} - dependencies: - '@types/debug': 4.1.7 - debug: 4.3.2 - ms: 2.1.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@prisma/debug@4.16.2: - resolution: {integrity: sha512-7L7WbG0qNNZYgLpsVB8rCHCXEyHFyIycRlRDNwkVfjQmACC2OW6AWCYCbfdjQhkF/t7+S3njj8wAWAocSs+Brw==} - dependencies: - '@types/debug': 4.1.8 - debug: 4.3.4 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - supports-color - - /@prisma/engine-core@2.30.3: - resolution: {integrity: sha512-5wVfwRiEgCHgd6/V7ZaegsBT5lJ/RuF/vRgFKKEqVfeGvSQAkm3GtuvhDdIcjovJPazfQciJM8zaG8Pu3bdgWw==} - dependencies: - '@prisma/debug': 2.30.3 - '@prisma/engines': 2.30.1-2.b8c35d44de987a9691890b3ddf3e2e7effb9bf20 - '@prisma/generator-helper': 2.30.3 - '@prisma/get-platform': 2.30.1-2.b8c35d44de987a9691890b3ddf3e2e7effb9bf20 - chalk: 4.1.2 - execa: 5.1.1 - get-stream: 6.0.1 - indent-string: 4.0.0 - new-github-issue-url: 0.2.1 - p-retry: 4.6.1 - terminal-link: 2.1.1 - undici: 3.3.6 - transitivePeerDependencies: - - supports-color - dev: true + dev: false /@prisma/engines-version@4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81: resolution: {integrity: sha512-q617EUWfRIDTriWADZ4YiWRZXCa/WuhNgLTVd+HqWLffjMSPzyM5uOWoauX91wvQClSKZU4pzI4JJLQ9Kl62Qg==} dev: false - /@prisma/engines-version@4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe: - resolution: {integrity: sha512-MHSOSexomRMom8QN4t7bu87wPPD+pa+hW9+71JnVcF3DqyyO/ycCLhRL1we3EojRpZxKvuyGho2REQsMCvxcJw==} - - /@prisma/engines@2.30.1-2.b8c35d44de987a9691890b3ddf3e2e7effb9bf20: - resolution: {integrity: sha512-WPnA/IUrxDihrRhdP6+8KAVSwsc0zsh8ioPYsLJjOhzVhwpRbuFH2tJDRIAbc+qFh+BbTIZbeyBYt8fpNXaYQQ==} - requiresBuild: true - dev: true - /@prisma/engines@4.8.1: resolution: {integrity: sha512-93tctjNXcIS+i/e552IO6tqw17sX8liivv8WX9lDMCpEEe3ci+nT9F+1oHtAafqruXLepKF80i/D20Mm+ESlOw==} requiresBuild: true - /@prisma/fetch-engine@2.30.1-2.b8c35d44de987a9691890b3ddf3e2e7effb9bf20: - resolution: {integrity: sha512-kGbNAtmke1DP9Lj9kFFJp39t7IaQu7mKCGdjQT3+DzgXRLtHmv92zNguGuSVj+E+GBfBvzLOs4yBtUIU8KIgQw==} - dependencies: - '@prisma/debug': 2.30.0 - '@prisma/get-platform': 2.30.1-2.b8c35d44de987a9691890b3ddf3e2e7effb9bf20 - chalk: 4.1.2 - execa: 5.1.1 - find-cache-dir: 3.3.2 - hasha: 5.2.2 - http-proxy-agent: 4.0.1 - https-proxy-agent: 5.0.1 - make-dir: 3.1.0 - node-fetch: 2.7.0 - p-filter: 2.1.0 - p-map: 4.0.0 - p-retry: 4.6.2 - progress: 2.0.3 - rimraf: 3.0.2 - temp-dir: 2.0.0 - tempy: 1.0.1 - transitivePeerDependencies: - - encoding - - supports-color - dev: true - - /@prisma/generator-helper@2.30.3: - resolution: {integrity: sha512-HM43m9RHlDzC8yZJaPIDDfPChiXGC4l3oH85Esxn2F/bVvP60VSpXC+EHHzBRhexDpNgpRNQBHqQJoxbo+O/1Q==} - dependencies: - '@prisma/debug': 2.30.3 - '@types/cross-spawn': 6.0.2 - chalk: 4.1.2 - cross-spawn: 7.0.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@prisma/generator-helper@4.16.2: - resolution: {integrity: sha512-bMOH7y73Ui7gpQrioFeavMQA+Tf8ksaVf8Nhs9rQNzuSg8SSV6E9baczob0L5KGZTSgYoqnrRxuo03kVJYrnIg==} - dependencies: - '@prisma/debug': 4.16.2 - '@types/cross-spawn': 6.0.2 - cross-spawn: 7.0.3 - kleur: 4.1.5 - transitivePeerDependencies: - - supports-color - - /@prisma/get-platform@2.30.1-2.b8c35d44de987a9691890b3ddf3e2e7effb9bf20: - resolution: {integrity: sha512-MPAwDBpWpEMRwlxx+P3DTOti5cZuuthtRLel5FK3QE4rN45jF4IN4Xi1baNv/04uYhrwKztQmMH30YwgCFdMtw==} - dependencies: - '@prisma/debug': 2.30.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@prisma/sdk@2.30.3: - resolution: {integrity: sha512-+6pIH78gqk1N4ZNn0oP5tXx3hpfySv8kMrKxsu3Cc9l3g/Zw4tk/HauTzWYW2r+fdNwNBzQS/aMoCvrPU+RKXg==} - dependencies: - '@prisma/debug': 2.30.3 - '@prisma/engine-core': 2.30.3 - '@prisma/engines': 2.30.1-2.b8c35d44de987a9691890b3ddf3e2e7effb9bf20 - '@prisma/fetch-engine': 2.30.1-2.b8c35d44de987a9691890b3ddf3e2e7effb9bf20 - '@prisma/generator-helper': 2.30.3 - '@prisma/get-platform': 2.30.1-2.b8c35d44de987a9691890b3ddf3e2e7effb9bf20 - '@timsuchanek/copy': 1.4.5 - archiver: 4.0.2 - arg: 5.0.1 - chalk: 4.1.2 - checkpoint-client: 1.1.20 - cli-truncate: 2.1.0 - dotenv: 10.0.0 - execa: 5.1.1 - find-up: 5.0.0 - global-dirs: 3.0.0 - globby: 11.0.4 - has-yarn: 2.1.0 - is-ci: 3.0.0 - make-dir: 3.1.0 - node-fetch: 2.6.1 - p-map: 4.0.0 - read-pkg-up: 7.0.1 - resolve: 1.20.0 - rimraf: 3.0.2 - shell-quote: 1.7.2 - string-width: 4.2.2 - strip-ansi: 6.0.0 - strip-indent: 3.0.0 - tar: 6.1.8 - temp-dir: 2.0.0 - temp-write: 4.0.0 - tempy: 1.0.1 - terminal-link: 2.1.1 - tmp: 0.2.1 - transitivePeerDependencies: - - encoding - - supports-color - dev: true - - /@protobufjs/aspromise@1.1.2: - resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} - - /@protobufjs/base64@1.1.2: - resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} - - /@protobufjs/codegen@2.0.4: - resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} - - /@protobufjs/eventemitter@1.1.0: - resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} - - /@protobufjs/fetch@1.1.0: - resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} - dependencies: - '@protobufjs/aspromise': 1.1.2 - '@protobufjs/inquire': 1.1.0 - - /@protobufjs/float@1.0.2: - resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} - - /@protobufjs/inquire@1.1.0: - resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} - - /@protobufjs/path@1.1.2: - resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} - - /@protobufjs/pool@1.1.0: - resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} - - /@protobufjs/utf8@1.1.0: - resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} - /@radix-ui/colors@3.0.0: resolution: {integrity: sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==} dev: true @@ -6589,20 +6431,6 @@ packages: resolution: {integrity: sha512-GnolmC8Fr4mvsHE1fGQmR3Nm0eBO3KnZjDU0a+P3TeQNM/dDscFGxtA7p31NplQNW3KwBw4t1RVFmz0VeKLxcw==} dev: false - /@timsuchanek/copy@1.4.5: - resolution: {integrity: sha512-N4+2/DvfwzQqHYL/scq07fv8yXbZc6RyUxKJoE8Clm14JpLOf9yNI4VB4D6RsV3h9zgzZ4loJUydHKM7pp3blw==} - hasBin: true - dependencies: - '@timsuchanek/sleep-promise': 8.0.1 - commander: 2.20.3 - mkdirp: 1.0.4 - prettysize: 2.0.0 - dev: true - - /@timsuchanek/sleep-promise@8.0.1: - resolution: {integrity: sha512-cxHYbrXfnCWsklydIHSw5GCMHUPqpJ/enxWSyVHNOgNe61sit/+aOXTTI+VOdWkvVaJsI2vsB9N4+YDNITawOQ==} - dev: true - /@tiptap/core@2.4.0(@tiptap/pm@2.4.0): resolution: {integrity: sha512-YJSahk8pkxpCs8SflCZfTnJpE7IPyUWIylfgXM2DefjRQa5DZ+c6sNY0s/zbxKYFQ6AuHVX40r9pCfcqHChGxQ==} peerDependencies: @@ -6907,11 +6735,6 @@ packages: - '@tiptap/pm' dev: false - /@tootallnate/once@1.1.2: - resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} - engines: {node: '>= 6'} - dev: true - /@triplit/client@0.3.33(react@18.2.0): resolution: {integrity: sha512-7s62zkbN7icvBZr25yvJUhtLs3pB75McQP5TksGOA+K8gpb5nSpa47aZ1JZlB2PsEAi03Xh2749Jl7AfTJshrw==} engines: {node: '>=18.0.0'} @@ -6998,11 +6821,6 @@ packages: dependencies: '@types/node': 20.12.3 - /@types/cross-spawn@6.0.2: - resolution: {integrity: sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw==} - dependencies: - '@types/node': 20.12.12 - /@types/css-tree@2.3.7: resolution: {integrity: sha512-LUlutQBpR2TgqZJdvXCPOx9EME7a4PHSEo2Y2c8POFpj1E9a6V94PUZNwjVdfHWyb8RQZoNHTYOKs980+sOi+g==} dev: true @@ -7013,17 +6831,6 @@ packages: '@types/ms': 0.7.34 dev: true - /@types/debug@4.1.7: - resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} - dependencies: - '@types/ms': 0.7.34 - dev: true - - /@types/debug@4.1.8: - resolution: {integrity: sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==} - dependencies: - '@types/ms': 0.7.34 - /@types/eslint-scope@3.7.7: resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} dependencies: @@ -7062,6 +6869,7 @@ packages: /@types/ms@0.7.34: resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} + dev: true /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} @@ -7095,6 +6903,14 @@ packages: resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} dev: false + /@types/pg@8.11.10: + resolution: {integrity: sha512-LczQUW4dbOQzsH2RQ5qoeJ6qJPdrcM/DcMLoqWQkMLMsq83J5lAX3LXjdkWdpscFy67JSOWDnh7Ny/sPFykmkg==} + dependencies: + '@types/node': 20.12.12 + pg-protocol: 1.7.0 + pg-types: 4.0.2 + dev: false + /@types/prop-types@15.7.12: resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} @@ -7133,14 +6949,6 @@ packages: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} dev: true - /@types/retry@0.12.0: - resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} - dev: true - - /@types/retry@0.12.5: - resolution: {integrity: sha512-3xSjTp3v03X/lSQLkczaN9UIEwJMoMCA1+Nb5HfbJEQWogdeQIyVtTvxPXDQjZ5zws8rFQfVfRdz03ARihPJgw==} - dev: true - /@types/semver@7.5.8: resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} dev: true @@ -7313,6 +7121,67 @@ packages: - supports-color dev: true + /@vitest/expect@2.1.5: + resolution: {integrity: sha512-nZSBTW1XIdpZvEJyoP/Sy8fUg0b8od7ZpGDkTUcfJ7wz/VoZAFzFfLyxVxGFhUjJzhYqSbIpfMtl/+k/dpWa3Q==} + dependencies: + '@vitest/spy': 2.1.5 + '@vitest/utils': 2.1.5 + chai: 5.1.2 + tinyrainbow: 1.2.0 + dev: true + + /@vitest/mocker@2.1.5(vite@5.2.7): + resolution: {integrity: sha512-XYW6l3UuBmitWqSUXTNXcVBUCRytDogBsWuNXQijc00dtnU/9OqpXWp4OJroVrad/gLIomAq9aW8yWDBtMthhQ==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + dependencies: + '@vitest/spy': 2.1.5 + estree-walker: 3.0.3 + magic-string: 0.30.13 + vite: 5.2.7(@types/node@20.12.3) + dev: true + + /@vitest/pretty-format@2.1.5: + resolution: {integrity: sha512-4ZOwtk2bqG5Y6xRGHcveZVr+6txkH7M2e+nPFd6guSoN638v/1XQ0K06eOpi0ptVU/2tW/pIU4IoPotY/GZ9fw==} + dependencies: + tinyrainbow: 1.2.0 + dev: true + + /@vitest/runner@2.1.5: + resolution: {integrity: sha512-pKHKy3uaUdh7X6p1pxOkgkVAFW7r2I818vHDthYLvUyjRfkKOU6P45PztOch4DZarWQne+VOaIMwA/erSSpB9g==} + dependencies: + '@vitest/utils': 2.1.5 + pathe: 1.1.2 + dev: true + + /@vitest/snapshot@2.1.5: + resolution: {integrity: sha512-zmYw47mhfdfnYbuhkQvkkzYroXUumrwWDGlMjpdUr4jBd3HZiV2w7CQHj+z7AAS4VOtWxI4Zt4bWt4/sKcoIjg==} + dependencies: + '@vitest/pretty-format': 2.1.5 + magic-string: 0.30.13 + pathe: 1.1.2 + dev: true + + /@vitest/spy@2.1.5: + resolution: {integrity: sha512-aWZF3P0r3w6DiYTVskOYuhBc7EMc3jvn1TkBg8ttylFFRqNN2XGD7V5a4aQdk6QiUzZQ4klNBSpCLJgWNdIiNw==} + dependencies: + tinyspy: 3.0.2 + dev: true + + /@vitest/utils@2.1.5: + resolution: {integrity: sha512-yfj6Yrp0Vesw2cwJbP+cl04OC+IHFsuQsrsJBL9pyGeQXE56v1UAOQco+SR55Vf1nQzfV0QJg1Qum7AaWUwwYg==} + dependencies: + '@vitest/pretty-format': 2.1.5 + loupe: 3.1.2 + tinyrainbow: 1.2.0 + dev: true + /@vue/compiler-core@3.4.19: resolution: {integrity: sha512-gj81785z0JNzRcU0Mq98E56e4ltO1yf8k5PQ+tV/7YHnbZkrM0fyFyuttnN8ngJZjbpofWE/m4qjKBiLl8Ju4w==} dependencies: @@ -7349,7 +7218,7 @@ packages: '@vue/compiler-ssr': 3.4.19 '@vue/shared': 3.4.19 estree-walker: 2.0.2 - magic-string: 0.30.8 + magic-string: 0.30.13 postcss: 8.4.38 source-map-js: 1.2.0 dev: true @@ -8638,14 +8507,6 @@ packages: transitivePeerDependencies: - supports-color - /aggregate-error@3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} - engines: {node: '>=8'} - dependencies: - clean-stack: 2.2.0 - indent-string: 4.0.0 - dev: true - /ajv-draft-04@1.0.0(ajv@8.12.0): resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} peerDependencies: @@ -8746,35 +8607,6 @@ packages: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} requiresBuild: true - /archiver-utils@2.1.0: - resolution: {integrity: sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==} - engines: {node: '>= 6'} - dependencies: - glob: 7.2.3 - graceful-fs: 4.2.11 - lazystream: 1.0.1 - lodash.defaults: 4.2.0 - lodash.difference: 4.5.0 - lodash.flatten: 4.4.0 - lodash.isplainobject: 4.0.6 - lodash.union: 4.6.0 - normalize-path: 3.0.0 - readable-stream: 2.3.8 - dev: true - - /archiver@4.0.2: - resolution: {integrity: sha512-B9IZjlGwaxF33UN4oPbfBkyA4V1SxNLeIhR1qY8sRXSsbdUkEHrrOvwlYFPx+8uQeCe9M+FG6KgO+imDmQ79CQ==} - engines: {node: '>= 8'} - dependencies: - archiver-utils: 2.1.0 - async: 3.2.5 - buffer-crc32: 0.2.13 - glob: 7.2.3 - readable-stream: 3.6.2 - tar-stream: 2.2.0 - zip-stream: 3.0.1 - dev: true - /archy@1.0.0: resolution: {integrity: sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==} dev: false @@ -8788,10 +8620,6 @@ packages: delegates: 1.0.0 readable-stream: 3.6.2 - /arg@5.0.1: - resolution: {integrity: sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA==} - dev: true - /argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: @@ -8812,6 +8640,7 @@ packages: dependencies: call-bind: 1.0.7 is-array-buffer: 3.0.4 + dev: true /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} @@ -8840,6 +8669,7 @@ packages: get-intrinsic: 1.2.4 is-array-buffer: 3.0.4 is-shared-array-buffer: 1.0.3 + dev: true /arrify@1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} @@ -8850,15 +8680,16 @@ packages: resolution: {integrity: sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw==} dev: true - /astral-regex@2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} + /assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} dev: true /async-mutex@0.4.1: resolution: {integrity: sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==} dependencies: tslib: 2.6.2 + dev: false /async@3.2.5: resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} @@ -8878,6 +8709,7 @@ packages: engines: {node: '>= 0.4'} dependencies: possible-typed-array-names: 1.0.0 + dev: true /avvio@8.3.0: resolution: {integrity: sha512-VBVH0jubFr9LdFASy/vNtm5giTrnbVquWBhT0fyizuNK2rQ7e7ONU2plZQWUNqtE1EmxFEb+kbSkFRkstiaS9Q==} @@ -8938,9 +8770,6 @@ packages: /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - /base-64@1.0.0: - resolution: {integrity: sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==} - /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -8951,13 +8780,6 @@ packages: is-windows: 1.0.2 dev: true - /better-sqlite3@11.0.0: - resolution: {integrity: sha512-1NnNhmT3EZTsKtofJlMox1jkMxdedILury74PwUbQBjWgo4tL4kf7uTAjU55mgQwjdzqakSTjkf+E1imrFwjnA==} - requiresBuild: true - dependencies: - bindings: 1.5.0 - prebuild-install: 7.1.2 - /bidi-js@1.0.3: resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==} dependencies: @@ -8972,23 +8794,13 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} - /bindings@1.5.0: - resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - dependencies: - file-uri-to-path: 1.0.0 - - /bl@1.2.3: - resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} - dependencies: - readable-stream: 2.3.8 - safe-buffer: 5.2.1 - /bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} dependencies: buffer: 5.7.1 inherits: 2.0.4 readable-stream: 3.6.2 + dev: true /boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} @@ -9014,6 +8826,13 @@ packages: engines: {node: '>=8'} dependencies: fill-range: 7.0.1 + dev: true + + /braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.1.1 /breakword@1.0.6: resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} @@ -9049,25 +8868,15 @@ packages: node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) - /buffer-alloc-unsafe@1.1.0: - resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==} - - /buffer-alloc@1.2.0: - resolution: {integrity: sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==} - dependencies: - buffer-alloc-unsafe: 1.1.0 - buffer-fill: 1.0.0 - - /buffer-crc32@0.2.13: - resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + /bson@6.9.0: + resolution: {integrity: sha512-X9hJeyeM0//Fus+0pc5dSUMhhrrmWwQUtdavaQeF3Ta6m69matZkGWV/MrBcnwUeLC8W9kwwc2hfkZgUuCX3Ig==} + engines: {node: '>=16.20.1'} + dev: false /buffer-equal-constant-time@1.0.1: resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false - /buffer-fill@1.0.0: - resolution: {integrity: sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==} - /buffer-from@0.1.2: resolution: {integrity: sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg==} dev: false @@ -9087,6 +8896,7 @@ packages: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 + dev: true /buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} @@ -9130,6 +8940,7 @@ packages: function-bind: 1.1.2 get-intrinsic: 1.2.4 set-function-length: 1.2.2 + dev: true /call-me-maybe@1.0.2: resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} @@ -9182,6 +8993,17 @@ packages: - encoding - supports-color + /chai@5.1.2: + resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} + engines: {node: '>=12'} + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.2 + pathval: 2.0.0 + dev: true + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -9237,16 +9059,9 @@ packages: chart.js: 2.9.4 dev: false - /checkpoint-client@1.1.20: - resolution: {integrity: sha512-AHDELBFMXBV9Rzp4JaN0JR03YQomZpaaVFDjgH7Ue4CcPuzNV2dZ94ZORJ9OoQsASYca/uR7UNGXmeNuWHc+IQ==} - dependencies: - ci-info: 3.1.1 - env-paths: 2.2.1 - fast-write-atomic: 0.2.1 - make-dir: 3.1.0 - ms: 2.1.3 - node-fetch: 2.6.1 - uuid: 8.3.2 + /check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} dev: true /chokidar@3.6.0: @@ -9254,7 +9069,7 @@ packages: engines: {node: '>= 8.10.0'} dependencies: anymatch: 3.1.3 - braces: 3.0.2 + braces: 3.0.3 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 @@ -9263,9 +9078,6 @@ packages: optionalDependencies: fsevents: 2.3.3 - /chownr@1.1.4: - resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} - /chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -9284,20 +9096,11 @@ packages: resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} engines: {node: '>=6.0'} - /ci-info@3.1.1: - resolution: {integrity: sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ==} - dev: true - /ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} dev: true - /clean-stack@2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} - engines: {node: '>=6'} - dev: true - /cli-color@2.0.4: resolution: {integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==} engines: {node: '>=0.10'} @@ -9321,14 +9124,6 @@ packages: engines: {node: '>=6'} dev: true - /cli-truncate@2.1.0: - resolution: {integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==} - engines: {node: '>=8'} - dependencies: - slice-ansi: 3.0.0 - string-width: 4.2.3 - dev: true - /cli-width@4.1.0: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} @@ -9365,9 +9160,6 @@ packages: resolution: {integrity: sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==} engines: {node: '>=6'} - /code-block-writer@11.0.3: - resolution: {integrity: sha512-NiujjUFB4SwScJq2bwbYUtXbZhBSlY6vYzm++3Q6oC+U+injTqfPYFK8wS9COOmb2lueqp0ZRB4nK1VYeHgNyw==} - /code-block-writer@12.0.0: resolution: {integrity: sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==} dev: true @@ -9401,9 +9193,9 @@ packages: hasBin: true requiresBuild: true - /commander@11.1.0: - resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} - engines: {node: '>=16'} + /comlink@4.4.2: + resolution: {integrity: sha512-OxGdvBmJuNKSCMO4NTl1L47VRp6xn2wG4F/2hYzB6tiCb709otOxtEYCSvK80PtjODfXXZu8ds+Nw5kVCjqd2g==} + dev: false /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -9423,20 +9215,6 @@ packages: engines: {node: '>=4.0.0'} dev: true - /commondir@1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - dev: true - - /compress-commons@3.0.0: - resolution: {integrity: sha512-FyDqr8TKX5/X0qo+aVfaZ+PVmNJHJeckFBlq8jZGSJOgnynhfifoyl24qaqdUdDIBe0EVTHByN6NAkqYvE/2Xg==} - engines: {node: '>= 8'} - dependencies: - buffer-crc32: 0.2.13 - crc32-stream: 3.0.1 - normalize-path: 3.0.0 - readable-stream: 2.3.8 - dev: true - /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -9492,12 +9270,6 @@ packages: browserslist: 4.23.0 dev: true - /core-js@3.10.0: - resolution: {integrity: sha512-MQx/7TLgmmDVamSyfE+O+5BHvG1aUGj/gHhLn1wVtm2B5u1eVIPvh7vkfjwWKNCjrTJB8+He99IntSQ1qP+vYQ==} - deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. - requiresBuild: true - dev: true - /core-js@3.36.1: resolution: {integrity: sha512-BTvUrwxVBezj5SZ3f10ImnX2oRByMxql3EimVqMysepbC9EeMUOpLwdy6Eoili2x6E4kf+ZUB5k/+Jv55alPfA==} requiresBuild: true @@ -9505,6 +9277,7 @@ packages: /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + dev: false /cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} @@ -9533,20 +9306,6 @@ packages: typescript: 5.4.5 dev: true - /crc32-stream@3.0.1: - resolution: {integrity: sha512-mctvpXlbzsvK+6z8kJwSJ5crm7yBwrQMTybJzMw1O4lLGJqjlDCXY2Zw7KheiA6XBEcBmfLx1D88mjRGVJtY9w==} - engines: {node: '>= 6.9.0'} - dependencies: - crc: 3.8.0 - readable-stream: 3.6.2 - dev: true - - /crc@3.8.0: - resolution: {integrity: sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==} - dependencies: - buffer: 5.7.1 - dev: true - /crelt@1.0.6: resolution: {integrity: sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==} dev: false @@ -9573,6 +9332,7 @@ packages: node-fetch: 2.7.0 transitivePeerDependencies: - encoding + dev: false /cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} @@ -9760,6 +9520,7 @@ packages: call-bind: 1.0.7 es-errors: 1.3.0 is-data-view: 1.0.1 + dev: true /data-view-byte-length@1.0.1: resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} @@ -9768,6 +9529,7 @@ packages: call-bind: 1.0.7 es-errors: 1.3.0 is-data-view: 1.0.1 + dev: true /data-view-byte-offset@1.0.0: resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} @@ -9776,6 +9538,7 @@ packages: call-bind: 1.0.7 es-errors: 1.3.0 is-data-view: 1.0.1 + dev: true /date-fns@2.30.0: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} @@ -9788,29 +9551,6 @@ packages: resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} dev: false - /debug@4.3.1: - resolution: {integrity: sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - - /debug@4.3.2: - resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -9853,59 +9593,10 @@ packages: dependencies: mimic-response: 2.1.0 - /decompress-response@6.0.0: - resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} - engines: {node: '>=10'} - dependencies: - mimic-response: 3.1.0 - - /decompress-tar@4.1.1: - resolution: {integrity: sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==} - engines: {node: '>=4'} - dependencies: - file-type: 5.2.0 - is-stream: 1.1.0 - tar-stream: 1.6.2 - - /decompress-tarbz2@4.1.1: - resolution: {integrity: sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==} - engines: {node: '>=4'} - dependencies: - decompress-tar: 4.1.1 - file-type: 6.2.0 - is-stream: 1.1.0 - seek-bzip: 1.0.6 - unbzip2-stream: 1.4.3 - - /decompress-targz@4.1.1: - resolution: {integrity: sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==} - engines: {node: '>=4'} - dependencies: - decompress-tar: 4.1.1 - file-type: 5.2.0 - is-stream: 1.1.0 - - /decompress-unzip@4.0.1: - resolution: {integrity: sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==} - engines: {node: '>=4'} - dependencies: - file-type: 3.9.0 - get-stream: 2.3.1 - pify: 2.3.0 - yauzl: 2.10.0 - - /decompress@4.2.1: - resolution: {integrity: sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==} - engines: {node: '>=4'} - dependencies: - decompress-tar: 4.1.1 - decompress-tarbz2: 4.1.1 - decompress-targz: 4.1.1 - decompress-unzip: 4.0.1 - graceful-fs: 4.2.11 - make-dir: 1.3.0 - pify: 2.3.0 - strip-dirs: 2.1.0 + /deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + dev: true /deep-equal@2.2.3: resolution: {integrity: sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==} @@ -9931,12 +9622,9 @@ packages: which-typed-array: 1.1.15 dev: true - /deep-extend@0.6.0: - resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} - engines: {node: '>=4.0.0'} - /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: true /deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} @@ -9956,6 +9644,7 @@ packages: es-define-property: 1.0.0 es-errors: 1.3.0 gopd: 1.0.1 + dev: true /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} @@ -9964,19 +9653,6 @@ packages: define-data-property: 1.1.4 has-property-descriptors: 1.0.2 object-keys: 1.1.1 - - /del@6.1.1: - resolution: {integrity: sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==} - engines: {node: '>=10'} - dependencies: - globby: 11.1.0 - graceful-fs: 4.2.11 - is-glob: 4.0.3 - is-path-cwd: 2.2.0 - is-path-inside: 3.0.3 - p-map: 4.0.0 - rimraf: 3.0.2 - slash: 3.0.0 dev: true /delegates@1.0.0: @@ -10016,6 +9692,11 @@ packages: resolution: {integrity: sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==} dev: false + /diff@3.5.0: + resolution: {integrity: sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==} + engines: {node: '>=0.3.1'} + dev: true + /difflib@0.2.4: resolution: {integrity: sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==} dependencies: @@ -10070,38 +9751,12 @@ packages: domhandler: 5.0.3 dev: false - /dotenv-cli@7.4.1: - resolution: {integrity: sha512-fE1aywjRrWGxV3miaiUr3d2zC/VAiuzEGghi+QzgIA9fEf/M5hLMaRSXb4IxbUAwGmaLi0IozdZddnVU96acag==} - hasBin: true - dependencies: - cross-spawn: 7.0.3 - dotenv: 16.4.5 - dotenv-expand: 10.0.0 - minimist: 1.2.8 - dev: true - - /dotenv-expand@10.0.0: - resolution: {integrity: sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==} - engines: {node: '>=12'} - dev: true - /dotenv-expand@11.0.6: resolution: {integrity: sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==} engines: {node: '>=12'} dependencies: dotenv: 16.4.5 - /dotenv-flow@4.1.0: - resolution: {integrity: sha512-0cwP9jpQBQfyHwvE0cRhraZMkdV45TQedA8AAUZMsFzvmLcQyc1HPv+oX0OOYwLFjIlvgVepQ+WuQHbqDaHJZg==} - engines: {node: '>= 12.0.0'} - dependencies: - dotenv: 16.4.5 - - /dotenv@10.0.0: - resolution: {integrity: sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==} - engines: {node: '>=10'} - dev: true - /dotenv@16.4.5: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} @@ -10135,7 +9790,7 @@ packages: - supports-color dev: true - /drizzle-orm@0.30.6(@types/better-sqlite3@7.6.9)(@types/react@18.2.74)(pg@8.11.5)(postgres@3.4.4)(react@18.2.0): + /drizzle-orm@0.30.6(@types/better-sqlite3@7.6.9)(@types/pg@8.11.10)(@types/react@18.2.74)(kysely@0.27.4)(pg@8.13.1)(postgres@3.4.4)(react@18.2.0): resolution: {integrity: sha512-8RgNUmY7J03GRuRgBV5SaJNbYgLVPjdSWNS/bRkIMIHt2TFCA439lJsNpqYX8asyKMqkw8ceBiamUnCIXZIt9w==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' @@ -10216,8 +9871,10 @@ packages: optional: true dependencies: '@types/better-sqlite3': 7.6.9 + '@types/pg': 8.11.10 '@types/react': 18.2.74 - pg: 8.11.5 + kysely: 0.27.4 + pg: 8.13.1 postgres: 3.4.4 react: 18.2.0 dev: false @@ -10229,7 +9886,7 @@ packages: drizzle-orm: '>=0.23.13' dependencies: '@sinclair/typebox': 0.32.20 - drizzle-orm: 0.30.6(@types/better-sqlite3@7.6.9)(@types/react@18.2.74)(pg@8.11.5)(postgres@3.4.4)(react@18.2.0) + drizzle-orm: 0.30.6(@types/better-sqlite3@7.6.9)(@types/pg@8.11.10)(@types/react@18.2.74)(kysely@0.27.4)(pg@8.13.1)(postgres@3.4.4)(react@18.2.0) dev: false /drizzle-zod@0.5.1(drizzle-orm@0.30.6)(zod@3.22.4): @@ -10238,7 +9895,7 @@ packages: drizzle-orm: '>=0.23.13' zod: '*' dependencies: - drizzle-orm: 0.30.6(@types/better-sqlite3@7.6.9)(@types/react@18.2.74)(pg@8.11.5)(postgres@3.4.4)(react@18.2.0) + drizzle-orm: 0.30.6(@types/better-sqlite3@7.6.9)(@types/pg@8.11.10)(@types/react@18.2.74)(kysely@0.27.4)(pg@8.13.1)(postgres@3.4.4)(react@18.2.0) zod: 3.22.4 dev: false @@ -10269,196 +9926,6 @@ packages: jake: 10.9.1 dev: true - /electric-sql@0.12.1(pg@8.11.5)(prisma@4.8.1)(react-dom@18.2.0)(react@18.2.0)(vue@2.7.16)(wa-sqlite@0.9.13)(zod@3.22.4): - resolution: {integrity: sha512-d9THXiZSIX+B255uJwR1HFsD3RjZcQrZHAFdmIQvFSGzIrEXVhreMrrCOB+CcbETFZg1ARdZEhGSe4MBXGC6/g==} - hasBin: true - peerDependencies: - '@capacitor-community/sqlite': '>= 5.6.2' - '@electric-sql/pglite': '>= 0.1.5' - '@op-engineering/op-sqlite': '>= 2.0.16' - '@tauri-apps/plugin-sql': 2.0.0-alpha.5 - embedded-postgres: 16.1.1-beta.9 - expo-sqlite: '>= 13.0.0' - pg: ^8.11.3 - prisma: 4.8.1 - 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 - zod: 3.21.1 - peerDependenciesMeta: - '@capacitor-community/sqlite': - optional: true - '@electric-sql/pglite': - optional: true - '@op-engineering/op-sqlite': - optional: true - '@tauri-apps/plugin-sql': - optional: true - embedded-postgres: - optional: true - expo-sqlite: - optional: true - pg: - optional: true - prisma: - optional: true - react: - optional: true - react-dom: - optional: true - react-native: - optional: true - typeorm: - optional: true - vue: - optional: true - wa-sqlite: - optional: true - dependencies: - '@electric-sql/prisma-generator': 1.1.5 - '@prisma/client': 4.8.1(prisma@4.8.1) - async-mutex: 0.4.1 - base-64: 1.0.0 - better-sqlite3: 11.0.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 - lodash.uniqwith: 4.5.0 - loglevel: 1.9.1 - long: 5.2.3 - object.hasown: 1.1.4 - ohash: 1.1.3 - pg: 8.11.5 - 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 - vue: 2.7.16 - wa-sqlite: github.com/rhashimoto/wa-sqlite/ca2084cdd188c56532ba3e272696d0b9e21a23bf - ws: 8.16.0 - zod: 3.22.4 - transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - utf-8-validate - dev: false - - /electric-sql@0.12.1(pg@8.11.5)(prisma@4.8.1)(zod@3.21.1): - resolution: {integrity: sha512-d9THXiZSIX+B255uJwR1HFsD3RjZcQrZHAFdmIQvFSGzIrEXVhreMrrCOB+CcbETFZg1ARdZEhGSe4MBXGC6/g==} - hasBin: true - peerDependencies: - '@capacitor-community/sqlite': '>= 5.6.2' - '@electric-sql/pglite': '>= 0.1.5' - '@op-engineering/op-sqlite': '>= 2.0.16' - '@tauri-apps/plugin-sql': 2.0.0-alpha.5 - embedded-postgres: 16.1.1-beta.9 - expo-sqlite: '>= 13.0.0' - pg: ^8.11.3 - prisma: 4.8.1 - 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 - zod: 3.21.1 - peerDependenciesMeta: - '@capacitor-community/sqlite': - optional: true - '@electric-sql/pglite': - optional: true - '@op-engineering/op-sqlite': - optional: true - '@tauri-apps/plugin-sql': - optional: true - embedded-postgres: - optional: true - expo-sqlite: - optional: true - pg: - optional: true - prisma: - optional: true - react: - optional: true - react-dom: - optional: true - react-native: - optional: true - typeorm: - optional: true - vue: - optional: true - wa-sqlite: - optional: true - dependencies: - '@electric-sql/prisma-generator': 1.1.5 - '@prisma/client': 4.8.1(prisma@4.8.1) - async-mutex: 0.4.1 - base-64: 1.0.0 - better-sqlite3: 11.0.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 - lodash.uniqwith: 4.5.0 - loglevel: 1.9.1 - long: 5.2.3 - object.hasown: 1.1.4 - ohash: 1.1.3 - pg: 8.11.5 - prisma: 4.8.1 - prompts: 2.4.2 - protobufjs: 7.2.6 - 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==} @@ -10481,11 +9948,6 @@ packages: engines: {node: '>= 4'} dev: false - /end-of-stream@1.4.4: - resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - dependencies: - once: 1.4.0 - /enhanced-resolve@5.16.1: resolution: {integrity: sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==} engines: {node: '>=10.13.0'} @@ -10505,11 +9967,6 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} - /env-paths@2.2.1: - resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} - engines: {node: '>=6'} - dev: true - /env-paths@3.0.0: resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -10576,16 +10033,19 @@ packages: typed-array-length: 1.0.6 unbox-primitive: 1.0.2 which-typed-array: 1.1.15 + dev: true /es-define-property@1.0.0: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.4 + dev: true /es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + dev: true /es-get-iterator@1.1.3: resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} @@ -10601,14 +10061,15 @@ packages: stop-iteration-iterator: 1.0.0 dev: true - /es-module-lexer@1.5.3: - resolution: {integrity: sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==} + /es-module-lexer@1.5.4: + resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} /es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} dependencies: es-errors: 1.3.0 + dev: true /es-set-tostringtag@2.0.3: resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} @@ -10617,6 +10078,7 @@ packages: get-intrinsic: 1.2.4 has-tostringtag: 1.0.2 hasown: 2.0.2 + dev: true /es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} @@ -10631,6 +10093,7 @@ packages: is-callable: 1.2.7 is-date-object: 1.0.5 is-symbol: 1.0.4 + dev: true /es5-ext@0.10.64: resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} @@ -10924,6 +10387,12 @@ packages: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} dev: true + /estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + dependencies: + '@types/estree': 1.0.5 + dev: true + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -10959,12 +10428,10 @@ packages: strip-final-newline: 2.0.0 dev: true - /expand-template@2.0.3: - resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} - engines: {node: '>=6'} - - /exponential-backoff@3.1.1: - resolution: {integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==} + /expect-type@1.1.0: + resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} + engines: {node: '>=12.0.0'} + dev: true /ext@1.7.0: resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} @@ -11048,10 +10515,6 @@ packages: resolution: {integrity: sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw==} dev: false - /fast-write-atomic@0.2.1: - resolution: {integrity: sha512-WvJe06IfNYlr+6cO3uQkdKdy3Cb1LlCJSF8zRs2eT8yuhdbSlR9nIt+TgQ92RUxiRrQm+/S7RARnMfCs5iuAjw==} - dev: true - /fast-xml-parser@4.2.5: resolution: {integrity: sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==} hasBin: true @@ -11115,11 +10578,6 @@ packages: dependencies: reusify: 1.0.4 - /fd-slicer@1.1.0: - resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} - dependencies: - pend: 1.2.0 - /figures@3.2.0: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} @@ -11138,21 +10596,6 @@ packages: resolution: {integrity: sha512-tLIdonWTpABkU6Axg2yGChYdrOsy4V8xcm0IcyAP8fSsu6jiXLm5pgs083e4sq5fzNRZuAYolUbZyYmPvCKfwQ==} dev: true - /file-type@3.9.0: - resolution: {integrity: sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==} - engines: {node: '>=0.10.0'} - - /file-type@5.2.0: - resolution: {integrity: sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==} - engines: {node: '>=4'} - - /file-type@6.2.0: - resolution: {integrity: sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==} - engines: {node: '>=4'} - - /file-uri-to-path@1.0.0: - resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - /filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} dependencies: @@ -11174,15 +10617,13 @@ packages: engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 + dev: true - /find-cache-dir@3.3.2: - resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} + /fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} dependencies: - commondir: 1.0.1 - make-dir: 3.1.0 - pkg-dir: 4.2.0 - dev: true + to-regex-range: 5.0.1 /find-my-way@8.1.0: resolution: {integrity: sha512-41QwjCGcVTODUmLLqTMeoHeiozbMXYMAE1CKFiDyi9zVZ2Vjh0yz3MF0WQZoIb+cmzP/XlbFjlF2NtJmvZHznA==} @@ -11256,6 +10697,7 @@ packages: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 + dev: true /foreground-child@3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} @@ -11274,13 +10716,6 @@ packages: engines: {node: ^14.13.1 || >=16.0.0} dev: true - /frame-stream@3.0.1: - resolution: {integrity: sha512-Fu8Cdbt2hHfb7wp2HBG5AOfMO5qaglHoJuoiEoQKHS+mZtO/IsMiac3wEQtBVDmOLVmCmDeoutXbrfPlpwMiqg==} - engines: {node: '>=14'} - - /fs-constants@1.0.0: - resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} - /fs-extra@11.2.0: resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} engines: {node: '>=14.14'} @@ -11353,9 +10788,11 @@ packages: define-properties: 1.2.1 es-abstract: 1.23.3 functions-have-names: 1.2.3 + dev: true /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + dev: true /funtypes@4.2.0: resolution: {integrity: sha512-DvOtjiKvkeuXGV0O8LQh9quUP3bSOTEQPGv537Sao8kDq2rDbg48UsSJ7wlBLPzR2Mn0pV7cyAiq5pYG1oUyCQ==} @@ -11395,22 +10832,12 @@ packages: has-proto: 1.0.3 has-symbols: 1.0.3 hasown: 2.0.2 + dev: true /get-own-enumerable-property-symbols@3.0.2: resolution: {integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==} dev: true - /get-port@7.1.0: - resolution: {integrity: sha512-QB9NKEeDg3xxVwCCwJQ9+xycaz6pBB6iQ76wiWMl1927n0Kir6alPiP+yuiICLLU4jpMe08dXfpebuQppFA2zw==} - engines: {node: '>=16'} - - /get-stream@2.3.1: - resolution: {integrity: sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==} - engines: {node: '>=0.10.0'} - dependencies: - object-assign: 4.1.1 - pinkie-promise: 2.0.1 - /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -11423,6 +10850,7 @@ packages: call-bind: 1.0.7 es-errors: 1.3.0 get-intrinsic: 1.2.4 + dev: true /get-tsconfig@4.7.3: resolution: {integrity: sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==} @@ -11430,9 +10858,17 @@ packages: resolve-pkg-maps: 1.0.0 dev: true - /github-from-package@0.0.0: - resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} - + /git-diff@2.0.6: + resolution: {integrity: sha512-/Iu4prUrydE3Pb3lCBMbcSNIf81tgGt0W1ZwknnyF62t3tHmtiJTRj0f+1ZIhp3+Rh0ktz1pJVoa7ZXUCskivA==} + engines: {node: '>= 4.8.0'} + dependencies: + chalk: 2.4.2 + diff: 3.5.0 + loglevel: 1.9.1 + shelljs: 0.8.5 + shelljs.exec: 1.1.8 + dev: true + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -11482,13 +10918,6 @@ packages: once: 1.4.0 dev: true - /global-dirs@3.0.0: - resolution: {integrity: sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==} - engines: {node: '>=10'} - dependencies: - ini: 2.0.0 - dev: true - /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -11505,17 +10934,6 @@ packages: engines: {node: '>= 0.4'} dependencies: define-properties: 1.2.1 - - /globby@11.0.4: - resolution: {integrity: sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==} - engines: {node: '>=10'} - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.1 - merge2: 1.4.1 - slash: 3.0.0 dev: true /globby@11.1.0: @@ -11542,6 +10960,7 @@ packages: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: get-intrinsic: 1.2.4 + dev: true /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -11568,6 +10987,7 @@ packages: /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + dev: true /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} @@ -11581,38 +11001,29 @@ packages: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: es-define-property: 1.0.0 + dev: true /has-proto@1.0.3: resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} engines: {node: '>= 0.4'} + dev: true /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + dev: true /has-tostringtag@1.0.2: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 + dev: true /has-unicode@2.0.1: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} requiresBuild: true - /has-yarn@2.1.0: - resolution: {integrity: sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==} - engines: {node: '>=8'} - dev: true - - /hasha@5.2.2: - resolution: {integrity: sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==} - engines: {node: '>=8'} - dependencies: - is-stream: 2.0.1 - type-fest: 0.8.1 - dev: true - /hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -11674,17 +11085,6 @@ packages: toidentifier: 1.0.1 dev: false - /http-proxy-agent@4.0.1: - resolution: {integrity: sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==} - engines: {node: '>= 6'} - dependencies: - '@tootallnate/once': 1.1.2 - agent-base: 6.0.2 - debug: 4.3.7 - transitivePeerDependencies: - - supports-color - dev: true - /https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} @@ -11769,14 +11169,6 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - /ini@1.3.8: - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - - /ini@2.0.0: - resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==} - engines: {node: '>=10'} - dev: true - /inline-style-prefixer@7.0.0: resolution: {integrity: sha512-I7GEdScunP1dQ6IM2mQWh6v0mOYdYmH3Bp31UecKdrcUgcURTcctSe1IECdUznSHKSmsHtjrT3CwCPI1pyxfUQ==} dependencies: @@ -11817,22 +11209,24 @@ packages: es-errors: 1.3.0 hasown: 2.0.2 side-channel: 1.0.6 + dev: true /internmap@2.0.3: resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} engines: {node: '>=12'} dev: false + /interpret@1.4.0: + resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} + engines: {node: '>= 0.10'} + dev: true + /interrogator@2.0.0: resolution: {integrity: sha512-1qxXpxXznMEpBz4SwV6H16jlCdzDhj2Oww2IEpecZ1ouu3Hr34JOibSRmKe+8fdWZiicaAH80hUispXEuCb4Jw==} dependencies: inquirer: 9.2.17 dev: true - /ip-regex@4.3.0: - resolution: {integrity: sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==} - engines: {node: '>=8'} - /ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -11852,6 +11246,7 @@ packages: dependencies: call-bind: 1.0.7 get-intrinsic: 1.2.4 + dev: true /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -11864,6 +11259,7 @@ packages: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: has-bigints: 1.0.2 + dev: true /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} @@ -11877,6 +11273,7 @@ packages: dependencies: call-bind: 1.0.7 has-tostringtag: 1.0.2 + dev: true /is-buffer@1.1.6: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} @@ -11892,12 +11289,6 @@ packages: /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - - /is-ci@3.0.0: - resolution: {integrity: sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==} - hasBin: true - dependencies: - ci-info: 3.9.0 dev: true /is-core-module@2.13.1: @@ -11910,12 +11301,14 @@ packages: engines: {node: '>= 0.4'} dependencies: is-typed-array: 1.1.13 + dev: true /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 + dev: true /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} @@ -11945,18 +11338,17 @@ packages: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} dev: true - /is-natural-number@4.0.1: - resolution: {integrity: sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==} - /is-negative-zero@2.0.3: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} + dev: true /is-number-object@1.0.7: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 + dev: true /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} @@ -11967,11 +11359,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /is-path-cwd@2.2.0: - resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} - engines: {node: '>=6'} - dev: true - /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} @@ -11996,6 +11383,7 @@ packages: dependencies: call-bind: 1.0.7 has-tostringtag: 1.0.2 + dev: true /is-regexp@1.0.0: resolution: {integrity: sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==} @@ -12012,10 +11400,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 - - /is-stream@1.1.0: - resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} - engines: {node: '>=0.10.0'} + dev: true /is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} @@ -12027,6 +11412,7 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 + dev: true /is-subdir@1.2.0: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} @@ -12040,12 +11426,14 @@ packages: engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 + dev: true /is-typed-array@1.1.13: resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} engines: {node: '>= 0.4'} dependencies: which-typed-array: 1.1.15 + dev: true /is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} @@ -12054,6 +11442,7 @@ packages: /is-url@1.2.4: resolution: {integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==} + dev: false /is-weakmap@2.0.2: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} @@ -12064,6 +11453,7 @@ packages: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.7 + dev: true /is-weakset@2.0.3: resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} @@ -12083,23 +11473,17 @@ packages: engines: {node: '>=0.10.0'} dev: true - /is2@2.0.9: - resolution: {integrity: sha512-rZkHeBn9Zzq52sd9IUIV3a5mfwBY+o2HePMh0wkGBM4z4qjvy2GwVxQ6nNXSfw6MmVP6gf1QIlWjiOavhM3x5g==} - engines: {node: '>=v0.10.0'} - dependencies: - deep-is: 0.1.4 - ip-regex: 4.3.0 - is-url: 1.2.4 - /isarray@0.0.1: resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} dev: false /isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + dev: false /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: true /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -12147,8 +11531,9 @@ packages: merge-stream: 2.0.0 supports-color: 8.1.1 - /jose@4.15.5: - resolution: {integrity: sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg==} + /jose@5.9.6: + resolution: {integrity: sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ==} + dev: false /joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} @@ -12159,6 +11544,10 @@ packages: resolution: {integrity: sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==} dev: false + /js-logger@1.6.1: + resolution: {integrity: sha512-yTgMCPXVjhmg28CuUH8CKjU+cIKL/G+zTu4Fn4lQxs8mRFH/03QTNvEFngcxfg/gRDiQAOoyCKmMTOm9ayOzXA==} + dev: false + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -12304,25 +11693,64 @@ packages: engines: {node: '>=0.10.0'} dev: true - /kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - /kleur@4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + dev: true /klona@2.0.6: resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==} engines: {node: '>= 8'} - /lazystream@1.0.1: - resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} - engines: {node: '>= 0.6.3'} + /kysely-codegen@0.17.0(kysely@0.27.4)(pg@8.13.1): + resolution: {integrity: sha512-C36g6epial8cIOSBEWGI9sRfkKSsEzTcivhjPivtYFQnhMdXnrVFaUe7UMZHeSdXaHiWDqDOkReJgWLD8nPKdg==} + hasBin: true + peerDependencies: + '@libsql/kysely-libsql': ^0.3.0 + '@tediousjs/connection-string': ^0.5.0 + better-sqlite3: '>=7.6.2' + kysely: ^0.27.0 + kysely-bun-sqlite: ^0.3.2 + kysely-bun-worker: ^0.5.3 + mysql2: ^2.3.3 || ^3.0.0 + pg: ^8.8.0 + tarn: ^3.0.0 + tedious: ^18.0.0 + peerDependenciesMeta: + '@libsql/kysely-libsql': + optional: true + '@tediousjs/connection-string': + optional: true + better-sqlite3: + optional: true + kysely-bun-sqlite: + optional: true + kysely-bun-worker: + optional: true + mysql2: + optional: true + pg: + optional: true + tarn: + optional: true + tedious: + optional: true dependencies: - readable-stream: 2.3.8 + chalk: 4.1.2 + dotenv: 16.4.5 + dotenv-expand: 11.0.6 + git-diff: 2.0.6 + kysely: 0.27.4 + micromatch: 4.0.8 + minimist: 1.2.8 + pg: 8.13.1 + pluralize: 8.0.0 dev: true + /kysely@0.27.4: + resolution: {integrity: sha512-dyNKv2KRvYOQPLCAOCjjQuCk4YFd33BvGdf/o5bC7FiW+BB6snA81Zt+2wT9QDFzKqxKa5rrOmvlK/anehCcgA==} + engines: {node: '>=14.0.0'} + /leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -12518,24 +11946,6 @@ packages: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} dev: true - /lodash.defaults@4.2.0: - resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} - dev: true - - /lodash.difference@4.5.0: - resolution: {integrity: sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==} - dev: true - - /lodash.flatten@4.4.0: - resolution: {integrity: sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==} - dev: true - - /lodash.flow@3.5.0: - resolution: {integrity: sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw==} - - /lodash.groupby@4.6.0: - resolution: {integrity: sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==} - /lodash.includes@4.3.0: resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} dev: false @@ -12544,9 +11954,6 @@ packages: resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} dev: false - /lodash.isequal@4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - /lodash.isinteger@4.0.4: resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==} dev: false @@ -12557,14 +11964,12 @@ packages: /lodash.isplainobject@4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + dev: false /lodash.isstring@4.0.1: resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} dev: false - /lodash.mapvalues@4.6.0: - resolution: {integrity: sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ==} - /lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} dev: true @@ -12573,19 +11978,10 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true - /lodash.omitby@4.6.0: - resolution: {integrity: sha512-5OrRcIVR75M288p4nbI2WLAf3ndw2GD9fyNv3Bc15+WCxJDdZ4lYndSxGd7hnG6PVjiJTeJE2dHEGhIuKGicIQ==} - /lodash.once@4.1.1: resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} dev: false - /lodash.partition@4.6.0: - resolution: {integrity: sha512-35L3dSF3Q6V1w5j6V3NhNlQjzsRDC/pYKCTdYTmwqSib+Q8ponkAmt/PwEOq3EmI38DSCl+SkIVwLd+uSlVdrg==} - - /lodash.pick@4.4.0: - resolution: {integrity: sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==} - /lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} dev: true @@ -12596,20 +11992,15 @@ packages: /lodash.throttle@4.1.1: resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} - - /lodash.union@4.6.0: - resolution: {integrity: sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==} dev: true /lodash.uniq@4.5.0: 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==} + dev: true /log-symbols@4.1.0: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} @@ -12622,9 +12013,7 @@ packages: /loglevel@1.9.1: resolution: {integrity: sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==} engines: {node: '>= 0.6.0'} - - /long@5.2.3: - resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} + dev: true /look-it-up@2.1.0: resolution: {integrity: sha512-nMoGWW2HurtuJf6XAL56FWTDCWLOTSsanrgwOyaR5Y4e3zfG5N/0cU5xWZSEU3tBxhQugRbV1xL9jb+ug7yZww==} @@ -12636,6 +12025,10 @@ packages: dependencies: js-tokens: 4.0.0 + /loupe@3.1.2: + resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} + dev: true + /lru-cache@10.2.0: resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} engines: {node: 14 || >=16.14} @@ -12673,7 +12066,13 @@ packages: /magic-string@0.30.10: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 + dev: true + + /magic-string@0.30.13: + resolution: {integrity: sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g==} + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 dev: true /magic-string@0.30.8: @@ -12687,12 +12086,6 @@ packages: resolution: {integrity: sha512-GCXh3bq/WuMbS+Ky4JBPW1hYTOU+znU+Q5m9Pu+pI8EoUqIHk9+tviOKC6/qhHh8C4/As3tzJ69IF32kdz85ww==} dev: true - /make-dir@1.3.0: - resolution: {integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==} - engines: {node: '>=4'} - dependencies: - pify: 3.0.0 - /make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -12822,6 +12215,14 @@ packages: picomatch: 2.3.1 dev: true + /micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + dev: true + /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -12848,10 +12249,6 @@ packages: engines: {node: '>=8'} requiresBuild: true - /mimic-response@3.1.0: - resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} - engines: {node: '>=10'} - /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -12928,9 +12325,6 @@ packages: engines: {node: '>= 8.0.0'} dev: true - /mkdirp-classic@0.5.3: - resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} - /mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} @@ -13018,9 +12412,6 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - /napi-build-utils@1.0.2: - resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} - /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -13028,21 +12419,10 @@ packages: /neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - /new-github-issue-url@0.2.1: - resolution: {integrity: sha512-md4cGoxuT4T4d/HDOXbrUHkTKrp/vp+m3aOA7XXVYwNsUNMK49g3SQicTSeV5GIz/5QVGAeYRAOlyp9OvlgsYA==} - engines: {node: '>=10'} - dev: true - /next-tick@1.1.0: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} dev: true - /node-abi@3.57.0: - resolution: {integrity: sha512-Dp+A9JWxRaKuHP35H77I4kCKesDy5HUDEmScia2FyncMTOXASMyg251F5PhFoDA5uqBrDDffiLpbqnrZmNXW+g==} - engines: {node: '>=10'} - dependencies: - semver: 7.6.0 - /node-eval@2.0.0: resolution: {integrity: sha512-Ap+L9HznXAVeJj3TJ1op6M6bg5xtTq8L5CU/PJxtkhea/DrIxdTknGKIECKd/v/Lgql95iuMAYvIzBNd0pmcMg==} engines: {node: '>= 4'} @@ -13054,11 +12434,6 @@ packages: resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} dev: false - /node-fetch@2.6.1: - resolution: {integrity: sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==} - engines: {node: 4.x || >=6.0.0} - dev: true - /node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -13218,6 +12593,7 @@ packages: /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + dev: true /object-is@1.1.6: resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} @@ -13234,6 +12610,7 @@ packages: /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} + dev: true /object-path@0.11.8: resolution: {integrity: sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==} @@ -13248,19 +12625,16 @@ packages: define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 - - /object.hasown@1.1.4: - resolution: {integrity: sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==} - engines: {node: '>= 0.4'} - dependencies: - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 + dev: true /obliterator@2.0.4: resolution: {integrity: sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==} dev: false + /obuf@1.1.2: + resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} + dev: false + /ofetch@1.3.4: resolution: {integrity: sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw==} dependencies: @@ -13269,9 +12643,6 @@ packages: ufo: 1.5.3 dev: false - /ohash@1.1.3: - resolution: {integrity: sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==} - /on-exit-leak-free@2.1.2: resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} engines: {node: '>=14.0.0'} @@ -13388,29 +12759,6 @@ packages: engines: {node: '>=6'} dev: true - /p-map@4.0.0: - resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} - engines: {node: '>=10'} - dependencies: - aggregate-error: 3.1.0 - dev: true - - /p-retry@4.6.1: - resolution: {integrity: sha512-e2xXGNhZOZ0lfgR9kL34iGlU8N/KO0xZnQxVEwdeOvpqNDQfdnxIYizvWtK8RglUa3bGqI8g0R/BdfzLMxRkiA==} - engines: {node: '>=8'} - dependencies: - '@types/retry': 0.12.5 - retry: 0.13.1 - dev: true - - /p-retry@4.6.2: - resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} - engines: {node: '>=8'} - dependencies: - '@types/retry': 0.12.0 - retry: 0.13.1 - dev: true - /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -13515,6 +12863,11 @@ packages: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} dev: true + /pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + dev: true + /patternomaly@1.3.2: resolution: {integrity: sha512-70UhA5+ZrnNgdfDBKXIGbMHpP+naTzfx9vPT4KwIdhtWWs0x6FWZRJQMXXhV2jcK0mxl28FA/2LPAKArNG058Q==} dev: false @@ -13541,9 +12894,6 @@ packages: - supports-color dev: false - /pend@1.2.0: - resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} - /perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} dev: true @@ -13555,6 +12905,10 @@ packages: /pg-connection-string@2.6.4: resolution: {integrity: sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==} + dev: true + + /pg-connection-string@2.7.0: + resolution: {integrity: sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==} /pg-cursor@2.10.5(pg@8.11.5): resolution: {integrity: sha512-wzgmyk+k9mwuYe30ylLA6qRWw2TBFSee4Bw23oTz66YL9RdRJjDi2TaROMMF+V3QB6QWB3FFCju22loDftjKkw==} @@ -13568,15 +12922,28 @@ packages: resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} engines: {node: '>=4.0.0'} + /pg-numeric@1.0.2: + resolution: {integrity: sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==} + engines: {node: '>=4'} + dev: false + /pg-pool@3.6.2(pg@8.11.5): resolution: {integrity: sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==} peerDependencies: pg: '>=8.0' dependencies: pg: 8.11.5 + dev: true + + /pg-pool@3.7.0(pg@8.13.1): + resolution: {integrity: sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==} + peerDependencies: + pg: '>=8.0' + dependencies: + pg: 8.13.1 - /pg-protocol@1.6.1: - resolution: {integrity: sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==} + /pg-protocol@1.7.0: + resolution: {integrity: sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==} /pg-types@2.2.0: resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} @@ -13588,6 +12955,19 @@ packages: postgres-date: 1.0.7 postgres-interval: 1.2.0 + /pg-types@4.0.2: + resolution: {integrity: sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==} + engines: {node: '>=10'} + dependencies: + pg-int8: 1.0.1 + pg-numeric: 1.0.2 + postgres-array: 3.0.2 + postgres-bytea: 3.0.0 + postgres-date: 2.1.0 + postgres-interval: 3.0.0 + postgres-range: 1.1.4 + dev: false + /pg@8.11.5: resolution: {integrity: sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw==} engines: {node: '>= 8.0.0'} @@ -13599,7 +12979,25 @@ packages: dependencies: pg-connection-string: 2.6.4 pg-pool: 3.6.2(pg@8.11.5) - pg-protocol: 1.6.1 + pg-protocol: 1.7.0 + pg-types: 2.2.0 + pgpass: 1.0.5 + optionalDependencies: + pg-cloudflare: 1.1.1 + dev: true + + /pg@8.13.1: + resolution: {integrity: sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ==} + engines: {node: '>= 8.0.0'} + peerDependencies: + pg-native: '>=3.0.1' + peerDependenciesMeta: + pg-native: + optional: true + dependencies: + pg-connection-string: 2.7.0 + pg-pool: 3.7.0(pg@8.13.1) + pg-protocol: 1.7.0 pg-types: 2.2.0 pgpass: 1.0.5 optionalDependencies: @@ -13617,29 +13015,11 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - /pify@2.3.0: - resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} - engines: {node: '>=0.10.0'} - - /pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - /pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} dev: true - /pinkie-promise@2.0.1: - resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} - engines: {node: '>=0.10.0'} - dependencies: - pinkie: 2.0.4 - - /pinkie@2.0.4: - resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} - engines: {node: '>=0.10.0'} - /pino-abstract-transport@1.1.0: resolution: {integrity: sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==} dependencies: @@ -13709,6 +13089,7 @@ packages: /possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} + dev: true /postcss-discard-duplicates@6.0.1(postcss@8.4.35): resolution: {integrity: sha512-1hvUs76HLYR8zkScbwyJ8oJEugfPV+WchpnA+26fpJ7Smzs51CzGBHC32RS03psuX/2l0l0UKh2StzNxOrKCYg==} @@ -13889,43 +13270,51 @@ packages: resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} engines: {node: '>=4'} + /postgres-array@3.0.2: + resolution: {integrity: sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==} + engines: {node: '>=12'} + dev: false + /postgres-bytea@1.0.0: resolution: {integrity: sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==} engines: {node: '>=0.10.0'} + /postgres-bytea@3.0.0: + resolution: {integrity: sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==} + engines: {node: '>= 6'} + dependencies: + obuf: 1.1.2 + dev: false + /postgres-date@1.0.7: resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==} engines: {node: '>=0.10.0'} + /postgres-date@2.1.0: + resolution: {integrity: sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==} + engines: {node: '>=12'} + dev: false + /postgres-interval@1.2.0: resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==} engines: {node: '>=0.10.0'} dependencies: xtend: 4.0.2 + /postgres-interval@3.0.0: + resolution: {integrity: sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==} + engines: {node: '>=12'} + dev: false + + /postgres-range@1.1.4: + resolution: {integrity: sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==} + dev: false + /postgres@3.4.4: resolution: {integrity: sha512-IbyN+9KslkqcXa8AO9fxpk97PA4pzewvpi2B3Dwy9u4zpV32QicaEdgmF3eSQUzdRk7ttDHQejNgAEr4XoeH4A==} engines: {node: '>=12'} dev: false - /prebuild-install@7.1.2: - resolution: {integrity: sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - detect-libc: 2.0.3 - expand-template: 2.0.3 - github-from-package: 0.0.0 - minimist: 1.2.8 - mkdirp-classic: 0.5.3 - napi-build-utils: 1.0.2 - node-abi: 3.57.0 - pump: 3.0.0 - rc: 1.2.8 - simple-get: 4.0.1 - tar-fs: 2.1.1 - tunnel-agent: 0.6.0 - /preferred-pm@3.1.2: resolution: {integrity: sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==} engines: {node: '>=10'} @@ -13970,29 +13359,12 @@ packages: /pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} - engines: {node: '>=6'} - dev: true - - /pretty-bytes@6.1.1: - resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==} - engines: {node: ^14.13.1 || >=16.0.0} - dev: true - - /prettysize@2.0.0: - resolution: {integrity: sha512-VVtxR7sOh0VsG8o06Ttq5TrI1aiZKmC+ClSn4eBPaNf4SHr5lzbYW+kYGX3HocBL/MfpVrRfFZ9V3vCbLaiplg==} - dev: true - - /prisma-typebox-generator@2.1.0: - resolution: {integrity: sha512-pVJy1YbLeQj/x26blyFCAeqTZOezS50mmdgJdvEHxdJVMIknIGkmoT3Yvbtor/hqMXG/Gvkt93jJRZYet19rtg==} - hasBin: true - dependencies: - '@prisma/generator-helper': 2.30.3 - '@prisma/sdk': 2.30.3 - core-js: 3.10.0 - prettier: 2.8.8 - transitivePeerDependencies: - - encoding - - supports-color + engines: {node: '>=6'} + dev: true + + /pretty-bytes@6.1.1: + resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==} + engines: {node: ^14.13.1 || >=16.0.0} dev: true /prisma@4.8.1: @@ -14005,6 +13377,7 @@ packages: /process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + dev: false /process-warning@3.0.0: resolution: {integrity: sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==} @@ -14013,18 +13386,6 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} - /progress@2.0.3: - resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} - engines: {node: '>=0.4.0'} - dev: true - - /prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - /prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: @@ -14175,24 +13536,6 @@ packages: prosemirror-transform: 1.9.0 dev: false - /protobufjs@7.2.6: - resolution: {integrity: sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==} - engines: {node: '>=12.0.0'} - requiresBuild: true - dependencies: - '@protobufjs/aspromise': 1.1.2 - '@protobufjs/base64': 1.1.2 - '@protobufjs/codegen': 2.0.4 - '@protobufjs/eventemitter': 1.1.0 - '@protobufjs/fetch': 1.1.0 - '@protobufjs/float': 1.0.2 - '@protobufjs/inquire': 1.1.0 - '@protobufjs/path': 1.1.2 - '@protobufjs/pool': 1.1.0 - '@protobufjs/utf8': 1.1.0 - '@types/node': 20.12.12 - long: 5.2.3 - /proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -14208,12 +13551,6 @@ packages: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} dev: true - /pump@3.0.0: - resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} - dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - /punycode.js@2.3.1: resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} engines: {node: '>=6'} @@ -14246,15 +13583,6 @@ packages: dependencies: safe-buffer: 5.2.1 - /rc@1.2.8: - resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} - hasBin: true - dependencies: - deep-extend: 0.6.0 - ini: 1.3.8 - minimist: 1.2.8 - strip-json-comments: 2.0.1 - /react-dom@18.2.0(react@18.2.0): resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} peerDependencies: @@ -14459,6 +13787,7 @@ packages: safe-buffer: 5.1.2 string_decoder: 1.1.1 util-deprecate: 1.0.2 + dev: false /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} @@ -14488,6 +13817,13 @@ packages: resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} engines: {node: '>= 12.13.0'} + /rechoir@0.6.2: + resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} + engines: {node: '>= 0.10'} + dependencies: + resolve: 1.22.8 + dev: true + /redent@3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} @@ -14528,6 +13864,7 @@ packages: define-properties: 1.2.1 es-errors: 1.3.0 set-function-name: 2.0.2 + dev: true /regexpu-core@5.3.2: resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} @@ -14582,13 +13919,6 @@ packages: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true - /resolve@1.20.0: - resolution: {integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==} - dependencies: - is-core-module: 2.13.1 - path-parse: 1.0.7 - dev: true - /resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -14614,11 +13944,6 @@ packages: engines: {node: '>=4'} dev: false - /retry@0.13.1: - resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} - engines: {node: '>= 4'} - dev: true - /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -14701,9 +14026,11 @@ packages: get-intrinsic: 1.2.4 has-symbols: 1.0.3 isarray: 2.0.5 + dev: true /safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + dev: false /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -14715,6 +14042,7 @@ packages: call-bind: 1.0.7 es-errors: 1.3.0 is-regex: 1.1.4 + dev: true /safe-regex2@2.0.0: resolution: {integrity: sha512-PaUSFsUaNNuKwkBijoAPHAK6/eM6VirvyPWlZ7BAQy4D+hCvh4B6lIG+nPdhbFfIbP+gTGBcrdsOaUs0F+ZBOQ==} @@ -14794,12 +14122,6 @@ packages: resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} dev: false - /seek-bzip@1.0.6: - resolution: {integrity: sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==} - hasBin: true - dependencies: - commander: 2.20.3 - /semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -14838,6 +14160,7 @@ packages: get-intrinsic: 1.2.4 gopd: 1.0.1 has-property-descriptors: 1.0.2 + dev: true /set-function-name@2.0.2: resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} @@ -14847,6 +14170,7 @@ packages: es-errors: 1.3.0 functions-have-names: 1.2.3 has-property-descriptors: 1.0.2 + dev: true /set-harmonic-interval@1.0.1: resolution: {integrity: sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g==} @@ -14879,8 +14203,19 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - /shell-quote@1.7.2: - resolution: {integrity: sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==} + /shelljs.exec@1.1.8: + resolution: {integrity: sha512-vFILCw+lzUtiwBAHV8/Ex8JsFjelFMdhONIsgKNLgTzeRckp2AOYRQtHJE/9LhNvdMmE27AGtzWx0+DHpwIwSw==} + engines: {node: '>= 4.0.0'} + dev: true + + /shelljs@0.8.5: + resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==} + engines: {node: '>=4'} + hasBin: true + dependencies: + glob: 7.2.3 + interpret: 1.4.0 + rechoir: 0.6.2 dev: true /side-channel@1.0.6: @@ -14891,6 +14226,11 @@ packages: es-errors: 1.3.0 get-intrinsic: 1.2.4 object-inspect: 1.13.1 + dev: true + + /siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + dev: true /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -14910,13 +14250,6 @@ packages: once: 1.4.0 simple-concat: 1.0.1 - /simple-get@4.0.1: - resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} - dependencies: - decompress-response: 6.0.0 - once: 1.4.0 - simple-concat: 1.0.1 - /simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} dependencies: @@ -14925,21 +14258,13 @@ packages: /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + dev: true /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} dev: true - /slice-ansi@3.0.0: - resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} - engines: {node: '>=8'} - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - dev: true - /smartwrap@2.0.2: resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} engines: {node: '>=6'} @@ -15039,17 +14364,16 @@ packages: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: true - /squel@5.13.0: - resolution: {integrity: sha512-Fzd8zqbuqNwzodO3yO6MkX8qiDoVBuwqAaa3eKNz4idhBf24IQHbatBhLUiHAGGl962eGvPVRxzRuFWZlSf49w==} - engines: {node: '>= 0.12.0'} - deprecated: No longer maintained - /stack-generator@2.0.10: resolution: {integrity: sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ==} dependencies: stackframe: 1.3.4 dev: false + /stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + dev: true + /stackframe@1.3.4: resolution: {integrity: sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==} dev: false @@ -15074,6 +14398,10 @@ packages: engines: {node: '>= 0.8'} dev: false + /std-env@3.8.0: + resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + dev: true + /stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} engines: {node: '>= 0.4'} @@ -15099,15 +14427,6 @@ packages: engines: {node: '>=4.0.0'} dev: false - /string-width@4.2.2: - resolution: {integrity: sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==} - engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - dev: true - /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -15150,6 +14469,7 @@ packages: define-properties: 1.2.1 es-abstract: 1.23.3 es-object-atoms: 1.0.0 + dev: true /string.prototype.trimend@1.0.8: resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} @@ -15157,6 +14477,7 @@ packages: call-bind: 1.0.7 define-properties: 1.2.1 es-object-atoms: 1.0.0 + dev: true /string.prototype.trimstart@1.0.8: resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} @@ -15165,6 +14486,7 @@ packages: call-bind: 1.0.7 define-properties: 1.2.1 es-object-atoms: 1.0.0 + dev: true /string_decoder@0.10.31: resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} @@ -15174,6 +14496,7 @@ packages: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 + dev: false /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} @@ -15189,13 +14512,6 @@ packages: is-regexp: 1.0.0 dev: true - /strip-ansi@6.0.0: - resolution: {integrity: sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - dev: true - /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -15218,11 +14534,6 @@ packages: engines: {node: '>=10'} dev: true - /strip-dirs@2.1.0: - resolution: {integrity: sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==} - dependencies: - is-natural-number: 4.0.1 - /strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -15235,10 +14546,6 @@ packages: min-indent: 1.0.1 dev: true - /strip-json-comments@2.0.1: - resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} - engines: {node: '>=0.10.0'} - /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -15296,14 +14603,6 @@ packages: dependencies: has-flag: 4.0.0 - /supports-hyperlinks@2.3.0: - resolution: {integrity: sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - supports-color: 7.2.0 - dev: true - /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -15319,48 +14618,6 @@ packages: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} - /tar-fs@2.1.1: - resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} - dependencies: - chownr: 1.1.4 - mkdirp-classic: 0.5.3 - pump: 3.0.0 - tar-stream: 2.2.0 - - /tar-stream@1.6.2: - resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==} - engines: {node: '>= 0.8.0'} - dependencies: - bl: 1.2.3 - buffer-alloc: 1.2.0 - end-of-stream: 1.4.4 - fs-constants: 1.0.0 - readable-stream: 2.3.8 - to-buffer: 1.1.1 - xtend: 4.0.2 - - /tar-stream@2.2.0: - resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} - engines: {node: '>=6'} - dependencies: - bl: 4.1.0 - end-of-stream: 1.4.4 - fs-constants: 1.0.0 - inherits: 2.0.4 - readable-stream: 3.6.2 - - /tar@6.1.8: - resolution: {integrity: sha512-sb9b0cp855NbkMJcskdSYA7b11Q8JsX4qe4pyUAfHp+Y6jBjJeek2ZVlwEfWayshEIwlIzXx0Fain3QG9JPm2A==} - engines: {node: '>= 10'} - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 3.3.6 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - dev: true - /tar@6.2.1: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} @@ -15373,35 +14630,11 @@ packages: mkdirp: 1.0.4 yallist: 4.0.0 - /tcp-port-used@1.0.2: - resolution: {integrity: sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==} - dependencies: - debug: 4.3.1 - is2: 2.0.9 - transitivePeerDependencies: - - supports-color - - /temp-dir@1.0.0: - resolution: {integrity: sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ==} - engines: {node: '>=4'} - dev: true - /temp-dir@2.0.0: resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==} engines: {node: '>=8'} dev: true - /temp-write@4.0.0: - resolution: {integrity: sha512-HIeWmj77uOOHb0QX7siN3OtwV3CTntquin6TNVg6SHOqCP3hYKmox90eeFOGaY1MqJ9WYDDjkyZrW6qS5AWpbw==} - engines: {node: '>=8'} - dependencies: - graceful-fs: 4.2.11 - is-stream: 2.0.1 - make-dir: 3.1.0 - temp-dir: 1.0.0 - uuid: 3.4.0 - dev: true - /tempy@0.6.0: resolution: {integrity: sha512-G13vtMYPT/J8A4X2SjdtBTphZlrp1gKv6hZiOjw14RCWg6GbHuQBGtjlx75xLbYV/wEc0D7G5K4rxKP/cXk8Bw==} engines: {node: '>=10'} @@ -15412,30 +14645,11 @@ packages: unique-string: 2.0.0 dev: true - /tempy@1.0.1: - resolution: {integrity: sha512-biM9brNqxSc04Ee71hzFbryD11nX7VPhQQY32AdDmjFvodsRFz/3ufeoTZ6uYkRFfGo188tENcASNs3vTdsM0w==} - engines: {node: '>=10'} - dependencies: - del: 6.1.1 - is-stream: 2.0.1 - temp-dir: 2.0.0 - type-fest: 0.16.0 - unique-string: 2.0.0 - dev: true - /term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} dev: true - /terminal-link@2.1.1: - resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==} - engines: {node: '>=8'} - dependencies: - ansi-escapes: 4.3.2 - supports-hyperlinks: 2.3.0 - dev: true - /terser-webpack-plugin@5.3.10(webpack@5.91.0): resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} engines: {node: '>= 10.13.0'} @@ -15473,9 +14687,6 @@ packages: resolution: {integrity: sha512-/0TJD42KDnVwKmDK6jj3xP7E2MG7SHAOG4tyTgyUCRPdHwvkquYNLEQltmdMa3owq3TkddCVcTsoctJI8VQNKA==} dev: false - /text-encoder-lite@2.0.0: - resolution: {integrity: sha512-bo08ND8LlBwPeU23EluRUcO3p2Rsb/eN5EIfOVqfRmblNDEVKK5IzM9Qfidvo+odT0hhV8mpXQcP/M5MMzABXw==} - /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -15512,6 +14723,7 @@ packages: /through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + dev: false /timers-ext@0.1.7: resolution: {integrity: sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==} @@ -15535,6 +14747,29 @@ packages: resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==} dev: true + /tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + dev: true + + /tinyexec@0.3.1: + resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} + dev: true + + /tinypool@1.0.2: + resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} + engines: {node: ^18.0.0 || >=20.0.0} + dev: true + + /tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} + engines: {node: '>=14.0.0'} + dev: true + + /tinyspy@3.0.2: + resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + engines: {node: '>=14.0.0'} + dev: true + /tippy.js@6.3.7: resolution: {integrity: sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==} dependencies: @@ -15548,16 +14783,6 @@ packages: os-tmpdir: 1.0.2 dev: true - /tmp@0.2.1: - resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} - engines: {node: '>=8.17.0'} - dependencies: - rimraf: 3.0.2 - dev: true - - /to-buffer@1.1.1: - resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} - /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -15611,10 +14836,6 @@ packages: typescript: 5.4.3 dev: true - /ts-dedent@2.2.0: - resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} - engines: {node: '>=6.10'} - /ts-easing@0.2.0: resolution: {integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==} dev: false @@ -15764,11 +14985,6 @@ packages: yargs: 17.7.2 dev: true - /tunnel-agent@0.6.0: - resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} - dependencies: - safe-buffer: 5.2.1 - /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -15829,6 +15045,7 @@ packages: call-bind: 1.0.7 es-errors: 1.3.0 is-typed-array: 1.1.13 + dev: true /typed-array-byte-length@1.0.1: resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} @@ -15839,6 +15056,7 @@ packages: gopd: 1.0.1 has-proto: 1.0.3 is-typed-array: 1.1.13 + dev: true /typed-array-byte-offset@1.0.2: resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} @@ -15850,6 +15068,7 @@ packages: gopd: 1.0.1 has-proto: 1.0.3 is-typed-array: 1.1.13 + dev: true /typed-array-length@1.0.6: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} @@ -15861,6 +15080,7 @@ packages: has-proto: 1.0.3 is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 + dev: true /typed-openapi@0.4.1(openapi-types@12.1.3): resolution: {integrity: sha512-Ixp0uEhXk/jkN6kqrg8/CRFtSYQC81IzSmCHPD7y4i9SXsB+GZ+bKbDH6tFkRKPH7CZBUW6j0w3ka9IAxwsH1A==} @@ -15919,20 +15139,11 @@ packages: has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - - /unbzip2-stream@1.4.3: - resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} - dependencies: - buffer: 5.7.1 - through: 2.3.8 + dev: true /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - /undici@3.3.6: - resolution: {integrity: sha512-/j3YTZ5AobMB4ZrTY72mzM54uFUX32v0R/JRW9G2vOyF1uSKYAx+WT8dMsAcRS13TOFISv094TxIyWYk+WEPsA==} - dev: true - /unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} engines: {node: '>=4'} @@ -16033,17 +15244,6 @@ packages: hasBin: true dev: true - /uuid@3.4.0: - resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} - deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. - hasBin: true - dev: true - - /uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - dev: true - /uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true @@ -16074,7 +15274,7 @@ packages: hasBin: true dependencies: cac: 6.7.14 - debug: 4.3.4 + debug: 4.3.7 pathe: 1.1.2 picocolors: 1.0.0 vite: 5.2.7(@types/node@20.12.3) @@ -16089,6 +15289,27 @@ packages: - terser dev: true + /vite-node@2.1.5(@types/node@20.12.3): + resolution: {integrity: sha512-rd0QIgx74q4S1Rd56XIiL2cYEdyWn13cunYBIuqh9mpmQr7gGS0IxXoP8R6OaZtNQQLyXSWbd4rXKYUbhFpK5w==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + dependencies: + cac: 6.7.14 + debug: 4.3.7 + es-module-lexer: 1.5.4 + pathe: 1.1.2 + vite: 5.2.7(@types/node@20.12.3) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + /vite-plugin-pwa@0.20.0(vite@5.2.7)(workbox-build@7.1.1)(workbox-window@7.1.0): resolution: {integrity: sha512-/kDZyqF8KqoXRpMUQtR5Atri/7BWayW8Gp7Kz/4bfstsV6zSFTxjREbXZYL7zSuRL40HGA+o2hvUAFRmC+bL7g==} engines: {node: '>=16.0.0'} @@ -16168,6 +15389,63 @@ packages: optionalDependencies: fsevents: 2.3.3 + /vitest@2.1.5(@types/node@20.12.3): + resolution: {integrity: sha512-P4ljsdpuzRTPI/kbND2sDZ4VmieerR2c9szEZpjc+98Z9ebvnXmM5+0tHEKqYZumXqlvnmfWsjeFOjXVriDG7A==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.1.5 + '@vitest/ui': 2.1.5 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + dependencies: + '@types/node': 20.12.3 + '@vitest/expect': 2.1.5 + '@vitest/mocker': 2.1.5(vite@5.2.7) + '@vitest/pretty-format': 2.1.5 + '@vitest/runner': 2.1.5 + '@vitest/snapshot': 2.1.5 + '@vitest/spy': 2.1.5 + '@vitest/utils': 2.1.5 + chai: 5.1.2 + debug: 4.3.7 + expect-type: 1.1.0 + magic-string: 0.30.13 + pathe: 1.1.2 + std-env: 3.8.0 + tinybench: 2.9.0 + tinyexec: 0.3.1 + tinypool: 1.0.2 + tinyrainbow: 1.2.0 + vite: 5.2.7(@types/node@20.12.3) + vite-node: 2.1.5(@types/node@20.12.3) + why-is-node-running: 2.3.0 + transitivePeerDependencies: + - less + - lightningcss + - msw + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + /vue-custom-element@3.3.0: resolution: {integrity: sha512-ePuy1EDDJd9/piwXLwsCyMQ964HsdhXPzypM9OX0r4JBa20EVN28U7RXeTWwXkoFKim/b3sP7xT2NEM0Di6tUQ==} engines: {node: '>= 4.0.0', npm: '>= 3.0.0'} @@ -16248,7 +15526,7 @@ packages: browserslist: 4.23.0 chrome-trace-event: 1.0.3 enhanced-resolve: 5.16.1 - es-module-lexer: 1.5.3 + es-module-lexer: 1.5.4 eslint-scope: 5.1.1 events: 3.3.0 glob-to-regexp: 0.4.1 @@ -16290,6 +15568,7 @@ packages: is-number-object: 1.0.7 is-string: 1.0.7 is-symbol: 1.0.4 + dev: true /which-collection@1.0.2: resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} @@ -16322,6 +15601,7 @@ packages: for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.2 + dev: true /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} @@ -16337,6 +15617,15 @@ packages: dependencies: isexe: 2.0.0 + /why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + dev: true + /wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} requiresBuild: true @@ -16533,6 +15822,7 @@ packages: optional: true utf-8-validate: optional: true + dev: false /xtend@2.1.2: resolution: {integrity: sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ==} @@ -16616,12 +15906,6 @@ packages: yargs-parser: 21.1.1 dev: true - /yauzl@2.10.0: - resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} - dependencies: - buffer-crc32: 0.2.13 - fd-slicer: 1.1.0 - /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -16635,18 +15919,6 @@ packages: resolution: {integrity: sha512-auzJ8lEovThZIpR8wLGWNo/JEj4VTO79q9/gOJ0dWb3shAYPFdX3t9VN0fC0v+jeQF77STUdCzebLwRMqzn5gQ==} dev: false - /zip-stream@3.0.1: - resolution: {integrity: sha512-r+JdDipt93ttDjsOVPU5zaq5bAyY+3H19bDrThkvuVxC0xMQzU1PJcS6D+KrP3u96gH9XLomcHPb+2skoDjulQ==} - engines: {node: '>= 8'} - dependencies: - archiver-utils: 2.1.0 - compress-commons: 3.0.0 - readable-stream: 3.6.2 - dev: true - - /zod@3.21.1: - resolution: {integrity: sha512-+dTu2m6gmCbO9Ahm4ZBDapx2O6ZY9QSPXst2WXjcznPMwf2YNpn3RevLx4KkZp1OPW/ouFcoBtBzFz/LeY69oA==} - /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} diff --git a/powersync-config.yaml b/powersync-config.yaml new file mode 100644 index 00000000..fa04fa7c --- /dev/null +++ b/powersync-config.yaml @@ -0,0 +1,59 @@ +replication: + connections: + - type: postgresql + uri: !env PS_DATABASE_URL + + # SSL settings + sslmode: disable # 'verify-full' (default) or 'verify-ca' or 'disable' + +# Connection settings for sync bucket storage +storage: + type: mongodb + uri: mongodb://mongo:27017/powersync_demo + +# The port which the PowerSync API server will listen on +port: !env PS_PORT + +# Specify sync rules +sync_rules: + # TODO use specific sync rules here + content: | + bucket_definitions: + global_bucket: + data: + - SELECT * FROM clause_v2 WHERE udap_id = 'ALL' + - SELECT * FROM pictures + - SELECT * FROM picture_lines + + udap_bucket: + parameters: SELECT udap_id as udap_id FROM "user" WHERE id = request.user_id() + data: + - SELECT * FROM report WHERE udap_id = bucket.udap_id + - SELECT * FROM udap WHERE id = bucket.udap_id + - SELECT * FROM "user" WHERE udap_id = bucket.udap_id + - SELECT * FROM service_instructeurs WHERE udap_id = bucket.udap_id + - SELECT * FROM clause_v2 WHERE udap_id = bucket.udap_id + + user_bucket: + parameters: SELECT request.user_id() as user_id + data: + - SELECT * FROM delegation WHERE "createdBy" = bucket.user_id OR "delegatedTo" = bucket.user_id + - SELECT * FROM pdf_snapshot WHERE user_id = bucket.user_id + - SELECT * FROM transactions WHERE user_id = bucket.user_id + +# Settings for client authentication +client_auth: + jwks: + keys: + - kty: oct + alg: HS256 + kid: powersync + k: !env PS_JWT_SECRET + + audience: ["powersync"] + + # Settings for telemetry reporting + # See https://docs.powersync.com/self-hosting/telemetry + telemetry: + # Opt out of reporting anonymized usage metrics to PowerSync telemetry service + disable_telemetry_sharing: false diff --git a/scripts/clear-db.sh b/scripts/clear-db.sh index 58cc8021..b9ff8d10 100644 --- a/scripts/clear-db.sh +++ b/scripts/clear-db.sh @@ -1,4 +1,4 @@ docker compose down docker volume rm compte-rendu-vif_pg_data docker compose up -d -pnpm electric:migrate +pnpm migration:up \ No newline at end of file