diff --git a/db/migrations/02-create_items_table.sql b/db/migrations/02-create_items_table.sql index 99bec9e2..762a4495 100644 --- a/db/migrations/02-create_items_table.sql +++ b/db/migrations/02-create_items_table.sql @@ -20,23 +20,6 @@ CREATE TABLE IF NOT EXISTS "report" ( "udap_id" TEXT ); -CREATE TABLE IF NOT EXISTS "clause" ( - id TEXT PRIMARY KEY NOT NULL, - label TEXT NOT NULL, - value TEXT NOT NULL -); - -CREATE TABLE IF NOT EXISTS "report_to_clause" ( - id TEXT PRIMARY KEY NOT NULL, - "reportId" TEXT NOT NULL REFERENCES report(id) ON DELETE CASCADE, - "clauseId" TEXT NOT NULL REFERENCES clause(id) ON DELETE CASCADE -); ALTER TABLE "report" ENABLE ELECTRIC; - -ALTER TABLE - "report_to_clause" ENABLE ELECTRIC; - -ALTER TABLE - "clause" ENABLE ELECTRIC; \ No newline at end of file diff --git a/db/migrations/04-add_chips_table.sql b/db/migrations/04-add_chips_table.sql index 4f8d84d8..f0e0967f 100644 --- a/db/migrations/04-add_chips_table.sql +++ b/db/migrations/04-add_chips_table.sql @@ -1,4 +1,5 @@ -CREATE TABLE chip( + +CREATE TABLE clause( key text NOT NULL ,value text NOT NULL ,udap_id text @@ -6,78 +7,48 @@ CREATE TABLE chip( , PRIMARY KEY (key, value, udap_id) ); -INSERT INTO chip(key,value,udap_id,text) VALUES ('demandeur','Particulier','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un espace protégé pour son patrimoine. Cet agent évalue si votre projet peut s’intégrer à cet espace. Ce jugement ne remplace pas les demandes d’autorisation de travaux. Ci-dessous le compte rendu de l’échange :'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('demandeur','Maître d''oeuvre','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un espace protégé pour son patrimoine. Le jugement émis ne remplace pas les demandes d’autorisation de travaux. Si la décision est favorable, vous devrez contacter le service instructeur. Notez que le maître d’œuvre sera notre interlocuteur privilégié pour ce projet. Ci-dessous le compte rendu de l’échange :'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('demandeur','Collectivité','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un espace protégé pour son patrimoine. Cet agent évalue si votre projet peut s’intégrer à cet espace. Le jugement émis ne remplace pas les demandes d’autorisation de travaux. Si la décision est favorable, vous devrez contacter le service instructeur. Ci-dessous le compte rendu de l’échange :'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('demandeur','Service de l''État','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un espace protégé pour son patrimoine. Dans le cadre de notre relation collégiale, l’UDAP facilitera l’application des règlements en vigueur, de la qualité architecturale et patrimoniale. Nos conseils ne remplacent pas les demandes d’autorisation de travaux. Ci-dessous le compte rendu de l’échange :'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('demandeur','Autre','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un espace protégé pour son patrimoine. Nos conseils ne remplacent pas les demandes d’autorisation de travaux. Ci-dessous le compte rendu de l’échange :'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('etat-actuel','Prog.','ALL','Le projet est en phase de programmation avant conception architecturale.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('etat-actuel','Avant-projet','ALL','Le projet est en phase d’avant-projet.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('etat-actuel','Refus','ALL','Le projet est après le refus d’une précédente autorisation d''urbanisme.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('etat-actuel','Chantier','ALL','Le projet est en chantier avant achèvement des travaux.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('etat-actuel','Conformité','ALL','Le projet est non conforme après achèvement des travaux.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('etat-actuel','Urgence','ALL','Il s’agit d’une situation d’urgence sanitaire.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('type-espace','PSMV','ALL','Situé dans un secteur urbain protégé par le Plan de sauvegarde et de mise en valeur (PSMV), plus haut degré de protection patrimoniale concernant les extérieurs et intérieurs, votre projet devra obligatoirement respecter l’avis ci-dessous.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('type-espace','AVAP','ALL','Situé sur une Aire de mise en valeur de l’architecture et du patrimoine (AVAP) ou une Zone de protection du patrimoine architectural urbain et paysager (ZPPAUP), votre projet devra obligatoirement respecter l’avis ci-dessous.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('type-espace','Abord','ALL','Situé aux abords d''un Monument historique, votre projet doit obligatoirement respecter l’avis ci-dessous.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('type-espace','Périmètre','ALL','Ce projet est proche d''un monument historique, mais sans visibilité entre l''un et l''autre. L''avis ci-dessous est un conseil pour la collectivité délivrant l’autorisation.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('type-espace','Site classé','ALL','Situé sur un site classé, préservant les espaces paysagers, votre projet nécessite un avis ministériel pouvant prendre 8 mois.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('type-espace','Site inscrit','ALL','Ce projet est sur site inscrit, préservant les paysages.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('type-espace','Monument historique classé','ALL','Ce projet concerne un monument historique classé. Nous transmettons donc nos recommandations et votre demande à la Conservation régionale des monuments historiques (CRMH) à qui la décision reviendra.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('type-espace','Monument historique inscrit','ALL','Ce projet concerne un monument historique inscrit. Nous transmettons donc nos recommandations et votre demande à la Conservation régionale des monuments historiques (CRMH) à qui la décision reviendra.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('decision','Sans suite','ALL','Votre demande est classée sans suite.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('decision','Oui','ALL','À l''examen de votre demande, il ressort que ce dossier n''appelle aucune observation particulière. Il peut donc être déposé en mairie en l''état.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('decision','Refus','ALL','À l''examen de votre demande, il ressort que ce dossier n''est pas réalisable car il porte atteinte au cadre patrimonial dans lequel il s''inscrit. S''il venait à faire l''objet du dépôt d''autorisation d''urbanisme, il se verrait refuser. Il convient donc de changer votre projet en tenant compte de la réglementation en vigueur.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('decision','Modif. mini.','ALL','Vous pouvez déposer dès à présent une demande d''autorisation d''urbanisme pouvant donner lieu à des prescriptions ou des observations mineures.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('decision','Dédale','ALL','À l''examen de votre demande, il ressort que ce dossier appelle des observations. Après ces modifications, et avant dépôt de votre demande d’autorisation d’urbanisme, vous pourrez déposer un avant-projet qui donnera lieu à des prescriptions ou des observations. -Déposer un avant-projet : https://www.demarches-simplifiees.fr/commencer/udap'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('decision','Architecte','ALL','À l’examen de votre demande, il ressort que ce dossier n’est pas réalisable en l’état. Le recours à un architecte ou un maître d’œuvre s’avère indispensable. Ce professionnel dressera le prochain projet qui nous sera proposé sous forme d’une consultation préalable. -Lien pour déposer une consultation préalable : https://www.demarches-simplifiees.fr/commencer/udap'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('decision','Rdv','ALL','À l''examen de votre demande, il ressort que ce dossier appelle des observations importantes. -Un rendez-vous avec l''agent de l’UDAP chargé de votre dossier s’avère nécessaire. Privilégiez nos permanences (si votre intercommunalité l''organise) ou à défaut un RDV dans nos bureaux (voir contact en bas du courrier).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('decision','A suivre','ALL','Votre projet n''est pas encore au stade d’avancement nécessaire pour obtenir un avis de notre part. Il sera nécessaire de le représenter lorsqu''il aura suffisamment avancé. Privilégiez nos permanences (si votre intercommunalité l''organise) ou à défaut un RDV dans nos bureaux (voir contact en bas du courrier).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','DRAC','udap-landes','Votre projet relève de la DRAC, contactez -Emmanuelle Maillet, Conseillère Architecture - emmanuelle.maillet@culture.gouv.fr.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','CRMH','udap-landes','Il est important de contacter la conservation régionale des monuments historiques (CRMH) de Poitiers. Contactez -Severine Laborie, Conservatrice - severine.laborie@culture.gouv.fr.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','SRA','udap-landes','Veillez à l''éventualité de vestiges archéologiques. Contactez -Mathilde Roupsard, Conservatrice - mathilde.roupsard@culture.gouv.fr.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','DREAL','udap-landes','Votre projet se situe en site. Contactez -Lydie Bayle, Inspectrice des Sites - lydie.bayle@developpement-durable.gouv.fr.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','Mozas','udap-landes','Votre projet est susceptible d''être accompagné par la mission cohésion des territoires. Veuillez contacter Jean-François Mozas, Délégué Territorial de l’arrondissement de Dax - jean-francois.mozas@landes.gouv.fr.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','Laurin','udap-landes','Votre projet est susceptible d''être accompagné par la mission cohésion des territoires. Veuillez contacter Olivier Laurin, Délégué Territorial de arrondissement MDM - olivier.laurin@landes.gouv.fr.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','Lacanal','udap-landes','Votre projet est susceptible d''être accompagné par la Direction départementale des territoires et de la mer. Veuillez contacter Julie Lacanal, Cheffe de service aménagement et risques - julie.lacanal@landes.gouv.fr.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','CAUE','udap-landes','Le CAUE des Landes dispense un conseil architectural gratuit et de qualité qui bonifiera votre projet. Veuillez contacter CAUE des Landes, Conseil - contact@caue40.com.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','FdP','udap-landes','Votre projet est susceptible de recevoir une aide de la part de la Fondation du patrimoine. Veuillez contacter Jean Mortier, Délégué de la FP - jean.mortier@fondation-patrimoine.org.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','s.o.','udap-landes','Sans objet.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','DRAC','udap-deux-sèvres','Votre projet concerne plusieurs champs qui relèvent de la DRAC. Veuillez contacter Johanne Peyras, conseillère Démocratisation et action territoriale - johanne.peyras@culture.gouv.fr - 05 49 36 30 50 (DRAC Nouvelle-Aquitaine - site de Poitiers, 102 Grand''Rue - BP 553, 86020 Poitiers Cedex).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','CRMH','udap-deux-sèvres','Il est important que vous preniez contact avec la conservation régionale des monuments historiques (CRMH) du site de Poitiers. Veuillez contacter Pauline Lucas, conservatrice des monuments historiques de la Charente et des Deux-Sèvres - pauline.lucas@culture.gouv.fr - 05 49 36 30 10 (DRAC Nouvelle-Aquitaine - site de Poitiers, 102 Grand''Rue - BP 553, 86020 Poitiers Cedex).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','SRA','udap-deux-sèvres','Une attention particulière doit être portée à l''éventualité de vestiges archéologiques sur le site. Veuillez contacter Jérôme Primault, conservateur du patrimoine -Service Régional de l’Archéologie - jerome.primault@culture.gouv.fr - 05 49 36 30 64 (DRAC Nouvelle-Aquitaine - site de Poitiers, 102 Grand''Rue - BP 553, 86020 Poitiers Cedex).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','Provost','udap-deux-sèvres','Votre projet se situe en site. Veuillez contacter Sylvain Provost, inspecteur des sites - sylvain.provost@developpement-durable.gouv.fr - 07 64 67 37 19 (DREAL Nouvelle-Aquitaine, 15 rue Arthur-Ranc, 86020 Poitiers Cedex).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','Nau','udap-deux-sèvres','Votre projet est suceptible d''être accompagné par la mission cohésion des territoires. Veuillez contacter Isabelle Nau, référente territoriale - isabelle.nau@deux-sevres.gouv.fr - 05 49 06 88 88 (Direction départementale des territoires, 39 avenue de Paris, 79022 Niort Cedex 9).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','Gouet','udap-deux-sèvres','Votre projet est suceptible d''être accompagné par la mission cohésion des territoires. Veuillez contacter Oliver Gouet, référent territorial - olivier.gouet@deux-sevres.gouv.fr - 05 49 06 88 88 (Direction départementale des territoires, 39 avenue de Paris, 79022 Niort Cedex 9).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','Cornut','udap-deux-sèvres','Votre projet est suceptible d''être accompagné par la mission cohésion des territoires. Veuillez contacter Thierry Cornus, référent territorial - thierry.cornusdeux-sevres.gouv.fr - 05 49 06 88 88 (Direction départementale des territoires, 39 avenue de Paris, 79022 Niort Cedex 9).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','CAUE','udap-deux-sèvres','Le CAUE des Deux-Sèvres dispense un conseil architectural gratuit et de qualité qui bonifiera votre projet. Veuillez contacter le conseil d’architecture, d’urbanisme et de l’environnement (CAUE) - contact@caue79.fr - 05 49 28 06 28 (, Mail Lucie Aubrac, cs 58880, 79028 Niort cedex).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','Fdp','udap-deux-sèvres','Votre projet est susceptible de recevoir une aide de la part de la Fondation du patrimoine. Veuillez contacter Aurélie Liège, chargée de mission de la Délégation Poitou-Charentes - aurelie.liege@fondation-patrimoine.org - 06 59 54 62 15 / 05 49 41 45 54 (Fondation du patrimoine, 1 bis rue Lebascles, 8600 Poitiers).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','PNRMP','udap-deux-sèvres','Votre projet se situe dans le périmètre du Parc naturel et peut bénéficier du conseil de son architecte. Veuillez contacter Gaële Calvez, architecte conseil - g.calvez@parc-marais-poitevin.fr - 05 49 35 15 20 (Parc naturel régional du Marais poitevin, 2 Rue de l''Église, 79510 Coulon).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('contacts-utiles','s.o.','udap-deux-sèvres','Sans objet.'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('bonnes-pratiques','DRAC','ALL','Qu’est-ce qu’une DRAC | Direction régionale des affaires culturelles ? -Il s’agit d’un service déconcentré du ministère de la Culture mettant en œuvre la politique culturelle du ministère en région. (www.culture.gouv.fr/Regions/DRAC-Nouvelle-Aquitaine/Qui-sommes-nous).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('bonnes-pratiques','SPR','ALL','Qu’est-ce qu’un SPR | site patrimonial remarquable ? -Il s’agit d’un ensemble urbain protégé par un règlement patrimonial spécifique pour mettre en valeur les espaces bâtis et non bâtis. (www.culture.gouv.fr/Thematiques/Monuments-Sites/Monuments-historiques-sites-patrimoniaux/Les-sites-patrimoniaux-remarquables).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('bonnes-pratiques','Site','ALL','Qu’est-ce qu’un site ? -Il s’agit d’une politique visant à préserver des lieux au regard de leur qualité paysagère. Consultez le site de la DREAL pour en savoir plus.
(www.nouvelle-aquitaine.developpement-durable.gouv.fr/sites-r1150.html).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('bonnes-pratiques','Des travaux','ALL','Vous souhaitez entreprendre des travaux ? -La démarche pour obtenir une autorisation de travaux varie selon le contexte de votre projet. -Consultez ce lien pour identifier la démarche adaptée à votre besoin. (www.culture.gouv.fr/Demarches-en-ligne/Par-thematique/Monuments-Sites/Mes-travaux-en-site-protege).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('bonnes-pratiques','Atlas','ALL','Identifier les protections patrimoniales autour de votre bien ? -Utilisez l’Atlas du patrimoine pour faire apparaître les différents périmètres de protection autour de votre bien. (atlas.patrimoines.culture.fr/).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('bonnes-pratiques','ATHEBA','ALL','Améliorer votre bâti ancien ? -Consultez les fiches ATHEBA précisant les spécificités techniques du bâti ancien afin de favoriser une amélioration thermique durable (www.rehabilitation-bati-ancien.fr).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('bonnes-pratiques','CREBA','ALL','Réhabiliter un bâti ancien ? -Consultez le centre de ressources pour la réhabilitation responsable du bâti ancien (CREBA), à destination des professionnels, pour tout projet de réhabilitation ou de restauration (www.rehabilitation-bati-ancien.fr/).'); -INSERT INTO chip(key,value,udap_id,text) VALUES ('bonnes-pratiques','FranceRénov','ALL','Être accompagné dans un projet de réhabilitation ? -Consultez France Rénov, service public de la rénovation de l’habitat, oriente les demandeurs tout au long de leur projet de rénovation et assure une mission sociale auprès des ménages modestes (france-renov.gouv.fr).'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('demandeur','Particulier','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un espace protégé pour son patrimoine. Cet agent évalue si votre projet peut s’intégrer à cet espace. Ce jugement ne remplace pas les demandes d’autorisation de travaux. Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('demandeur','Maître d''oeuvre','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un espace protégé pour son patrimoine. Le jugement émis ne remplace pas les demandes d’autorisation de travaux. Si la décision est favorable, vous devrez contacter le service instructeur. Notez que le maître d’œuvre sera notre interlocuteur privilégié pour ce projet. Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('demandeur','Collectivité','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un espace protégé pour son patrimoine. Cet agent évalue si votre projet peut s’intégrer à cet espace. Le jugement émis ne remplace pas les demandes d’autorisation de travaux. Si la décision est favorable, vous devrez contacter le service instructeur. Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('demandeur','Service de l''État','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un espace protégé pour son patrimoine. Dans le cadre de notre relation collégiale, l’UDAP facilitera l’application des règlements en vigueur, de la qualité architecturale et patrimoniale. Nos conseils ne remplacent pas les demandes d’autorisation de travaux. Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('demandeur','Autre','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un espace protégé pour son patrimoine. Nos conseils ne remplacent pas les demandes d’autorisation de travaux. Ci-dessous le compte rendu de l’échange :'); + +INSERT INTO clause(key,value,udap_id,text) VALUES ('type-espace','2Bis_SPR','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe dans un site patrimonial remarquable (SPR). Son rôle est de contrôler la compatibilité de votre projet avec le règlement du SPR. Votre projet devra obligatoirement le respecter. Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('type-espace','Abord','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe aux abords d’un monument historique (MH). Son rôle est de s’assurer de la bonne intégration paysagère et architecturale de votre projet dans cet environnement. L''avis favorable de l’architecte des bâtiments de France sera obligatoire pour obtenir l’autorisation de travaux. Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('type-espace','Périmètre','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe proche d''un monument historique, mais sans visibilité entre l''un et l''autre. Son rôle est de s’assurer de la bonne intégration paysagère et architecturale de votre projet dans cet environnement. Il apporte un conseil pour la collectivité délivrant l’autorisation de travaux. Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('type-espace','Site classé/DP','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe en site classé. Il vous accompagne pour l''élaboration de votre déclaration préalable pour recevoir l’accord du préfet du département. Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('type-espace','Site classé/PC','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe en site classé. Il vous accompagne pour l''élaboration de votre projet pour son passage en commission départementale des sites et des paysages. L’autorisation de travaux doit recevoir l’accord du ministère de la transition écologique dans un délai de 8 mois. Il convient également de vous rapprocher de l’inspecteur de sites de la DREAL. Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('type-espace','Site inscrit','ALL','Vous avez rencontré un agent de l’UDAP car votre projet se situe en site inscrit .Son rôle est de s’assurer de la bonne intégration paysagère et architecturale de votre projet dans cet environnement. L’avis de l’UDAP est transmis à la collectivité délivrant l’autorisation de travaux.Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('type-espace','Monument historique classé','ALL','Vous avez rencontré un agent de l’UDAP car votre projet porte sur un monument historique classé. Son rôle est de vous accompagner dans l’élaboration de votre demande d''autorisation de travaux. Cette dernière sera transmise à la Conservation régionale des monuments historiques (CRMH) pour accord dans un délai de 6 mois. Ci-dessous le compte rendu de l’échange :'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('type-espace','Monument historique inscrit','ALL','Vous avez rencontré un agent de l’UDAP car votre projet porte sur un monument historique inscrit. Son rôle est de vous accompagner dans l’élaboration de votre demande d''autorisation de travaux. Cette dernière sera transmise à la Conservation régionale des monuments historiques (CRMH) pour accord dans un délai de 5 mois. Ci-dessous le compte rendu de l’échange :'); + +INSERT INTO clause(key,value,udap_id,text) VALUES ('decision','Oui','ALL','Suite à nos échanges, il ressort que le projet est abouti et que vous pouvez déposer une demande d''autorisation d''urbanisme.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('decision','Modif. mini.','ALL','Suite à nos échanges, il ressort que le projet est assez abouti pour que vous puissiez déposer une demande d''autorisation d''urbanisme. Elle pourra donner lieu à des prescriptions ou des observations mineures.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('decision','A suivre','ALL','Suite à nos échanges, il ressort que le projet appelle des observations et n’est pas au stade d’avancement nécessaire pour déposer une demande d''autorisation d''urbanisme.\nIl sera nécessaire de le représenter soit par l’intermédiaire de la collectivité si une permanence y est assurée par un agent de l’UDAP (voir le contact ci-dessous) soit via : https://www.demarches-simplifiees.fr/commencer/udap'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('decision','Refus SPR','ALL','Suite à nos échanges, il ressort que le projet n''est pas réalisable car il porte atteinte au site patrimonial remarquable. Si une autorisation d''urbanisme était déposée, elle serait refusée. Il convient d’intégrer la réglementation en vigueur à votre projet.\nVous pouvez présenter un nouveau projet soit par l’intermédiaire de la collectivité si une permanence y est assurée par un agent de l’UDAP (voir le contact ci-dessous) soit via : https://www.demarches-simplifiees.fr/commencer/udap'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('decision','Refus abords/site','ALL','Suite à nos échanges, il ressort que le projet n''est pas réalisable car il porte atteinte à l’espace protégé. Si une autorisation d''urbanisme était déposée, elle serait refusée.\nVous pouvez présenter un nouveau projet soit par l’intermédiaire de la collectivité si une permanence y est assurée par un agent de l’UDAP (voir le contact ci-dessous) soit via : https://www.demarches-simplifiees.fr/commencer/udap'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('decision','Architecte','ALL','Suite à nos échanges, il ressort qu''il est fortement conseillé d’avoir recours à un architecte ou un maître d’œuvre car votre projet n’est pas réalisable en l’état. Ce professionnel pourra soumettre un nouveau projet soit par l’intermédiaire de la collectivité si une permanence y est assurée par un agent de l’UDAP (voir le contact ci-dessous) soit via : https://www.demarches-simplifiees.fr/commencer/udap'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('decision','MH oui','ALL','Suite à nos échanges, il ressort qu’à ce stade il convient de solliciter l''autorisation de la conservation régionale des monuments historiques.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('decision','MH à suivre','ALL','Suite à nos échanges, il ressort que le projet appelle des observations et n’est pas au stade d’avancement nécessaire pour déposer une demande d''autorisation auprès de la conservation régionale des monuments historiques. Il sera nécessaire de le représenter soit par l’intermédiaire de la collectivité si une permanence y est assurée par un agent de l’UDAP (voir le contact ci-dessous) soit via : https://www.demarches-simplifiees.fr/commencer/udap'); + +INSERT INTO clause(key,value,udap_id,text) VALUES ('contacts-utiles','Pôle architecture','udap-landes','Vous pouvez contacter le pôle architecture de la Direction régionale des affaires culturelles (DRAC) :\nEmanuelle Maillet, emmanuelle.maillet@culture.gouv.fr.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('contacts-utiles','CRMH','udap-landes','Veillez à prendre contact avec la Conservation régionale des monuments historiques (CRMH) :\nSeverine Laborie, Conservatrice - severine.laborie@culture.gouv.fr.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('contacts-utiles','SRA','udap-landes','Veillez à l''éventualité de vestiges archéologiques, vous pouvez contacter le service régional de l’archéologie :\nMathilde Roupsard, Conservatrice - mathilde.roupsard@culture.gouv.fr.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('contacts-utiles','DREAL','udap-landes','Vous pouvez contacter l''inspecteur des Sites de la Direction régionale de l''environnement, de l''aménagement et du logement (DREAL) car votre projet se situe en site protégé :\nLydie Bayle, Inspectrice des Sites - lydie.bayle@developpement-durable.gouv.fr.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('contacts-utiles','DT Dax','udap-landes','Votre projet est susceptible d''être accompagné par le délégué territorial (DDTM) :\nJean-François Mozas, arrondissement Dax, jean-francois.mozas@landes.gouv.fr.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('contacts-utiles','DT MDM','udap-landes','Votre projet est susceptible d''être accompagné par le délégué territorial (DDTM) :\nOlivier Laurin, MDM, olivier.laurin@landes.gouv.fr.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('contacts-utiles','SAR','udap-landes','Votre projet est susceptible d''être accompagné par le service aménagement et risque (DDTM) :\nJulie Lacanal, DDT Landes, julie.lacanal@landes.gouv.fr.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('contacts-utiles','CAUE','udap-landes','Vous pouvez être accompagné par le CAUE qui dispense un conseil architectural gratuit et de qualité :\nCAUE des Landes, contact@caue40.com.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('contacts-utiles','FdP','udap-landes','Vous pouvez contacter la Fondation du patrimoine car votre projet est susceptible de recevoir une aide de leur part :\nJean Mortier, Délégué de la FP, jean.mortier@fondation-patrimoine.org.'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('contacts-utiles','PNR','udap-landes','Vous pouvez contacter le parc naturel dans lequel se situe votre projet :'); + +INSERT INTO clause(key,value,udap_id,text) VALUES ('bonnes-pratiques','DRAC','ALL','Qu’est-ce qu’une DRAC | Direction régionale des affaires culturelles ?\nIl s’agit d’un service déconcentré du ministère de la Culture mettant en œuvre la politique culturelle du ministère en région. (www.culture.gouv.fr/Regions/DRAC-Nouvelle-Aquitaine/Qui-sommes-nous).'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('bonnes-pratiques','SPR','ALL','Qu’est-ce qu’un SPR | site patrimonial remarquable ?\nIl s’agit d’un ensemble urbain protégé par un règlement spécifique pour conserver ses qualités urbaines, architecturales et paysagères (www.culture.gouv.fr/Thematiques/Monuments-Sites/Monuments-historiques-sites-patrimoniaux/Les-sites-patrimoniaux-remarquables).'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('bonnes-pratiques','Site','ALL','Qu’est-ce qu’un site ?\nIl s’agit d’un espace naturel protégé au regard de sa valeur paysagère. Consultez le site de la DREAL pour en savoir plus. (www.nouvelle-aquitaine.developpement-durable.gouv.fr/sites-r1150.html).'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('bonnes-pratiques','Des travaux','ALL','Vous souhaitez entreprendre des travaux ?\nLa démarche pour obtenir une autorisation de travaux varie selon le contexte de votre projet.\nConsultez ce lien pour identifier la démarche adaptée à votre besoin. (www.culture.gouv.fr/Demarches-en-ligne/Par-thematique/Monuments-Sites/Mes-travaux-en-site-protege).'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('bonnes-pratiques','Atlas','ALL','Identifier les protections patrimoniales autour de votre bien ?\nUtilisez l’Atlas des patrimoines pour faire apparaître les différents périmètres de protection autour de votre bien. (atlas.patrimoines.culture.fr/).'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('bonnes-pratiques','ATHEBA','ALL','Améliorer votre bâti ancien ?\nConsultez les fiches ATHEBA précisant les spécificités techniques du bâti ancien afin de favoriser une amélioration thermique durable (www.rehabilitation-bati-ancien.fr).'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('bonnes-pratiques','CREBA','ALL','Réhabiliter un bâti ancien ?\nConsultez le centre de ressources pour la réhabilitation responsable du bâti ancien (CREBA), à destination des professionnels, pour tout projet de réhabilitation ou de restauration (www.rehabilitation-bati-ancien.fr/).'); +INSERT INTO clause(key,value,udap_id,text) VALUES ('bonnes-pratiques','FranceRénov','ALL','Être accompagné dans un projet de réhabilitation ?\nConsultez France Rénov, service public de la rénovation de l’habitat, qui oriente les demandeurs tout au long de leur projet de rénovation et assure une mission sociale auprès des ménages modestes (france-renov.gouv.fr).'); -ALTER TABLE chip ENABLE ELECTRIC; \ No newline at end of file +ALTER TABLE clause ENABLE ELECTRIC; \ No newline at end of file diff --git a/packages/backend/src/db/db.ts b/packages/backend/src/db/db.ts index 20d845cd..4001f7ad 100644 --- a/packages/backend/src/db/db.ts +++ b/packages/backend/src/db/db.ts @@ -1,6 +1,6 @@ import { PrismaClient } from "@cr-vif/electric-client/backend"; import { ENV } from "../envVars"; -console.log(ENV); + export const db = new PrismaClient({ datasources: { db: { url: ENV.DATABASE_URL } } }); export const cleanUpDb = async () => { diff --git a/packages/electric-client/src/generated/client/index.ts b/packages/electric-client/src/generated/client/index.ts index cb4e354b..cde458ca 100644 --- a/packages/electric-client/src/generated/client/index.ts +++ b/packages/electric-client/src/generated/client/index.ts @@ -12,9 +12,7 @@ import migrations from './migrations'; // ENUMS ///////////////////////////////////////// -export const ChipScalarFieldEnumSchema = z.enum(['key','value','udap_id','text']); - -export const ClauseScalarFieldEnumSchema = z.enum(['id','label','value']); +export const ClauseScalarFieldEnumSchema = z.enum(['key','value','udap_id','text']); export const DelegationScalarFieldEnumSchema = z.enum(['createdBy','delegatedTo']); @@ -22,8 +20,6 @@ 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']); -export const Report_to_clauseScalarFieldEnumSchema = z.enum(['id','reportId','clauseId']); - export const SortOrderSchema = z.enum(['asc','desc']); export const TransactionIsolationLevelSchema = z.enum(['ReadUncommitted','ReadCommitted','RepeatableRead','Serializable']); @@ -36,28 +32,16 @@ export const UserScalarFieldEnumSchema = z.enum(['id','name','udap_id']); ///////////////////////////////////////// ///////////////////////////////////////// -// CHIP SCHEMA +// CLAUSE SCHEMA ///////////////////////////////////////// -export const ChipSchema = z.object({ +export const ClauseSchema = z.object({ key: z.string(), value: z.string(), udap_id: z.string(), text: z.string(), }) -export type Chip = z.infer - -///////////////////////////////////////// -// CLAUSE SCHEMA -///////////////////////////////////////// - -export const ClauseSchema = z.object({ - id: z.string(), - label: z.string(), - value: z.string(), -}) - export type Clause = z.infer ///////////////////////////////////////// @@ -99,18 +83,6 @@ export const ReportSchema = z.object({ export type Report = z.infer -///////////////////////////////////////// -// REPORT TO CLAUSE SCHEMA -///////////////////////////////////////// - -export const Report_to_clauseSchema = z.object({ - id: z.string(), - reportId: z.string(), - clauseId: z.string(), -}) - -export type Report_to_clause = z.infer - ///////////////////////////////////////// // UDAP SCHEMA ///////////////////////////////////////// @@ -146,45 +118,16 @@ export type User = z.infer // SELECT & INCLUDE ///////////////////////////////////////// -// CHIP +// CLAUSE //------------------------------------------------------ -export const ChipSelectSchema: z.ZodType = z.object({ +export const ClauseSelectSchema: z.ZodType = z.object({ key: z.boolean().optional(), value: z.boolean().optional(), udap_id: z.boolean().optional(), text: z.boolean().optional(), }).strict() -// CLAUSE -//------------------------------------------------------ - -export const ClauseIncludeSchema: z.ZodType = z.object({ - report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), - _count: z.union([z.boolean(),z.lazy(() => ClauseCountOutputTypeArgsSchema)]).optional(), -}).strict() - -export const ClauseArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => ClauseSelectSchema).optional(), - include: z.lazy(() => ClauseIncludeSchema).optional(), -}).strict(); - -export const ClauseCountOutputTypeArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => ClauseCountOutputTypeSelectSchema).nullish(), -}).strict(); - -export const ClauseCountOutputTypeSelectSchema: z.ZodType = z.object({ - report_to_clause: z.boolean().optional(), -}).strict(); - -export const ClauseSelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - label: z.boolean().optional(), - value: z.boolean().optional(), - report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), - _count: z.union([z.boolean(),z.lazy(() => ClauseCountOutputTypeArgsSchema)]).optional(), -}).strict() - // DELEGATION //------------------------------------------------------ @@ -210,8 +153,6 @@ export const DelegationSelectSchema: z.ZodType = z.obje export const ReportIncludeSchema: z.ZodType = z.object({ user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), - report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), - _count: z.union([z.boolean(),z.lazy(() => ReportCountOutputTypeArgsSchema)]).optional(), }).strict() export const ReportArgsSchema: z.ZodType = z.object({ @@ -219,14 +160,6 @@ export const ReportArgsSchema: z.ZodType = z.object({ include: z.lazy(() => ReportIncludeSchema).optional(), }).strict(); -export const ReportCountOutputTypeArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => ReportCountOutputTypeSelectSchema).nullish(), -}).strict(); - -export const ReportCountOutputTypeSelectSchema: z.ZodType = z.object({ - report_to_clause: z.boolean().optional(), -}).strict(); - export const ReportSelectSchema: z.ZodType = z.object({ id: z.boolean().optional(), title: z.boolean().optional(), @@ -248,29 +181,6 @@ export const ReportSelectSchema: z.ZodType = z.object({ disabled: z.boolean().optional(), udap_id: z.boolean().optional(), user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), - report_to_clause: z.union([z.boolean(),z.lazy(() => Report_to_clauseFindManyArgsSchema)]).optional(), - _count: z.union([z.boolean(),z.lazy(() => ReportCountOutputTypeArgsSchema)]).optional(), -}).strict() - -// REPORT TO CLAUSE -//------------------------------------------------------ - -export const Report_to_clauseIncludeSchema: z.ZodType = z.object({ - clause: z.union([z.boolean(),z.lazy(() => ClauseArgsSchema)]).optional(), - report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), -}).strict() - -export const Report_to_clauseArgsSchema: z.ZodType = z.object({ - select: z.lazy(() => Report_to_clauseSelectSchema).optional(), - include: z.lazy(() => Report_to_clauseIncludeSchema).optional(), -}).strict(); - -export const Report_to_clauseSelectSchema: z.ZodType = z.object({ - id: z.boolean().optional(), - reportId: z.boolean().optional(), - clauseId: z.boolean().optional(), - clause: z.union([z.boolean(),z.lazy(() => ClauseArgsSchema)]).optional(), - report: z.union([z.boolean(),z.lazy(() => ReportArgsSchema)]).optional(), }).strict() // UDAP @@ -351,72 +261,32 @@ export const UserSelectSchema: z.ZodType = z.object({ // INPUT TYPES ///////////////////////////////////////// -export const ChipWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => ChipWhereInputSchema),z.lazy(() => ChipWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => ChipWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => ChipWhereInputSchema),z.lazy(() => ChipWhereInputSchema).array() ]).optional(), +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(), }).strict(); -export const ChipOrderByWithRelationInputSchema: z.ZodType = z.object({ +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() }).strict(); -export const ChipWhereUniqueInputSchema: z.ZodType = z.object({ - key_value_udap_id: z.lazy(() => ChipKeyValueUdap_idCompoundUniqueInputSchema).optional() +export const ClauseWhereUniqueInputSchema: z.ZodType = z.object({ + key_value_udap_id: z.lazy(() => ClauseKeyValueUdap_idCompoundUniqueInputSchema).optional() }).strict(); -export const ChipOrderByWithAggregationInputSchema: z.ZodType = z.object({ +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(), - _count: z.lazy(() => ChipCountOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => ChipMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => ChipMinOrderByAggregateInputSchema).optional() -}).strict(); - -export const ChipScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => ChipScalarWhereWithAggregatesInputSchema),z.lazy(() => ChipScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => ChipScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => ChipScalarWhereWithAggregatesInputSchema),z.lazy(() => ChipScalarWhereWithAggregatesInputSchema).array() ]).optional(), - 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(), -}).strict(); - -export const ClauseWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => ClauseWhereInputSchema),z.lazy(() => ClauseWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => ClauseWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => ClauseWhereInputSchema),z.lazy(() => ClauseWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - label: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - value: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - report_to_clause: z.lazy(() => Report_to_clauseListRelationFilterSchema).optional() -}).strict(); - -export const ClauseOrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - label: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), - report_to_clause: z.lazy(() => Report_to_clauseOrderByRelationAggregateInputSchema).optional() -}).strict(); - -export const ClauseWhereUniqueInputSchema: z.ZodType = z.object({ - id: z.string().optional() -}).strict(); - -export const ClauseOrderByWithAggregationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - label: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional(), _count: z.lazy(() => ClauseCountOrderByAggregateInputSchema).optional(), _max: z.lazy(() => ClauseMaxOrderByAggregateInputSchema).optional(), _min: z.lazy(() => ClauseMinOrderByAggregateInputSchema).optional() @@ -426,9 +296,10 @@ export const ClauseScalarWhereWithAggregatesInputSchema: z.ZodType ClauseScalarWhereWithAggregatesInputSchema),z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), OR: z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema).array().optional(), NOT: z.union([ z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema),z.lazy(() => ClauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - label: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + 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(), }).strict(); export const DelegationWhereInputSchema: z.ZodType = z.object({ @@ -492,7 +363,6 @@ export const ReportWhereInputSchema: z.ZodType = z.obje disabled: z.union([ z.lazy(() => BoolNullableFilterSchema),z.boolean() ]).optional().nullable(), udap_id: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), user: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), - report_to_clause: z.lazy(() => Report_to_clauseListRelationFilterSchema).optional() }).strict(); export const ReportOrderByWithRelationInputSchema: z.ZodType = z.object({ @@ -515,8 +385,7 @@ export const ReportOrderByWithRelationInputSchema: z.ZodType SortOrderSchema).optional(), disabled: z.lazy(() => SortOrderSchema).optional(), udap_id: z.lazy(() => SortOrderSchema).optional(), - user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), - report_to_clause: z.lazy(() => Report_to_clauseOrderByRelationAggregateInputSchema).optional() + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional() }).strict(); export const ReportWhereUniqueInputSchema: z.ZodType = z.object({ @@ -575,47 +444,6 @@ export const ReportScalarWhereWithAggregatesInputSchema: z.ZodType StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), }).strict(); -export const Report_to_clauseWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Report_to_clauseWhereInputSchema),z.lazy(() => Report_to_clauseWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => Report_to_clauseWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Report_to_clauseWhereInputSchema),z.lazy(() => Report_to_clauseWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - reportId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - clauseId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - clause: z.union([ z.lazy(() => ClauseRelationFilterSchema),z.lazy(() => ClauseWhereInputSchema) ]).optional(), - report: z.union([ z.lazy(() => ReportRelationFilterSchema),z.lazy(() => ReportWhereInputSchema) ]).optional(), -}).strict(); - -export const Report_to_clauseOrderByWithRelationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - clauseId: z.lazy(() => SortOrderSchema).optional(), - clause: z.lazy(() => ClauseOrderByWithRelationInputSchema).optional(), - report: z.lazy(() => ReportOrderByWithRelationInputSchema).optional() -}).strict(); - -export const Report_to_clauseWhereUniqueInputSchema: z.ZodType = z.object({ - id: z.string().optional() -}).strict(); - -export const Report_to_clauseOrderByWithAggregationInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - clauseId: z.lazy(() => SortOrderSchema).optional(), - _count: z.lazy(() => Report_to_clauseCountOrderByAggregateInputSchema).optional(), - _max: z.lazy(() => Report_to_clauseMaxOrderByAggregateInputSchema).optional(), - _min: z.lazy(() => Report_to_clauseMinOrderByAggregateInputSchema).optional() -}).strict(); - -export const Report_to_clauseScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema),z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), - OR: z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema),z.lazy(() => Report_to_clauseScalarWhereWithAggregatesInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - reportId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), - clauseId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), -}).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(), @@ -728,101 +556,55 @@ export const UserScalarWhereWithAggregatesInputSchema: z.ZodType StringWithAggregatesFilterSchema),z.string() ]).optional(), }).strict(); -export const ChipCreateInputSchema: z.ZodType = z.object({ +export const ClauseCreateInputSchema: z.ZodType = z.object({ key: z.string(), value: z.string(), udap_id: z.string(), text: z.string() }).strict(); -export const ChipUncheckedCreateInputSchema: z.ZodType = z.object({ +export const ClauseUncheckedCreateInputSchema: z.ZodType = z.object({ key: z.string(), value: z.string(), udap_id: z.string(), text: z.string() }).strict(); -export const ChipUpdateInputSchema: z.ZodType = z.object({ +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(), }).strict(); -export const ChipUncheckedUpdateInputSchema: z.ZodType = z.object({ +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(), }).strict(); -export const ChipCreateManyInputSchema: z.ZodType = z.object({ +export const ClauseCreateManyInputSchema: z.ZodType = z.object({ key: z.string(), value: z.string(), udap_id: z.string(), text: z.string() }).strict(); -export const ChipUpdateManyMutationInputSchema: z.ZodType = z.object({ +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(), }).strict(); -export const ChipUncheckedUpdateManyInputSchema: z.ZodType = z.object({ +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(), }).strict(); -export const ClauseCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - label: z.string(), - value: z.string(), - report_to_clause: z.lazy(() => Report_to_clauseCreateNestedManyWithoutClauseInputSchema).optional() -}).strict(); - -export const ClauseUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - label: z.string(), - value: z.string(), - report_to_clause: z.lazy(() => Report_to_clauseUncheckedCreateNestedManyWithoutClauseInputSchema).optional() -}).strict(); - -export const ClauseUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - report_to_clause: z.lazy(() => Report_to_clauseUpdateManyWithoutClauseNestedInputSchema).optional() -}).strict(); - -export const ClauseUncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - report_to_clause: z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutClauseNestedInputSchema).optional() -}).strict(); - -export const ClauseCreateManyInputSchema: z.ZodType = z.object({ - id: z.string(), - label: z.string(), - value: z.string() -}).strict(); - -export const ClauseUpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const ClauseUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - export const DelegationCreateInputSchema: z.ZodType = z.object({ user_delegation_createdByTouser: z.lazy(() => UserCreateNestedOneWithoutDelegation_delegation_createdByTouserInputSchema), user_delegation_delegatedToTouser: z.lazy(() => UserCreateNestedOneWithoutDelegation_delegation_delegatedToTouserInputSchema) @@ -875,8 +657,7 @@ export const ReportCreateInputSchema: z.ZodType = z.ob pdf: z.string().optional().nullable(), disabled: z.boolean().optional().nullable(), udap_id: z.string().optional().nullable(), - user: z.lazy(() => UserCreateNestedOneWithoutReportInputSchema), - report_to_clause: z.lazy(() => Report_to_clauseCreateNestedManyWithoutReportInputSchema).optional() + user: z.lazy(() => UserCreateNestedOneWithoutReportInputSchema) }).strict(); export const ReportUncheckedCreateInputSchema: z.ZodType = z.object({ @@ -898,8 +679,7 @@ export const ReportUncheckedCreateInputSchema: z.ZodType Report_to_clauseUncheckedCreateNestedManyWithoutReportInputSchema).optional() + udap_id: z.string().optional().nullable() }).strict(); export const ReportUpdateInputSchema: z.ZodType = z.object({ @@ -921,8 +701,7 @@ export const ReportUpdateInputSchema: z.ZodType = z.ob 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(), - user: z.lazy(() => UserUpdateOneRequiredWithoutReportNestedInputSchema).optional(), - report_to_clause: z.lazy(() => Report_to_clauseUpdateManyWithoutReportNestedInputSchema).optional() + user: z.lazy(() => UserUpdateOneRequiredWithoutReportNestedInputSchema).optional() }).strict(); export const ReportUncheckedUpdateInputSchema: z.ZodType = z.object({ @@ -945,7 +724,6 @@ export const ReportUncheckedUpdateInputSchema: z.ZodType NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - report_to_clause: z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReportNestedInputSchema).optional() }).strict(); export const ReportCreateManyInputSchema: z.ZodType = z.object({ @@ -1013,46 +791,6 @@ export const ReportUncheckedUpdateManyInputSchema: z.ZodType NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), }).strict(); -export const Report_to_clauseCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - clause: z.lazy(() => ClauseCreateNestedOneWithoutReport_to_clauseInputSchema), - report: z.lazy(() => ReportCreateNestedOneWithoutReport_to_clauseInputSchema) -}).strict(); - -export const Report_to_clauseUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string(), - reportId: z.string(), - clauseId: z.string() -}).strict(); - -export const Report_to_clauseUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - clause: z.lazy(() => ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional(), - report: z.lazy(() => ReportUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional() -}).strict(); - -export const Report_to_clauseUncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - reportId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - clauseId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const Report_to_clauseCreateManyInputSchema: z.ZodType = z.object({ - id: z.string(), - reportId: z.string(), - clauseId: z.string() -}).strict(); - -export const Report_to_clauseUpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const Report_to_clauseUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - reportId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - clauseId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - export const UdapCreateInputSchema: z.ZodType = z.object({ id: z.string(), department: z.string(), @@ -1216,27 +954,27 @@ export const StringFilterSchema: z.ZodType = z.object({ not: z.union([ z.string(),z.lazy(() => NestedStringFilterSchema) ]).optional(), }).strict(); -export const ChipKeyValueUdap_idCompoundUniqueInputSchema: z.ZodType = z.object({ +export const ClauseKeyValueUdap_idCompoundUniqueInputSchema: z.ZodType = z.object({ key: z.string(), value: z.string(), udap_id: z.string() }).strict(); -export const ChipCountOrderByAggregateInputSchema: z.ZodType = z.object({ +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() }).strict(); -export const ChipMaxOrderByAggregateInputSchema: z.ZodType = z.object({ +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() }).strict(); -export const ChipMinOrderByAggregateInputSchema: z.ZodType = z.object({ +export const ClauseMinOrderByAggregateInputSchema: z.ZodType = z.object({ key: z.lazy(() => SortOrderSchema).optional(), value: z.lazy(() => SortOrderSchema).optional(), udap_id: z.lazy(() => SortOrderSchema).optional(), @@ -1261,34 +999,6 @@ export const StringWithAggregatesFilterSchema: z.ZodType NestedStringFilterSchema).optional() }).strict(); -export const Report_to_clauseListRelationFilterSchema: z.ZodType = z.object({ - every: z.lazy(() => Report_to_clauseWhereInputSchema).optional(), - some: z.lazy(() => Report_to_clauseWhereInputSchema).optional(), - none: z.lazy(() => Report_to_clauseWhereInputSchema).optional() -}).strict(); - -export const Report_to_clauseOrderByRelationAggregateInputSchema: z.ZodType = z.object({ - _count: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ClauseCountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - label: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ClauseMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - label: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const ClauseMinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - label: z.lazy(() => SortOrderSchema).optional(), - value: z.lazy(() => SortOrderSchema).optional() -}).strict(); - export const UserRelationFilterSchema: z.ZodType = z.object({ is: z.lazy(() => UserWhereInputSchema).optional(), isNot: z.lazy(() => UserWhereInputSchema).optional() @@ -1511,34 +1221,6 @@ export const BoolNullableWithAggregatesFilterSchema: z.ZodType NestedBoolNullableFilterSchema).optional() }).strict(); -export const ClauseRelationFilterSchema: z.ZodType = z.object({ - is: z.lazy(() => ClauseWhereInputSchema).optional(), - isNot: z.lazy(() => ClauseWhereInputSchema).optional() -}).strict(); - -export const ReportRelationFilterSchema: z.ZodType = z.object({ - is: z.lazy(() => ReportWhereInputSchema).optional(), - isNot: z.lazy(() => ReportWhereInputSchema).optional() -}).strict(); - -export const Report_to_clauseCountOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - clauseId: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Report_to_clauseMaxOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - clauseId: z.lazy(() => SortOrderSchema).optional() -}).strict(); - -export const Report_to_clauseMinOrderByAggregateInputSchema: z.ZodType = z.object({ - id: z.lazy(() => SortOrderSchema).optional(), - reportId: z.lazy(() => SortOrderSchema).optional(), - clauseId: z.lazy(() => SortOrderSchema).optional() -}).strict(); - export const UserListRelationFilterSchema: z.ZodType = z.object({ every: z.lazy(() => UserWhereInputSchema).optional(), some: z.lazy(() => UserWhereInputSchema).optional(), @@ -1635,48 +1317,6 @@ export const StringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), - createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const Report_to_clauseUncheckedCreateNestedManyWithoutClauseInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), - createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const Report_to_clauseUpdateManyWithoutClauseNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), - createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const Report_to_clauseUncheckedUpdateManyWithoutClauseNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutClauseInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), - createMany: z.lazy(() => Report_to_clauseCreateManyClauseInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), -}).strict(); - export const 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(), @@ -1711,20 +1351,6 @@ export const UserCreateNestedOneWithoutReportInputSchema: z.ZodType UserWhereUniqueInputSchema).optional() }).strict(); -export const Report_to_clauseCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - -export const Report_to_clauseUncheckedCreateNestedManyWithoutReportInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), - connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), -}).strict(); - export const NullableStringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ set: z.string().optional().nullable() }).strict(); @@ -1757,62 +1383,6 @@ export const UserUpdateOneRequiredWithoutReportNestedInputSchema: z.ZodType UserUpdateWithoutReportInputSchema),z.lazy(() => UserUncheckedUpdateWithoutReportInputSchema) ]).optional(), }).strict(); -export const Report_to_clauseUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const Report_to_clauseUncheckedUpdateManyWithoutReportNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema).array(),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema).array() ]).optional(), - connectOrCreate: z.union([ z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema),z.lazy(() => Report_to_clauseCreateOrConnectWithoutReportInputSchema).array() ]).optional(), - upsert: z.union([ z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - createMany: z.lazy(() => Report_to_clauseCreateManyReportInputEnvelopeSchema).optional(), - set: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - disconnect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - delete: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - connect: z.union([ z.lazy(() => Report_to_clauseWhereUniqueInputSchema),z.lazy(() => Report_to_clauseWhereUniqueInputSchema).array() ]).optional(), - update: z.union([ z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema).array() ]).optional(), - updateMany: z.union([ z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema),z.lazy(() => Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema).array() ]).optional(), - deleteMany: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), -}).strict(); - -export const ClauseCreateNestedOneWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => ClauseCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), - connect: z.lazy(() => ClauseWhereUniqueInputSchema).optional() -}).strict(); - -export const ReportCreateNestedOneWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), - connect: z.lazy(() => ReportWhereUniqueInputSchema).optional() -}).strict(); - -export const ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => ClauseCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), - upsert: z.lazy(() => ClauseUpsertWithoutReport_to_clauseInputSchema).optional(), - connect: z.lazy(() => ClauseWhereUniqueInputSchema).optional(), - update: z.union([ z.lazy(() => ClauseUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedUpdateWithoutReport_to_clauseInputSchema) ]).optional(), -}).strict(); - -export const ReportUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema: z.ZodType = z.object({ - create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]).optional(), - connectOrCreate: z.lazy(() => ReportCreateOrConnectWithoutReport_to_clauseInputSchema).optional(), - upsert: z.lazy(() => ReportUpsertWithoutReport_to_clauseInputSchema).optional(), - connect: z.lazy(() => ReportWhereUniqueInputSchema).optional(), - update: z.union([ z.lazy(() => ReportUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutReport_to_clauseInputSchema) ]).optional(), -}).strict(); - export const 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(), @@ -2169,51 +1739,6 @@ export const NestedBoolNullableWithAggregatesFilterSchema: z.ZodType NestedBoolNullableFilterSchema).optional() }).strict(); -export const Report_to_clauseCreateWithoutClauseInputSchema: z.ZodType = z.object({ - id: z.string(), - report: z.lazy(() => ReportCreateNestedOneWithoutReport_to_clauseInputSchema) -}).strict(); - -export const Report_to_clauseUncheckedCreateWithoutClauseInputSchema: z.ZodType = z.object({ - id: z.string(), - reportId: z.string() -}).strict(); - -export const Report_to_clauseCreateOrConnectWithoutClauseInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema) ]), -}).strict(); - -export const Report_to_clauseCreateManyClauseInputEnvelopeSchema: z.ZodType = z.object({ - data: z.lazy(() => Report_to_clauseCreateManyClauseInputSchema).array(), - skipDuplicates: z.boolean().optional() -}).strict(); - -export const Report_to_clauseUpsertWithWhereUniqueWithoutClauseInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), - update: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutClauseInputSchema) ]), - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutClauseInputSchema) ]), -}).strict(); - -export const Report_to_clauseUpdateWithWhereUniqueWithoutClauseInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), - data: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutClauseInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutClauseInputSchema) ]), -}).strict(); - -export const Report_to_clauseUpdateManyWithWhereWithoutClauseInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Report_to_clauseScalarWhereInputSchema), - data: z.union([ z.lazy(() => Report_to_clauseUpdateManyMutationInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInputSchema) ]), -}).strict(); - -export const Report_to_clauseScalarWhereInputSchema: z.ZodType = z.object({ - AND: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), - OR: z.lazy(() => Report_to_clauseScalarWhereInputSchema).array().optional(), - NOT: z.union([ z.lazy(() => Report_to_clauseScalarWhereInputSchema),z.lazy(() => Report_to_clauseScalarWhereInputSchema).array() ]).optional(), - id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - reportId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), - clauseId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), -}).strict(); - export const UserCreateWithoutDelegation_delegation_createdByTouserInputSchema: z.ZodType = z.object({ id: z.string(), name: z.string(), @@ -2319,26 +1844,6 @@ export const UserCreateOrConnectWithoutReportInputSchema: z.ZodType UserCreateWithoutReportInputSchema),z.lazy(() => UserUncheckedCreateWithoutReportInputSchema) ]), }).strict(); -export const Report_to_clauseCreateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.string(), - clause: z.lazy(() => ClauseCreateNestedOneWithoutReport_to_clauseInputSchema) -}).strict(); - -export const Report_to_clauseUncheckedCreateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.string(), - clauseId: z.string() -}).strict(); - -export const Report_to_clauseCreateOrConnectWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema) ]), -}).strict(); - -export const Report_to_clauseCreateManyReportInputEnvelopeSchema: z.ZodType = z.object({ - data: z.lazy(() => Report_to_clauseCreateManyReportInputSchema).array(), - skipDuplicates: z.boolean().optional() -}).strict(); - export const UserUpsertWithoutReportInputSchema: z.ZodType = z.object({ update: z.union([ z.lazy(() => UserUpdateWithoutReportInputSchema),z.lazy(() => UserUncheckedUpdateWithoutReportInputSchema) ]), create: z.union([ z.lazy(() => UserCreateWithoutReportInputSchema),z.lazy(() => UserUncheckedCreateWithoutReportInputSchema) ]), @@ -2360,154 +1865,6 @@ export const UserUncheckedUpdateWithoutReportInputSchema: z.ZodType DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInputSchema).optional() }).strict(); -export const Report_to_clauseUpsertWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), - update: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutReportInputSchema) ]), - create: z.union([ z.lazy(() => Report_to_clauseCreateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedCreateWithoutReportInputSchema) ]), -}).strict(); - -export const Report_to_clauseUpdateWithWhereUniqueWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Report_to_clauseWhereUniqueInputSchema), - data: z.union([ z.lazy(() => Report_to_clauseUpdateWithoutReportInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateWithoutReportInputSchema) ]), -}).strict(); - -export const Report_to_clauseUpdateManyWithWhereWithoutReportInputSchema: z.ZodType = z.object({ - where: z.lazy(() => Report_to_clauseScalarWhereInputSchema), - data: z.union([ z.lazy(() => Report_to_clauseUpdateManyMutationInputSchema),z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInputSchema) ]), -}).strict(); - -export const ClauseCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - id: z.string(), - label: z.string(), - value: z.string() -}).strict(); - -export const ClauseUncheckedCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - id: z.string(), - label: z.string(), - value: z.string() -}).strict(); - -export const ClauseCreateOrConnectWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - where: z.lazy(() => ClauseWhereUniqueInputSchema), - create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]), -}).strict(); - -export const ReportCreateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - id: z.string(), - title: z.string().optional().nullable(), - 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(), - user: z.lazy(() => UserCreateNestedOneWithoutReportInputSchema) -}).strict(); - -export const ReportUncheckedCreateWithoutReport_to_clauseInputSchema: 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() -}).strict(); - -export const ReportCreateOrConnectWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - where: z.lazy(() => ReportWhereUniqueInputSchema), - create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]), -}).strict(); - -export const ClauseUpsertWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => ClauseUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedUpdateWithoutReport_to_clauseInputSchema) ]), - create: z.union([ z.lazy(() => ClauseCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ClauseUncheckedCreateWithoutReport_to_clauseInputSchema) ]), -}).strict(); - -export const ClauseUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const ClauseUncheckedUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - label: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - value: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const ReportUpsertWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - update: z.union([ z.lazy(() => ReportUpdateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedUpdateWithoutReport_to_clauseInputSchema) ]), - create: z.union([ z.lazy(() => ReportCreateWithoutReport_to_clauseInputSchema),z.lazy(() => ReportUncheckedCreateWithoutReport_to_clauseInputSchema) ]), -}).strict(); - -export const ReportUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - 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(), - user: z.lazy(() => UserUpdateOneRequiredWithoutReportNestedInputSchema).optional() -}).strict(); - -export const ReportUncheckedUpdateWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - title: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - 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(), -}).strict(); - export const UserCreateWithoutUdapInputSchema: z.ZodType = z.object({ id: z.string(), name: z.string(), @@ -2613,8 +1970,7 @@ export const ReportCreateWithoutUserInputSchema: z.ZodType Report_to_clauseCreateNestedManyWithoutReportInputSchema).optional() + udap_id: z.string().optional().nullable() }).strict(); export const ReportUncheckedCreateWithoutUserInputSchema: z.ZodType = z.object({ @@ -2635,8 +1991,7 @@ export const ReportUncheckedCreateWithoutUserInputSchema: z.ZodType Report_to_clauseUncheckedCreateNestedManyWithoutReportInputSchema).optional() + udap_id: z.string().optional().nullable() }).strict(); export const ReportCreateOrConnectWithoutUserInputSchema: z.ZodType = z.object({ @@ -2792,41 +2147,6 @@ export const UdapUncheckedUpdateWithoutUserInputSchema: z.ZodType NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), }).strict(); -export const Report_to_clauseCreateManyClauseInputSchema: z.ZodType = z.object({ - id: z.string(), - reportId: z.string() -}).strict(); - -export const Report_to_clauseUpdateWithoutClauseInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - report: z.lazy(() => ReportUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional() -}).strict(); - -export const Report_to_clauseUncheckedUpdateWithoutClauseInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - reportId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - reportId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - -export const Report_to_clauseCreateManyReportInputSchema: z.ZodType = z.object({ - id: z.string(), - clauseId: z.string() -}).strict(); - -export const Report_to_clauseUpdateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - clause: z.lazy(() => ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInputSchema).optional() -}).strict(); - -export const Report_to_clauseUncheckedUpdateWithoutReportInputSchema: z.ZodType = z.object({ - id: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - clauseId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), -}).strict(); - export const UserCreateManyUdapInputSchema: z.ZodType = z.object({ id: z.string(), name: z.string() @@ -2925,7 +2245,6 @@ export const ReportUpdateWithoutUserInputSchema: z.ZodType NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - report_to_clause: z.lazy(() => Report_to_clauseUpdateManyWithoutReportNestedInputSchema).optional() }).strict(); export const ReportUncheckedUpdateWithoutUserInputSchema: z.ZodType = z.object({ @@ -2947,7 +2266,6 @@ export const ReportUncheckedUpdateWithoutUserInputSchema: z.ZodType NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), disabled: z.union([ z.boolean(),z.lazy(() => NullableBoolFieldUpdateOperationsInputSchema) ]).optional().nullable(), udap_id: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), - report_to_clause: z.lazy(() => Report_to_clauseUncheckedUpdateManyWithoutReportNestedInputSchema).optional() }).strict(); export const ReportUncheckedUpdateManyWithoutReportInputSchema: z.ZodType = z.object({ @@ -2975,95 +2293,35 @@ export const ReportUncheckedUpdateManyWithoutReportInputSchema: z.ZodType = z.object({ - select: ChipSelectSchema.optional(), - where: ChipWhereInputSchema.optional(), - orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), - cursor: ChipWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: ChipScalarFieldEnumSchema.array().optional(), -}).strict() - -export const ChipFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: ChipSelectSchema.optional(), - where: ChipWhereInputSchema.optional(), - orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), - cursor: ChipWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: ChipScalarFieldEnumSchema.array().optional(), -}).strict() - -export const ChipFindManyArgsSchema: z.ZodType = z.object({ - select: ChipSelectSchema.optional(), - where: ChipWhereInputSchema.optional(), - orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), - cursor: ChipWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: ChipScalarFieldEnumSchema.array().optional(), -}).strict() - -export const ChipAggregateArgsSchema: z.ZodType = z.object({ - where: ChipWhereInputSchema.optional(), - orderBy: z.union([ ChipOrderByWithRelationInputSchema.array(),ChipOrderByWithRelationInputSchema ]).optional(), - cursor: ChipWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() - -export const ChipGroupByArgsSchema: z.ZodType = z.object({ - where: ChipWhereInputSchema.optional(), - orderBy: z.union([ ChipOrderByWithAggregationInputSchema.array(),ChipOrderByWithAggregationInputSchema ]).optional(), - by: ChipScalarFieldEnumSchema.array(), - having: ChipScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() - -export const ChipFindUniqueArgsSchema: z.ZodType = z.object({ - select: ChipSelectSchema.optional(), - where: ChipWhereUniqueInputSchema, -}).strict() - -export const ChipFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: ChipSelectSchema.optional(), - where: ChipWhereUniqueInputSchema, -}).strict() - export const ClauseFindFirstArgsSchema: z.ZodType = z.object({ select: ClauseSelectSchema.optional(), - include: ClauseIncludeSchema.optional(), where: ClauseWhereInputSchema.optional(), orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), cursor: ClauseWhereUniqueInputSchema.optional(), take: z.number().optional(), skip: z.number().optional(), distinct: ClauseScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType +}).strict() export const ClauseFindFirstOrThrowArgsSchema: z.ZodType = z.object({ select: ClauseSelectSchema.optional(), - include: ClauseIncludeSchema.optional(), where: ClauseWhereInputSchema.optional(), orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), cursor: ClauseWhereUniqueInputSchema.optional(), take: z.number().optional(), skip: z.number().optional(), distinct: ClauseScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType +}).strict() export const ClauseFindManyArgsSchema: z.ZodType = z.object({ select: ClauseSelectSchema.optional(), - include: ClauseIncludeSchema.optional(), where: ClauseWhereInputSchema.optional(), orderBy: z.union([ ClauseOrderByWithRelationInputSchema.array(),ClauseOrderByWithRelationInputSchema ]).optional(), cursor: ClauseWhereUniqueInputSchema.optional(), take: z.number().optional(), skip: z.number().optional(), distinct: ClauseScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType +}).strict() export const ClauseAggregateArgsSchema: z.ZodType = z.object({ where: ClauseWhereInputSchema.optional(), @@ -3071,7 +2329,7 @@ export const ClauseAggregateArgsSchema: z.ZodType = cursor: ClauseWhereUniqueInputSchema.optional(), take: z.number().optional(), skip: z.number().optional(), -}).strict() as z.ZodType +}).strict() export const ClauseGroupByArgsSchema: z.ZodType = z.object({ where: ClauseWhereInputSchema.optional(), @@ -3080,19 +2338,17 @@ export const ClauseGroupByArgsSchema: z.ZodType = z.ob having: ClauseScalarWhereWithAggregatesInputSchema.optional(), take: z.number().optional(), skip: z.number().optional(), -}).strict() as z.ZodType +}).strict() export const ClauseFindUniqueArgsSchema: z.ZodType = z.object({ select: ClauseSelectSchema.optional(), - include: ClauseIncludeSchema.optional(), where: ClauseWhereUniqueInputSchema, -}).strict() as z.ZodType +}).strict() export const ClauseFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ select: ClauseSelectSchema.optional(), - include: ClauseIncludeSchema.optional(), where: ClauseWhereUniqueInputSchema, -}).strict() as z.ZodType +}).strict() export const DelegationFindFirstArgsSchema: z.ZodType = z.object({ select: DelegationSelectSchema.optional(), @@ -3218,68 +2474,6 @@ export const ReportFindUniqueOrThrowArgsSchema: z.ZodType -export const Report_to_clauseFindFirstArgsSchema: z.ZodType = z.object({ - select: Report_to_clauseSelectSchema.optional(), - include: Report_to_clauseIncludeSchema.optional(), - where: Report_to_clauseWhereInputSchema.optional(), - orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), - cursor: Report_to_clauseWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Report_to_clauseScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const Report_to_clauseFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: Report_to_clauseSelectSchema.optional(), - include: Report_to_clauseIncludeSchema.optional(), - where: Report_to_clauseWhereInputSchema.optional(), - orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), - cursor: Report_to_clauseWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Report_to_clauseScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const Report_to_clauseFindManyArgsSchema: z.ZodType = z.object({ - select: Report_to_clauseSelectSchema.optional(), - include: Report_to_clauseIncludeSchema.optional(), - where: Report_to_clauseWhereInputSchema.optional(), - orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), - cursor: Report_to_clauseWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), - distinct: Report_to_clauseScalarFieldEnumSchema.array().optional(), -}).strict() as z.ZodType - -export const Report_to_clauseAggregateArgsSchema: z.ZodType = z.object({ - where: Report_to_clauseWhereInputSchema.optional(), - orderBy: z.union([ Report_to_clauseOrderByWithRelationInputSchema.array(),Report_to_clauseOrderByWithRelationInputSchema ]).optional(), - cursor: Report_to_clauseWhereUniqueInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const Report_to_clauseGroupByArgsSchema: z.ZodType = z.object({ - where: Report_to_clauseWhereInputSchema.optional(), - orderBy: z.union([ Report_to_clauseOrderByWithAggregationInputSchema.array(),Report_to_clauseOrderByWithAggregationInputSchema ]).optional(), - by: Report_to_clauseScalarFieldEnumSchema.array(), - having: Report_to_clauseScalarWhereWithAggregatesInputSchema.optional(), - take: z.number().optional(), - skip: z.number().optional(), -}).strict() as z.ZodType - -export const Report_to_clauseFindUniqueArgsSchema: z.ZodType = z.object({ - select: Report_to_clauseSelectSchema.optional(), - include: Report_to_clauseIncludeSchema.optional(), - where: Report_to_clauseWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const Report_to_clauseFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: Report_to_clauseSelectSchema.optional(), - include: Report_to_clauseIncludeSchema.optional(), - where: Report_to_clauseWhereUniqueInputSchema, -}).strict() as z.ZodType - export const UdapFindFirstArgsSchema: z.ZodType = z.object({ select: UdapSelectSchema.optional(), include: UdapIncludeSchema.optional(), @@ -3404,83 +2598,42 @@ export const UserFindUniqueOrThrowArgsSchema: z.ZodType -export const ChipCreateArgsSchema: z.ZodType = z.object({ - select: ChipSelectSchema.optional(), - data: z.union([ ChipCreateInputSchema,ChipUncheckedCreateInputSchema ]), -}).strict() - -export const ChipUpsertArgsSchema: z.ZodType = z.object({ - select: ChipSelectSchema.optional(), - where: ChipWhereUniqueInputSchema, - create: z.union([ ChipCreateInputSchema,ChipUncheckedCreateInputSchema ]), - update: z.union([ ChipUpdateInputSchema,ChipUncheckedUpdateInputSchema ]), -}).strict() - -export const ChipCreateManyArgsSchema: z.ZodType = z.object({ - data: ChipCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() - -export const ChipDeleteArgsSchema: z.ZodType = z.object({ - select: ChipSelectSchema.optional(), - where: ChipWhereUniqueInputSchema, -}).strict() - -export const ChipUpdateArgsSchema: z.ZodType = z.object({ - select: ChipSelectSchema.optional(), - data: z.union([ ChipUpdateInputSchema,ChipUncheckedUpdateInputSchema ]), - where: ChipWhereUniqueInputSchema, -}).strict() - -export const ChipUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ ChipUpdateManyMutationInputSchema,ChipUncheckedUpdateManyInputSchema ]), - where: ChipWhereInputSchema.optional(), -}).strict() - -export const ChipDeleteManyArgsSchema: z.ZodType = z.object({ - where: ChipWhereInputSchema.optional(), -}).strict() - export const ClauseCreateArgsSchema: z.ZodType = z.object({ select: ClauseSelectSchema.optional(), - include: ClauseIncludeSchema.optional(), data: z.union([ ClauseCreateInputSchema,ClauseUncheckedCreateInputSchema ]), -}).strict() as z.ZodType +}).strict() export const ClauseUpsertArgsSchema: z.ZodType = z.object({ select: ClauseSelectSchema.optional(), - include: ClauseIncludeSchema.optional(), where: ClauseWhereUniqueInputSchema, create: z.union([ ClauseCreateInputSchema,ClauseUncheckedCreateInputSchema ]), update: z.union([ ClauseUpdateInputSchema,ClauseUncheckedUpdateInputSchema ]), -}).strict() as z.ZodType +}).strict() export const ClauseCreateManyArgsSchema: z.ZodType = z.object({ data: ClauseCreateManyInputSchema.array(), skipDuplicates: z.boolean().optional(), -}).strict() as z.ZodType +}).strict() export const ClauseDeleteArgsSchema: z.ZodType = z.object({ select: ClauseSelectSchema.optional(), - include: ClauseIncludeSchema.optional(), where: ClauseWhereUniqueInputSchema, -}).strict() as z.ZodType +}).strict() export const ClauseUpdateArgsSchema: z.ZodType = z.object({ select: ClauseSelectSchema.optional(), - include: ClauseIncludeSchema.optional(), data: z.union([ ClauseUpdateInputSchema,ClauseUncheckedUpdateInputSchema ]), where: ClauseWhereUniqueInputSchema, -}).strict() as z.ZodType +}).strict() export const ClauseUpdateManyArgsSchema: z.ZodType = z.object({ data: z.union([ ClauseUpdateManyMutationInputSchema,ClauseUncheckedUpdateManyInputSchema ]), where: ClauseWhereInputSchema.optional(), -}).strict() as z.ZodType +}).strict() export const ClauseDeleteManyArgsSchema: z.ZodType = z.object({ where: ClauseWhereInputSchema.optional(), -}).strict() as z.ZodType +}).strict() export const DelegationCreateArgsSchema: z.ZodType = z.object({ select: DelegationSelectSchema.optional(), @@ -3564,47 +2717,6 @@ export const ReportDeleteManyArgsSchema: z.ZodType where: ReportWhereInputSchema.optional(), }).strict() as z.ZodType -export const Report_to_clauseCreateArgsSchema: z.ZodType = z.object({ - select: Report_to_clauseSelectSchema.optional(), - include: Report_to_clauseIncludeSchema.optional(), - data: z.union([ Report_to_clauseCreateInputSchema,Report_to_clauseUncheckedCreateInputSchema ]), -}).strict() as z.ZodType - -export const Report_to_clauseUpsertArgsSchema: z.ZodType = z.object({ - select: Report_to_clauseSelectSchema.optional(), - include: Report_to_clauseIncludeSchema.optional(), - where: Report_to_clauseWhereUniqueInputSchema, - create: z.union([ Report_to_clauseCreateInputSchema,Report_to_clauseUncheckedCreateInputSchema ]), - update: z.union([ Report_to_clauseUpdateInputSchema,Report_to_clauseUncheckedUpdateInputSchema ]), -}).strict() as z.ZodType - -export const Report_to_clauseCreateManyArgsSchema: z.ZodType = z.object({ - data: Report_to_clauseCreateManyInputSchema.array(), - skipDuplicates: z.boolean().optional(), -}).strict() as z.ZodType - -export const Report_to_clauseDeleteArgsSchema: z.ZodType = z.object({ - select: Report_to_clauseSelectSchema.optional(), - include: Report_to_clauseIncludeSchema.optional(), - where: Report_to_clauseWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const Report_to_clauseUpdateArgsSchema: z.ZodType = z.object({ - select: Report_to_clauseSelectSchema.optional(), - include: Report_to_clauseIncludeSchema.optional(), - data: z.union([ Report_to_clauseUpdateInputSchema,Report_to_clauseUncheckedUpdateInputSchema ]), - where: Report_to_clauseWhereUniqueInputSchema, -}).strict() as z.ZodType - -export const Report_to_clauseUpdateManyArgsSchema: z.ZodType = z.object({ - data: z.union([ Report_to_clauseUpdateManyMutationInputSchema,Report_to_clauseUncheckedUpdateManyInputSchema ]), - where: Report_to_clauseWhereInputSchema.optional(), -}).strict() as z.ZodType - -export const Report_to_clauseDeleteManyArgsSchema: z.ZodType = z.object({ - where: Report_to_clauseWhereInputSchema.optional(), -}).strict() as z.ZodType - export const UdapCreateArgsSchema: z.ZodType = z.object({ select: UdapSelectSchema.optional(), include: UdapIncludeSchema.optional(), @@ -3687,11 +2799,6 @@ export const UserDeleteManyArgsSchema: z.ZodType = z. where: UserWhereInputSchema.optional(), }).strict() as z.ZodType -interface ChipGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.ChipArgs - readonly type: Omit, "Please either choose `select` or `include`"> -} - interface ClauseGetPayload extends HKT { readonly _A?: boolean | null | undefined | Prisma.ClauseArgs readonly type: Omit, "Please either choose `select` or `include`"> @@ -3707,11 +2814,6 @@ interface ReportGetPayload extends HKT { readonly type: Omit, "Please either choose `select` or `include`"> } -interface Report_to_clauseGetPayload extends HKT { - readonly _A?: boolean | null | undefined | Prisma.Report_to_clauseArgs - readonly type: Omit, "Please either choose `select` or `include`"> -} - interface UdapGetPayload extends HKT { readonly _A?: boolean | null | undefined | Prisma.UdapArgs readonly type: Omit, "Please either choose `select` or `include`"> @@ -3723,7 +2825,7 @@ interface UserGetPayload extends HKT { } export const tableSchemas = { - chip: { + clause: { fields: new Map([ [ "key", @@ -3744,48 +2846,6 @@ export const tableSchemas = { ]), relations: [ ], - modelSchema: (ChipCreateInputSchema as any) - .partial() - .or((ChipUncheckedCreateInputSchema as any).partial()), - createSchema: ChipCreateArgsSchema, - createManySchema: ChipCreateManyArgsSchema, - findUniqueSchema: ChipFindUniqueArgsSchema, - findSchema: ChipFindFirstArgsSchema, - updateSchema: ChipUpdateArgsSchema, - updateManySchema: ChipUpdateManyArgsSchema, - upsertSchema: ChipUpsertArgsSchema, - deleteSchema: ChipDeleteArgsSchema, - deleteManySchema: ChipDeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.ChipCreateArgs['data'], - Prisma.ChipUpdateArgs['data'], - Prisma.ChipFindFirstArgs['select'], - Prisma.ChipFindFirstArgs['where'], - Prisma.ChipFindUniqueArgs['where'], - never, - Prisma.ChipFindFirstArgs['orderBy'], - Prisma.ChipScalarFieldEnum, - ChipGetPayload - >, - clause: { - fields: new Map([ - [ - "id", - "TEXT" - ], - [ - "label", - "TEXT" - ], - [ - "value", - "TEXT" - ] - ]), - relations: [ - new Relation("report_to_clause", "", "", "report_to_clause", "ClauseToReport_to_clause", "many"), - ], modelSchema: (ClauseCreateInputSchema as any) .partial() .or((ClauseUncheckedCreateInputSchema as any).partial()), @@ -3805,7 +2865,7 @@ export const tableSchemas = { Prisma.ClauseFindFirstArgs['select'], Prisma.ClauseFindFirstArgs['where'], Prisma.ClauseFindUniqueArgs['where'], - Omit, + never, Prisma.ClauseFindFirstArgs['orderBy'], Prisma.ClauseScalarFieldEnum, ClauseGetPayload @@ -3930,7 +2990,6 @@ export const tableSchemas = { ]), relations: [ new Relation("user", "createdBy", "id", "user", "ReportToUser", "one"), - new Relation("report_to_clause", "", "", "report_to_clause", "ReportToReport_to_clause", "many"), ], modelSchema: (ReportCreateInputSchema as any) .partial() @@ -3956,49 +3015,6 @@ export const tableSchemas = { Prisma.ReportScalarFieldEnum, ReportGetPayload >, - report_to_clause: { - fields: new Map([ - [ - "id", - "TEXT" - ], - [ - "reportId", - "TEXT" - ], - [ - "clauseId", - "TEXT" - ] - ]), - relations: [ - new Relation("clause", "clauseId", "id", "clause", "ClauseToReport_to_clause", "one"), - new Relation("report", "reportId", "id", "report", "ReportToReport_to_clause", "one"), - ], - modelSchema: (Report_to_clauseCreateInputSchema as any) - .partial() - .or((Report_to_clauseUncheckedCreateInputSchema as any).partial()), - createSchema: Report_to_clauseCreateArgsSchema, - createManySchema: Report_to_clauseCreateManyArgsSchema, - findUniqueSchema: Report_to_clauseFindUniqueArgsSchema, - findSchema: Report_to_clauseFindFirstArgsSchema, - updateSchema: Report_to_clauseUpdateArgsSchema, - updateManySchema: Report_to_clauseUpdateManyArgsSchema, - upsertSchema: Report_to_clauseUpsertArgsSchema, - deleteSchema: Report_to_clauseDeleteArgsSchema, - deleteManySchema: Report_to_clauseDeleteManyArgsSchema - } as TableSchema< - z.infer, - Prisma.Report_to_clauseCreateArgs['data'], - Prisma.Report_to_clauseUpdateArgs['data'], - Prisma.Report_to_clauseFindFirstArgs['select'], - Prisma.Report_to_clauseFindFirstArgs['where'], - Prisma.Report_to_clauseFindUniqueArgs['where'], - Omit, - Prisma.Report_to_clauseFindFirstArgs['orderBy'], - Prisma.Report_to_clauseScalarFieldEnum, - Report_to_clauseGetPayload - >, udap: { fields: new Map([ [ diff --git a/packages/electric-client/src/generated/client/migrations.ts b/packages/electric-client/src/generated/client/migrations.ts index 05a69a42..7078d0ba 100644 --- a/packages/electric-client/src/generated/client/migrations.ts +++ b/packages/electric-client/src/generated/client/migrations.ts @@ -49,8 +49,6 @@ export default [ { "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", - "CREATE TABLE \"report_to_clause\" (\n \"id\" TEXT NOT NULL,\n \"reportId\" TEXT NOT NULL,\n \"clauseId\" TEXT NOT NULL,\n CONSTRAINT \"report_to_clause_clauseId_fkey\" FOREIGN KEY (\"clauseId\") REFERENCES \"clause\" (\"id\") ON DELETE CASCADE,\n CONSTRAINT \"report_to_clause_reportId_fkey\" FOREIGN KEY (\"reportId\") REFERENCES \"report\" (\"id\") ON DELETE CASCADE,\n CONSTRAINT \"report_to_clause_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", - "CREATE TABLE \"clause\" (\n \"id\" TEXT NOT NULL,\n \"label\" TEXT NOT NULL,\n \"value\" TEXT NOT NULL,\n CONSTRAINT \"clause_pkey\" PRIMARY KEY (\"id\")\n) WITHOUT ROWID;\n", "INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('main.report', 1);", "DROP TRIGGER IF EXISTS update_ensure_main_report_primarykey;", "CREATE TRIGGER update_ensure_main_report_primarykey\n BEFORE UPDATE ON \"main\".\"report\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"id\" != new.\"id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column id as it belongs to the primary key')\n END;\nEND;", @@ -63,48 +61,22 @@ export default [ "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 tablename == 'main.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', 'user', 'COMPENSATION', 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 tablename == 'main.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', 'user', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;", - "INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('main.report_to_clause', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_report_to_clause_primarykey;", - "CREATE TRIGGER update_ensure_main_report_to_clause_primarykey\n BEFORE UPDATE ON \"main\".\"report_to_clause\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"id\" != new.\"id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column id as it belongs to the primary key')\n END;\nEND;", - "DROP TRIGGER IF EXISTS insert_main_report_to_clause_into_oplog;", - "CREATE TRIGGER insert_main_report_to_clause_into_oplog\n AFTER INSERT ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report_to_clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report_to_clause', 'INSERT', json_object('id', new.\"id\"), json_object('clauseId', new.\"clauseId\", 'id', new.\"id\", 'reportId', new.\"reportId\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_report_to_clause_into_oplog;", - "CREATE TRIGGER update_main_report_to_clause_into_oplog\n AFTER UPDATE ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report_to_clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report_to_clause', 'UPDATE', json_object('id', new.\"id\"), json_object('clauseId', new.\"clauseId\", 'id', new.\"id\", 'reportId', new.\"reportId\"), json_object('clauseId', old.\"clauseId\", 'id', old.\"id\", 'reportId', old.\"reportId\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_report_to_clause_into_oplog;", - "CREATE TRIGGER delete_main_report_to_clause_into_oplog\n AFTER DELETE ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report_to_clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'report_to_clause', 'DELETE', json_object('id', old.\"id\"), NULL, json_object('clauseId', old.\"clauseId\", 'id', old.\"id\", 'reportId', old.\"reportId\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_report_to_clause_clauseId_into_oplog;", - "CREATE TRIGGER compensation_insert_main_report_to_clause_clauseId_into_oplog\n AFTER INSERT ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.clause') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'clause', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"clause\" WHERE \"id\" = new.\"clauseId\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_report_to_clause_clauseId_into_oplog;", - "CREATE TRIGGER compensation_update_main_report_to_clause_clauseId_into_oplog\n AFTER UPDATE ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.clause') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'clause', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"clause\" WHERE \"id\" = new.\"clauseId\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_insert_main_report_to_clause_reportId_into_oplog;", - "CREATE TRIGGER compensation_insert_main_report_to_clause_reportId_into_oplog\n AFTER INSERT ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'report', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"reportId\";\nEND;", - "DROP TRIGGER IF EXISTS compensation_update_main_report_to_clause_reportId_into_oplog;", - "CREATE TRIGGER compensation_update_main_report_to_clause_reportId_into_oplog\n AFTER UPDATE ON \"main\".\"report_to_clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.report') AND\n 1 == (SELECT value from _electric_meta WHERE key == 'compensations')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n SELECT 'main', 'report', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"report\" WHERE \"id\" = new.\"reportId\";\nEND;", - "INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('main.clause', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_clause_primarykey;", - "CREATE TRIGGER update_ensure_main_clause_primarykey\n BEFORE UPDATE ON \"main\".\"clause\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"id\" != new.\"id\" THEN\n \t\tRAISE (ABORT, 'cannot change the value of column id as it belongs to the primary key')\n END;\nEND;", - "DROP TRIGGER IF EXISTS insert_main_clause_into_oplog;", - "CREATE TRIGGER insert_main_clause_into_oplog\n AFTER INSERT ON \"main\".\"clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'INSERT', json_object('id', new.\"id\"), json_object('id', new.\"id\", 'label', new.\"label\", 'value', new.\"value\"), NULL, NULL);\nEND;", - "DROP TRIGGER IF EXISTS update_main_clause_into_oplog;", - "CREATE TRIGGER update_main_clause_into_oplog\n AFTER UPDATE ON \"main\".\"clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'UPDATE', json_object('id', new.\"id\"), json_object('id', new.\"id\", 'label', new.\"label\", 'value', new.\"value\"), json_object('id', old.\"id\", 'label', old.\"label\", 'value', old.\"value\"), NULL);\nEND;", - "DROP TRIGGER IF EXISTS delete_main_clause_into_oplog;", - "CREATE TRIGGER delete_main_clause_into_oplog\n AFTER DELETE ON \"main\".\"clause\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'DELETE', json_object('id', old.\"id\"), NULL, json_object('id', old.\"id\", 'label', old.\"label\", 'value', old.\"value\"), NULL);\nEND;" + "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 tablename == 'main.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', 'user', 'COMPENSATION', json_object('id', \"id\"), json_object('id', \"id\"), NULL, NULL\n FROM \"main\".\"user\" WHERE \"id\" = new.\"createdBy\";\nEND;" ], "version": "2" }, { "statements": [ - "CREATE TABLE \"chip\" (\n \"key\" TEXT NOT NULL,\n \"value\" TEXT NOT NULL,\n \"udap_id\" TEXT NOT NULL,\n \"text\" TEXT NOT NULL,\n CONSTRAINT \"chip_pkey\" PRIMARY KEY (\"key\", \"value\", \"udap_id\")\n) WITHOUT ROWID;\n", - "INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('main.chip', 1);", - "DROP TRIGGER IF EXISTS update_ensure_main_chip_primarykey;", - "CREATE TRIGGER update_ensure_main_chip_primarykey\n BEFORE UPDATE ON \"main\".\"chip\"\nBEGIN\n SELECT\n CASE\n WHEN old.\"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_chip_into_oplog;", - "CREATE TRIGGER insert_main_chip_into_oplog\n AFTER INSERT ON \"main\".\"chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.chip')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'chip', 'INSERT', json_object('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_chip_into_oplog;", - "CREATE TRIGGER update_main_chip_into_oplog\n AFTER UPDATE ON \"main\".\"chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.chip')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'chip', 'UPDATE', json_object('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_chip_into_oplog;", - "CREATE TRIGGER delete_main_chip_into_oplog\n AFTER DELETE ON \"main\".\"chip\"\n WHEN 1 == (SELECT flag from _electric_trigger_settings WHERE tablename == 'main.chip')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'chip', 'DELETE', json_object('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;" + "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(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 tablename == 'main.clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'INSERT', 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 tablename == 'main.clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'UPDATE', 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 tablename == 'main.clause')\nBEGIN\n INSERT INTO _electric_oplog (namespace, tablename, optype, primaryKey, newRow, oldRow, timestamp)\n VALUES ('main', 'clause', 'DELETE', 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" } diff --git a/packages/electric-client/src/generated/client/prismaClient.d.ts b/packages/electric-client/src/generated/client/prismaClient.d.ts index 23c3ea12..d7829beb 100644 --- a/packages/electric-client/src/generated/client/prismaClient.d.ts +++ b/packages/electric-client/src/generated/client/prismaClient.d.ts @@ -12,32 +12,14 @@ import $Extensions = runtime.Types.Extensions export type PrismaPromise = $Public.PrismaPromise -export type ChipPayload = { - name: "Chip" +export type ClausePayload = { + name: "Clause" objects: {} scalars: $Extensions.GetResult<{ key: string value: string udap_id: string text: string - }, ExtArgs["result"]["chip"]> - composites: {} -} - -/** - * Model Chip - * - */ -export type Chip = runtime.Types.DefaultSelection -export type ClausePayload = { - name: "Clause" - objects: { - report_to_clause: Report_to_clausePayload[] - } - scalars: $Extensions.GetResult<{ - id: string - label: string - value: string }, ExtArgs["result"]["clause"]> composites: {} } @@ -69,7 +51,6 @@ export type ReportPayload - report_to_clause: Report_to_clausePayload[] } scalars: $Extensions.GetResult<{ id: string @@ -103,25 +84,6 @@ export type ReportPayload -export type Report_to_clausePayload = { - name: "Report_to_clause" - objects: { - clause: ClausePayload - report: ReportPayload - } - scalars: $Extensions.GetResult<{ - id: string - reportId: string - clauseId: string - }, ExtArgs["result"]["report_to_clause"]> - composites: {} -} - -/** - * Model Report_to_clause - * - */ -export type Report_to_clause = runtime.Types.DefaultSelection export type UdapPayload = { name: "Udap" objects: { @@ -176,8 +138,8 @@ export type User = runtime.Types.DefaultSelection * @example * ``` * const prisma = new PrismaClient() - * // Fetch zero or more Chips - * const chips = await prisma.chip.findMany() + * // Fetch zero or more Clauses + * const clauses = await prisma.clause.findMany() * ``` * * @@ -200,8 +162,8 @@ export class PrismaClient< * @example * ``` * const prisma = new PrismaClient() - * // Fetch zero or more Chips - * const chips = await prisma.chip.findMany() + * // Fetch zero or more Clauses + * const clauses = await prisma.clause.findMany() * ``` * * @@ -295,16 +257,6 @@ export class PrismaClient< $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> /** - * `prisma.chip`: Exposes CRUD operations for the **Chip** model. - * Example usage: - * ```ts - * // Fetch zero or more Chips - * const chips = await prisma.chip.findMany() - * ``` - */ - get chip(): Prisma.ChipDelegate; - - /** * `prisma.clause`: Exposes CRUD operations for the **Clause** model. * Example usage: * ```ts @@ -334,16 +286,6 @@ export class PrismaClient< */ get report(): Prisma.ReportDelegate; - /** - * `prisma.report_to_clause`: Exposes CRUD operations for the **Report_to_clause** model. - * Example usage: - * ```ts - * // Fetch zero or more Report_to_clauses - * const report_to_clauses = await prisma.report_to_clause.findMany() - * ``` - */ - get report_to_clause(): Prisma.Report_to_clauseDelegate; - /** * `prisma.udap`: Exposes CRUD operations for the **Udap** model. * Example usage: @@ -846,11 +788,9 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject export const ModelName: { - Chip: 'Chip', Clause: 'Clause', Delegation: 'Delegation', Report: 'Report', - Report_to_clause: 'Report_to_clause', Udap: 'Udap', User: 'User' }; @@ -869,75 +809,10 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject export type TypeMap = { meta: { - modelProps: 'chip' | 'clause' | 'delegation' | 'report' | 'report_to_clause' | 'udap' | 'user' + modelProps: 'clause' | 'delegation' | 'report' | 'udap' | 'user' txIsolationLevel: Prisma.TransactionIsolationLevel }, model: { - Chip: { - payload: ChipPayload - operations: { - findUnique: { - args: Prisma.ChipFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ChipFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.ChipFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ChipFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.ChipFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.ChipCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.ChipCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.ChipDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.ChipUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ChipDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.ChipUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.ChipUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.ChipAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.ChipGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.ChipCountArgs, - result: $Utils.Optional | number - } - } - } Clause: { payload: ClausePayload operations: { @@ -1133,71 +1008,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject } } } - Report_to_clause: { - payload: Report_to_clausePayload - operations: { - findUnique: { - args: Prisma.Report_to_clauseFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.Report_to_clauseFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.Report_to_clauseFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.Report_to_clauseFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.Report_to_clauseFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.Report_to_clauseCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.Report_to_clauseCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.Report_to_clauseDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.Report_to_clauseUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.Report_to_clauseDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.Report_to_clauseUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.Report_to_clauseUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.Report_to_clauseAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.Report_to_clauseGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.Report_to_clauseCountArgs, - result: $Utils.Optional | number - } - } - } Udap: { payload: UdapPayload operations: { @@ -1504,76 +1314,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject */ - /** - * Count Type ClauseCountOutputType - */ - - - export type ClauseCountOutputType = { - report_to_clause: number - } - - export type ClauseCountOutputTypeSelect = { - report_to_clause?: boolean | ClauseCountOutputTypeCountReport_to_clauseArgs - } - - // Custom InputTypes - - /** - * ClauseCountOutputType without action - */ - export type ClauseCountOutputTypeArgs = { - /** - * Select specific fields to fetch from the ClauseCountOutputType - */ - select?: ClauseCountOutputTypeSelect | null - } - - - /** - * ClauseCountOutputType without action - */ - export type ClauseCountOutputTypeCountReport_to_clauseArgs = { - where?: Report_to_clauseWhereInput - } - - - - /** - * Count Type ReportCountOutputType - */ - - - export type ReportCountOutputType = { - report_to_clause: number - } - - export type ReportCountOutputTypeSelect = { - report_to_clause?: boolean | ReportCountOutputTypeCountReport_to_clauseArgs - } - - // Custom InputTypes - - /** - * ReportCountOutputType without action - */ - export type ReportCountOutputTypeArgs = { - /** - * Select specific fields to fetch from the ReportCountOutputType - */ - select?: ReportCountOutputTypeSelect | null - } - - - /** - * ReportCountOutputType without action - */ - export type ReportCountOutputTypeCountReport_to_clauseArgs = { - where?: Report_to_clauseWhereInput - } - - - /** * Count Type UdapCountOutputType */ @@ -1669,31 +1409,31 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject */ /** - * Model Chip + * Model Clause */ - export type AggregateChip = { - _count: ChipCountAggregateOutputType | null - _min: ChipMinAggregateOutputType | null - _max: ChipMaxAggregateOutputType | null + export type AggregateClause = { + _count: ClauseCountAggregateOutputType | null + _min: ClauseMinAggregateOutputType | null + _max: ClauseMaxAggregateOutputType | null } - export type ChipMinAggregateOutputType = { + export type ClauseMinAggregateOutputType = { key: string | null value: string | null udap_id: string | null text: string | null } - export type ChipMaxAggregateOutputType = { + export type ClauseMaxAggregateOutputType = { key: string | null value: string | null udap_id: string | null text: string | null } - export type ChipCountAggregateOutputType = { + export type ClauseCountAggregateOutputType = { key: number value: number udap_id: number @@ -1702,21 +1442,21 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject } - export type ChipMinAggregateInputType = { + export type ClauseMinAggregateInputType = { key?: true value?: true udap_id?: true text?: true } - export type ChipMaxAggregateInputType = { + export type ClauseMaxAggregateInputType = { key?: true value?: true udap_id?: true text?: true } - export type ChipCountAggregateInputType = { + export type ClauseCountAggregateInputType = { key?: true value?: true udap_id?: true @@ -1724,111 +1464,111 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject _all?: true } - export type ChipAggregateArgs = { + export type ClauseAggregateArgs = { /** - * Filter which Chip to aggregate. + * Filter which Clause to aggregate. */ - where?: ChipWhereInput + where?: ClauseWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Chips to fetch. + * Determine the order of Clauses to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ - cursor?: ChipWhereUniqueInput + cursor?: ClauseWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Chips from the position of the cursor. + * 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` Chips. + * Skip the first `n` Clauses. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * - * Count returned Chips + * Count returned Clauses **/ - _count?: true | ChipCountAggregateInputType + _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?: ChipMinAggregateInputType + _min?: ClauseMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ - _max?: ChipMaxAggregateInputType + _max?: ClauseMaxAggregateInputType } - export type GetChipAggregateType = { - [P in keyof T & keyof AggregateChip]: P extends '_count' | 'count' + export type GetClauseAggregateType = { + [P in keyof T & keyof AggregateClause]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type ChipGroupByArgs = { - where?: ChipWhereInput - orderBy?: Enumerable - by: ChipScalarFieldEnum[] - having?: ChipScalarWhereWithAggregatesInput + export type ClauseGroupByArgs = { + where?: ClauseWhereInput + orderBy?: Enumerable + by: ClauseScalarFieldEnum[] + having?: ClauseScalarWhereWithAggregatesInput take?: number skip?: number - _count?: ChipCountAggregateInputType | true - _min?: ChipMinAggregateInputType - _max?: ChipMaxAggregateInputType + _count?: ClauseCountAggregateInputType | true + _min?: ClauseMinAggregateInputType + _max?: ClauseMaxAggregateInputType } - export type ChipGroupByOutputType = { + export type ClauseGroupByOutputType = { key: string value: string udap_id: string text: string - _count: ChipCountAggregateOutputType | null - _min: ChipMinAggregateOutputType | null - _max: ChipMaxAggregateOutputType | null + _count: ClauseCountAggregateOutputType | null + _min: ClauseMinAggregateOutputType | null + _max: ClauseMaxAggregateOutputType | null } - type GetChipGroupByPayload = Prisma.PrismaPromise< + type GetClauseGroupByPayload = Prisma.PrismaPromise< Array< - PickArray & + PickArray & { - [P in ((keyof T) & (keyof ChipGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof ClauseGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type ChipSelect = $Extensions.GetSelect<{ + export type ClauseSelect = $Extensions.GetSelect<{ key?: boolean value?: boolean udap_id?: boolean text?: boolean - }, ExtArgs["result"]["chip"]> + }, ExtArgs["result"]["clause"]> - export type ChipSelectScalar = { + export type ClauseSelectScalar = { key?: boolean value?: boolean udap_id?: boolean @@ -1836,155 +1576,155 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject } - type ChipGetPayload = $Types.GetResult + type ClauseGetPayload = $Types.GetResult - type ChipCountArgs = - Omit & { - select?: ChipCountAggregateInputType | true + type ClauseCountArgs = + Omit & { + select?: ClauseCountAggregateInputType | true } - export interface ChipDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Chip'], meta: { name: 'Chip' } } + export interface ClauseDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Clause'], meta: { name: 'Clause' } } /** - * Find zero or one Chip that matches the filter. - * @param {ChipFindUniqueArgs} args - Arguments to find a Chip + * Find zero or one Clause that matches the filter. + * @param {ClauseFindUniqueArgs} args - Arguments to find a Clause * @example - * // Get one Chip - * const chip = await prisma.chip.findUnique({ + * // 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__ChipClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__ChipClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + 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 Chip that matches the filter or throw an error with `error.code='P2025'` + * Find one Clause that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. - * @param {ChipFindUniqueOrThrowArgs} args - Arguments to find a Chip + * @param {ClauseFindUniqueOrThrowArgs} args - Arguments to find a Clause * @example - * // Get one Chip - * const chip = await prisma.chip.findUniqueOrThrow({ + * // Get one Clause + * const clause = await prisma.clause.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__ChipClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** - * Find the first Chip that matches the filter. + * 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 {ChipFindFirstArgs} args - Arguments to find a Chip + * @param {ClauseFindFirstArgs} args - Arguments to find a Clause * @example - * // Get one Chip - * const chip = await prisma.chip.findFirst({ + * // 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__ChipClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__ChipClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + 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 Chip that matches the filter or + * 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 {ChipFindFirstOrThrowArgs} args - Arguments to find a Chip + * @param {ClauseFindFirstOrThrowArgs} args - Arguments to find a Clause * @example - * // Get one Chip - * const chip = await prisma.chip.findFirstOrThrow({ + * // Get one Clause + * const clause = await prisma.clause.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__ChipClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** - * Find zero or more Chips that matches the filter. + * 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 {ChipFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {ClauseFindManyArgs=} args - Arguments to filter and select certain fields only. * @example - * // Get all Chips - * const chips = await prisma.chip.findMany() + * // Get all Clauses + * const clauses = await prisma.clause.findMany() * - * // Get first 10 Chips - * const chips = await prisma.chip.findMany({ take: 10 }) + * // Get first 10 Clauses + * const clauses = await prisma.clause.findMany({ take: 10 }) * * // Only select the `key` - * const chipWithKeyOnly = await prisma.chip.findMany({ select: { key: true } }) + * const clauseWithKeyOnly = await prisma.clause.findMany({ select: { key: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** - * Create a Chip. - * @param {ChipCreateArgs} args - Arguments to create a Chip. + * Create a Clause. + * @param {ClauseCreateArgs} args - Arguments to create a Clause. * @example - * // Create one Chip - * const Chip = await prisma.chip.create({ + * // Create one Clause + * const Clause = await prisma.clause.create({ * data: { - * // ... data to create a Chip + * // ... data to create a Clause * } * }) * **/ - create>( - args: SelectSubset> - ): Prisma__ChipClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create>( + args: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** - * Create many Chips. - * @param {ChipCreateManyArgs} args - Arguments to create many Chips. + * Create many Clauses. + * @param {ClauseCreateManyArgs} args - Arguments to create many Clauses. * @example - * // Create many Chips - * const chip = await prisma.chip.createMany({ - * data: { + * // Create many Clauses + * const clause = await prisma.clause.createMany({ + * data: { * // ... provide data here * } * }) * **/ - createMany>( - args?: SelectSubset> + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Delete a Chip. - * @param {ChipDeleteArgs} args - Arguments to delete one Chip. + * Delete a Clause. + * @param {ClauseDeleteArgs} args - Arguments to delete one Clause. * @example - * // Delete one Chip - * const Chip = await prisma.chip.delete({ + * // Delete one Clause + * const Clause = await prisma.clause.delete({ * where: { - * // ... filter to delete one Chip + * // ... filter to delete one Clause * } * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__ChipClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete>( + args: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** - * Update one Chip. - * @param {ChipUpdateArgs} args - Arguments to update one Chip. + * Update one Clause. + * @param {ClauseUpdateArgs} args - Arguments to update one Clause. * @example - * // Update one Chip - * const chip = await prisma.chip.update({ + * // Update one Clause + * const clause = await prisma.clause.update({ * where: { * // ... provide filter here * }, @@ -1994,34 +1734,34 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * }) * **/ - update>( - args: SelectSubset> - ): Prisma__ChipClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update>( + args: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** - * Delete zero or more Chips. - * @param {ChipDeleteManyArgs} args - Arguments to filter Chips to delete. + * Delete zero or more Clauses. + * @param {ClauseDeleteManyArgs} args - Arguments to filter Clauses to delete. * @example - * // Delete a few Chips - * const { count } = await prisma.chip.deleteMany({ + * // Delete a few Clauses + * const { count } = await prisma.clause.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Update zero or more Chips. + * 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 {ChipUpdateManyArgs} args - Arguments to update one or more rows. + * @param {ClauseUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many Chips - * const chip = await prisma.chip.updateMany({ + * // Update many Clauses + * const clause = await prisma.clause.updateMany({ * where: { * // ... provide filter here * }, @@ -2031,59 +1771,59 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * }) * **/ - updateMany>( - args: SelectSubset> + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** - * Create or update one Chip. - * @param {ChipUpsertArgs} args - Arguments to update or create a Chip. + * Create or update one Clause. + * @param {ClauseUpsertArgs} args - Arguments to update or create a Clause. * @example - * // Update or create a Chip - * const chip = await prisma.chip.upsert({ + * // Update or create a Clause + * const clause = await prisma.clause.upsert({ * create: { - * // ... data to create a Chip + * // ... data to create a Clause * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the Chip we want to update + * // ... the filter for the Clause we want to update * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__ChipClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert>( + args: SelectSubset> + ): Prisma__ClauseClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** - * Count the number of Chips. + * 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 {ChipCountArgs} args - Arguments to filter Chips to count. + * @param {ClauseCountArgs} args - Arguments to filter Clauses to count. * @example - * // Count the number of Chips - * const count = await prisma.chip.count({ + * // Count the number of Clauses + * const count = await prisma.clause.count({ * where: { - * // ... the filter for the Chips we want to count + * // ... the filter for the Clauses we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a Chip. + * 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 {ChipAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @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 @@ -2103,13 +1843,13 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by Chip. + * 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 {ChipGroupByArgs} args - Group by arguments. + * @param {ClauseGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -2124,14 +1864,14 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * **/ groupBy< - T extends ChipGroupByArgs, + T extends ClauseGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ChipGroupByArgs['orderBy'] } - : { orderBy?: ChipGroupByArgs['orderBy'] }, + ? { orderBy: ClauseGroupByArgs['orderBy'] } + : { orderBy?: ClauseGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends TupleToUnion, ByValid extends Has, @@ -2180,17 +1920,17 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChipGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetClauseGroupByPayload : Prisma.PrismaPromise } /** - * The delegate class that acts as a "Promise-like" for Chip. + * 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__ChipClient implements Prisma.PrismaPromise { + export class Prisma__ClauseClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -2234,23 +1974,23 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject // Custom InputTypes /** - * Chip base type for findUnique actions + * Clause base type for findUnique actions */ - export type ChipFindUniqueArgsBase = { + export type ClauseFindUniqueArgsBase = { /** - * Select specific fields to fetch from the Chip + * Select specific fields to fetch from the Clause */ - select?: ChipSelect | null + select?: ClauseSelect | null /** - * Filter, which Chip to fetch. + * Filter, which Clause to fetch. */ - where: ChipWhereUniqueInput + where: ClauseWhereUniqueInput } /** - * Chip findUnique + * Clause findUnique */ - export interface ChipFindUniqueArgs extends ChipFindUniqueArgsBase { + export interface ClauseFindUniqueArgs extends ClauseFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead @@ -2260,68 +2000,68 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject /** - * Chip findUniqueOrThrow + * Clause findUniqueOrThrow */ - export type ChipFindUniqueOrThrowArgs = { + export type ClauseFindUniqueOrThrowArgs = { /** - * Select specific fields to fetch from the Chip + * Select specific fields to fetch from the Clause */ - select?: ChipSelect | null + select?: ClauseSelect | null /** - * Filter, which Chip to fetch. + * Filter, which Clause to fetch. */ - where: ChipWhereUniqueInput + where: ClauseWhereUniqueInput } /** - * Chip base type for findFirst actions + * Clause base type for findFirst actions */ - export type ChipFindFirstArgsBase = { + export type ClauseFindFirstArgsBase = { /** - * Select specific fields to fetch from the Chip + * Select specific fields to fetch from the Clause */ - select?: ChipSelect | null + select?: ClauseSelect | null /** - * Filter, which Chip to fetch. + * Filter, which Clause to fetch. */ - where?: ChipWhereInput + where?: ClauseWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Chips to fetch. + * Determine the order of Clauses to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for Chips. + * Sets the position for searching for Clauses. */ - cursor?: ChipWhereUniqueInput + cursor?: ClauseWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Chips from the position of the cursor. + * 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` Chips. + * 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 Chips. + * Filter by unique combinations of Clauses. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * Chip findFirst + * Clause findFirst */ - export interface ChipFindFirstArgs extends ChipFindFirstArgsBase { + export interface ClauseFindFirstArgs extends ClauseFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findFirstOrThrow` method instead @@ -2331,527 +2071,518 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject /** - * Chip findFirstOrThrow + * Clause findFirstOrThrow */ - export type ChipFindFirstOrThrowArgs = { + export type ClauseFindFirstOrThrowArgs = { /** - * Select specific fields to fetch from the Chip + * Select specific fields to fetch from the Clause */ - select?: ChipSelect | null + select?: ClauseSelect | null /** - * Filter, which Chip to fetch. + * Filter, which Clause to fetch. */ - where?: ChipWhereInput + where?: ClauseWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Chips to fetch. + * Determine the order of Clauses to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for Chips. + * Sets the position for searching for Clauses. */ - cursor?: ChipWhereUniqueInput + cursor?: ClauseWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Chips from the position of the cursor. + * 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` Chips. + * 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 Chips. + * Filter by unique combinations of Clauses. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * Chip findMany + * Clause findMany */ - export type ChipFindManyArgs = { + export type ClauseFindManyArgs = { /** - * Select specific fields to fetch from the Chip + * Select specific fields to fetch from the Clause */ - select?: ChipSelect | null + select?: ClauseSelect | null /** - * Filter, which Chips to fetch. + * Filter, which Clauses to fetch. */ - where?: ChipWhereInput + where?: ClauseWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Chips to fetch. + * Determine the order of Clauses to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for listing Chips. + * Sets the position for listing Clauses. */ - cursor?: ChipWhereUniqueInput + cursor?: ClauseWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Chips from the position of the cursor. + * 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` Chips. + * Skip the first `n` Clauses. */ skip?: number - distinct?: Enumerable + distinct?: Enumerable } /** - * Chip create + * Clause create */ - export type ChipCreateArgs = { + export type ClauseCreateArgs = { /** - * Select specific fields to fetch from the Chip + * Select specific fields to fetch from the Clause */ - select?: ChipSelect | null + select?: ClauseSelect | null /** - * The data needed to create a Chip. + * The data needed to create a Clause. */ - data: XOR + data: XOR } /** - * Chip createMany + * Clause createMany */ - export type ChipCreateManyArgs = { + export type ClauseCreateManyArgs = { /** - * The data used to create many Chips. + * The data used to create many Clauses. */ - data: Enumerable + data: Enumerable skipDuplicates?: boolean } /** - * Chip update + * Clause update */ - export type ChipUpdateArgs = { + export type ClauseUpdateArgs = { /** - * Select specific fields to fetch from the Chip + * Select specific fields to fetch from the Clause */ - select?: ChipSelect | null + select?: ClauseSelect | null /** - * The data needed to update a Chip. + * The data needed to update a Clause. */ - data: XOR + data: XOR /** - * Choose, which Chip to update. + * Choose, which Clause to update. */ - where: ChipWhereUniqueInput + where: ClauseWhereUniqueInput } /** - * Chip updateMany + * Clause updateMany */ - export type ChipUpdateManyArgs = { + export type ClauseUpdateManyArgs = { /** - * The data used to update Chips. + * The data used to update Clauses. */ - data: XOR + data: XOR /** - * Filter which Chips to update + * Filter which Clauses to update */ - where?: ChipWhereInput + where?: ClauseWhereInput } /** - * Chip upsert + * Clause upsert */ - export type ChipUpsertArgs = { + export type ClauseUpsertArgs = { /** - * Select specific fields to fetch from the Chip + * Select specific fields to fetch from the Clause */ - select?: ChipSelect | null + select?: ClauseSelect | null /** - * The filter to search for the Chip to update in case it exists. + * The filter to search for the Clause to update in case it exists. */ - where: ChipWhereUniqueInput + where: ClauseWhereUniqueInput /** - * In case the Chip found by the `where` argument doesn't exist, create a new Chip with this data. + * In case the Clause found by the `where` argument doesn't exist, create a new Clause with this data. */ - create: XOR + create: XOR /** - * In case the Chip was found with the provided `where` argument, update it with this data. + * In case the Clause was found with the provided `where` argument, update it with this data. */ - update: XOR + update: XOR } /** - * Chip delete + * Clause delete */ - export type ChipDeleteArgs = { + export type ClauseDeleteArgs = { /** - * Select specific fields to fetch from the Chip + * Select specific fields to fetch from the Clause */ - select?: ChipSelect | null + select?: ClauseSelect | null /** - * Filter which Chip to delete. + * Filter which Clause to delete. */ - where: ChipWhereUniqueInput + where: ClauseWhereUniqueInput } /** - * Chip deleteMany + * Clause deleteMany */ - export type ChipDeleteManyArgs = { + export type ClauseDeleteManyArgs = { /** - * Filter which Chips to delete + * Filter which Clauses to delete */ - where?: ChipWhereInput + where?: ClauseWhereInput } /** - * Chip without action + * Clause without action */ - export type ChipArgs = { + export type ClauseArgs = { /** - * Select specific fields to fetch from the Chip + * Select specific fields to fetch from the Clause */ - select?: ChipSelect | null + select?: ClauseSelect | null } /** - * Model Clause + * Model Delegation */ - export type AggregateClause = { - _count: ClauseCountAggregateOutputType | null - _min: ClauseMinAggregateOutputType | null - _max: ClauseMaxAggregateOutputType | null + export type AggregateDelegation = { + _count: DelegationCountAggregateOutputType | null + _min: DelegationMinAggregateOutputType | null + _max: DelegationMaxAggregateOutputType | null } - export type ClauseMinAggregateOutputType = { - id: string | null - label: string | null - value: string | null + export type DelegationMinAggregateOutputType = { + createdBy: string | null + delegatedTo: string | null } - export type ClauseMaxAggregateOutputType = { - id: string | null - label: string | null - value: string | null + export type DelegationMaxAggregateOutputType = { + createdBy: string | null + delegatedTo: string | null } - export type ClauseCountAggregateOutputType = { - id: number - label: number - value: number + export type DelegationCountAggregateOutputType = { + createdBy: number + delegatedTo: number _all: number } - export type ClauseMinAggregateInputType = { - id?: true - label?: true - value?: true + export type DelegationMinAggregateInputType = { + createdBy?: true + delegatedTo?: true } - export type ClauseMaxAggregateInputType = { - id?: true - label?: true - value?: true + export type DelegationMaxAggregateInputType = { + createdBy?: true + delegatedTo?: true } - export type ClauseCountAggregateInputType = { - id?: true - label?: true - value?: true + export type DelegationCountAggregateInputType = { + createdBy?: true + delegatedTo?: true _all?: true } - export type ClauseAggregateArgs = { + export type DelegationAggregateArgs = { /** - * Filter which Clause to aggregate. + * Filter which Delegation to aggregate. */ - where?: ClauseWhereInput + where?: DelegationWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Clauses to fetch. + * Determine the order of Delegations to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ - cursor?: ClauseWhereUniqueInput + cursor?: DelegationWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Clauses from the position of the cursor. + * 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` Clauses. + * Skip the first `n` Delegations. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * - * Count returned Clauses + * Count returned Delegations **/ - _count?: true | ClauseCountAggregateInputType + _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?: ClauseMinAggregateInputType + _min?: DelegationMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ - _max?: ClauseMaxAggregateInputType + _max?: DelegationMaxAggregateInputType } - export type GetClauseAggregateType = { - [P in keyof T & keyof AggregateClause]: P extends '_count' | 'count' + export type GetDelegationAggregateType = { + [P in keyof T & keyof AggregateDelegation]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type ClauseGroupByArgs = { - where?: ClauseWhereInput - orderBy?: Enumerable - by: ClauseScalarFieldEnum[] - having?: ClauseScalarWhereWithAggregatesInput + export type DelegationGroupByArgs = { + where?: DelegationWhereInput + orderBy?: Enumerable + by: DelegationScalarFieldEnum[] + having?: DelegationScalarWhereWithAggregatesInput take?: number skip?: number - _count?: ClauseCountAggregateInputType | true - _min?: ClauseMinAggregateInputType - _max?: ClauseMaxAggregateInputType + _count?: DelegationCountAggregateInputType | true + _min?: DelegationMinAggregateInputType + _max?: DelegationMaxAggregateInputType } - export type ClauseGroupByOutputType = { - id: string - label: string - value: string - _count: ClauseCountAggregateOutputType | null - _min: ClauseMinAggregateOutputType | null - _max: ClauseMaxAggregateOutputType | null + export type DelegationGroupByOutputType = { + createdBy: string + delegatedTo: string + _count: DelegationCountAggregateOutputType | null + _min: DelegationMinAggregateOutputType | null + _max: DelegationMaxAggregateOutputType | null } - type GetClauseGroupByPayload = Prisma.PrismaPromise< + type GetDelegationGroupByPayload = Prisma.PrismaPromise< Array< - PickArray & + PickArray & { - [P in ((keyof T) & (keyof ClauseGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof DelegationGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type ClauseSelect = $Extensions.GetSelect<{ - id?: boolean - label?: boolean - value?: boolean - report_to_clause?: boolean | Clause$report_to_clauseArgs - _count?: boolean | ClauseCountOutputTypeArgs - }, ExtArgs["result"]["clause"]> + export type DelegationSelect = $Extensions.GetSelect<{ + createdBy?: boolean + delegatedTo?: boolean + user_delegation_createdByTouser?: boolean | UserArgs + user_delegation_delegatedToTouser?: boolean | UserArgs + }, ExtArgs["result"]["delegation"]> - export type ClauseSelectScalar = { - id?: boolean - label?: boolean - value?: boolean + export type DelegationSelectScalar = { + createdBy?: boolean + delegatedTo?: boolean } - export type ClauseInclude = { - report_to_clause?: boolean | Clause$report_to_clauseArgs - _count?: boolean | ClauseCountOutputTypeArgs + export type DelegationInclude = { + user_delegation_createdByTouser?: boolean | UserArgs + user_delegation_delegatedToTouser?: boolean | UserArgs } - type ClauseGetPayload = $Types.GetResult + type DelegationGetPayload = $Types.GetResult - type ClauseCountArgs = - Omit & { - select?: ClauseCountAggregateInputType | true + type DelegationCountArgs = + Omit & { + select?: DelegationCountAggregateInputType | true } - export interface ClauseDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Clause'], meta: { name: 'Clause' } } + export interface DelegationDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Delegation'], meta: { name: 'Delegation' } } /** - * Find zero or one Clause that matches the filter. - * @param {ClauseFindUniqueArgs} args - Arguments to find a Clause + * Find zero or one Delegation that matches the filter. + * @param {DelegationFindUniqueArgs} args - Arguments to find a Delegation * @example - * // Get one Clause - * const clause = await prisma.clause.findUnique({ + * // 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__ClauseClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__ClauseClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + 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 Clause that matches the filter or throw an error with `error.code='P2025'` + * Find one Delegation 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 + * @param {DelegationFindUniqueOrThrowArgs} args - Arguments to find a Delegation * @example - * // Get one Clause - * const clause = await prisma.clause.findUniqueOrThrow({ + * // Get one Delegation + * const delegation = await prisma.delegation.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__ClauseClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__DelegationClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** - * Find the first Clause that matches the filter. + * 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 {ClauseFindFirstArgs} args - Arguments to find a Clause + * @param {DelegationFindFirstArgs} args - Arguments to find a Delegation * @example - * // Get one Clause - * const clause = await prisma.clause.findFirst({ + * // 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__ClauseClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__ClauseClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + 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 Clause that matches the filter or + * 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 {ClauseFindFirstOrThrowArgs} args - Arguments to find a Clause + * @param {DelegationFindFirstOrThrowArgs} args - Arguments to find a Delegation * @example - * // Get one Clause - * const clause = await prisma.clause.findFirstOrThrow({ + * // Get one Delegation + * const delegation = await prisma.delegation.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__ClauseClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__DelegationClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** - * Find zero or more Clauses that matches the filter. + * 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 {ClauseFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {DelegationFindManyArgs=} args - Arguments to filter and select certain fields only. * @example - * // Get all Clauses - * const clauses = await prisma.clause.findMany() + * // Get all Delegations + * const delegations = await prisma.delegation.findMany() * - * // Get first 10 Clauses - * const clauses = await prisma.clause.findMany({ take: 10 }) + * // Get first 10 Delegations + * const delegations = await prisma.delegation.findMany({ take: 10 }) * - * // Only select the `id` - * const clauseWithIdOnly = await prisma.clause.findMany({ select: { id: true } }) + * // Only select the `createdBy` + * const delegationWithCreatedByOnly = await prisma.delegation.findMany({ select: { createdBy: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** - * Create a Clause. - * @param {ClauseCreateArgs} args - Arguments to create a Clause. + * Create a Delegation. + * @param {DelegationCreateArgs} args - Arguments to create a Delegation. * @example - * // Create one Clause - * const Clause = await prisma.clause.create({ + * // Create one Delegation + * const Delegation = await prisma.delegation.create({ * data: { - * // ... data to create a Clause + * // ... data to create a Delegation * } * }) * **/ - create>( - args: SelectSubset> - ): Prisma__ClauseClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create>( + args: SelectSubset> + ): Prisma__DelegationClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** - * Create many Clauses. - * @param {ClauseCreateManyArgs} args - Arguments to create many Clauses. + * Create many Delegations. + * @param {DelegationCreateManyArgs} args - Arguments to create many Delegations. * @example - * // Create many Clauses - * const clause = await prisma.clause.createMany({ + * // Create many Delegations + * const delegation = await prisma.delegation.createMany({ * data: { * // ... provide data here * } * }) * **/ - createMany>( - args?: SelectSubset> + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Delete a Clause. - * @param {ClauseDeleteArgs} args - Arguments to delete one Clause. + * Delete a Delegation. + * @param {DelegationDeleteArgs} args - Arguments to delete one Delegation. * @example - * // Delete one Clause - * const Clause = await prisma.clause.delete({ + * // Delete one Delegation + * const Delegation = await prisma.delegation.delete({ * where: { - * // ... filter to delete one Clause + * // ... filter to delete one Delegation * } * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__ClauseClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete>( + args: SelectSubset> + ): Prisma__DelegationClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** - * Update one Clause. - * @param {ClauseUpdateArgs} args - Arguments to update one Clause. + * Update one Delegation. + * @param {DelegationUpdateArgs} args - Arguments to update one Delegation. * @example - * // Update one Clause - * const clause = await prisma.clause.update({ + * // Update one Delegation + * const delegation = await prisma.delegation.update({ * where: { * // ... provide filter here * }, @@ -2861,34 +2592,34 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * }) * **/ - update>( - args: SelectSubset> - ): Prisma__ClauseClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update>( + args: SelectSubset> + ): Prisma__DelegationClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** - * Delete zero or more Clauses. - * @param {ClauseDeleteManyArgs} args - Arguments to filter Clauses to delete. + * Delete zero or more Delegations. + * @param {DelegationDeleteManyArgs} args - Arguments to filter Delegations to delete. * @example - * // Delete a few Clauses - * const { count } = await prisma.clause.deleteMany({ + * // Delete a few Delegations + * const { count } = await prisma.delegation.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Update zero or more Clauses. + * 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 {ClauseUpdateManyArgs} args - Arguments to update one or more rows. + * @param {DelegationUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many Clauses - * const clause = await prisma.clause.updateMany({ + * // Update many Delegations + * const delegation = await prisma.delegation.updateMany({ * where: { * // ... provide filter here * }, @@ -2898,59 +2629,59 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * }) * **/ - updateMany>( - args: SelectSubset> + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** - * Create or update one Clause. - * @param {ClauseUpsertArgs} args - Arguments to update or create a Clause. + * Create or update one Delegation. + * @param {DelegationUpsertArgs} args - Arguments to update or create a Delegation. * @example - * // Update or create a Clause - * const clause = await prisma.clause.upsert({ + * // Update or create a Delegation + * const delegation = await prisma.delegation.upsert({ * create: { - * // ... data to create a Clause + * // ... data to create a Delegation * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the Clause we want to update + * // ... the filter for the Delegation we want to update * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__ClauseClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert>( + args: SelectSubset> + ): Prisma__DelegationClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** - * Count the number of Clauses. + * 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 {ClauseCountArgs} args - Arguments to filter Clauses to count. + * @param {DelegationCountArgs} args - Arguments to filter Delegations to count. * @example - * // Count the number of Clauses - * const count = await prisma.clause.count({ + * // Count the number of Delegations + * const count = await prisma.delegation.count({ * where: { - * // ... the filter for the Clauses we want to count + * // ... the filter for the Delegations we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a Clause. + * 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 {ClauseAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @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 @@ -2970,13 +2701,13 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by Clause. + * 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 {ClauseGroupByArgs} args - Group by arguments. + * @param {DelegationGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -2991,14 +2722,14 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * **/ groupBy< - T extends ClauseGroupByArgs, + T extends DelegationGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ClauseGroupByArgs['orderBy'] } - : { orderBy?: ClauseGroupByArgs['orderBy'] }, + ? { orderBy: DelegationGroupByArgs['orderBy'] } + : { orderBy?: DelegationGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends TupleToUnion, ByValid extends Has, @@ -3047,17 +2778,17 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetClauseGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetDelegationGroupByPayload : Prisma.PrismaPromise } /** - * The delegate class that acts as a "Promise-like" for Clause. + * 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__ClauseClient implements Prisma.PrismaPromise { + export class Prisma__DelegationClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -3072,7 +2803,9 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - report_to_clause = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; + 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(); /** @@ -3102,27 +2835,27 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject // Custom InputTypes /** - * Clause base type for findUnique actions + * Delegation base type for findUnique actions */ - export type ClauseFindUniqueArgsBase = { + export type DelegationFindUniqueArgsBase = { /** - * Select specific fields to fetch from the Clause + * Select specific fields to fetch from the Delegation */ - select?: ClauseSelect | null + select?: DelegationSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ClauseInclude | null + include?: DelegationInclude | null /** - * Filter, which Clause to fetch. + * Filter, which Delegation to fetch. */ - where: ClauseWhereUniqueInput + where: DelegationWhereUniqueInput } /** - * Clause findUnique + * Delegation findUnique */ - export interface ClauseFindUniqueArgs extends ClauseFindUniqueArgsBase { + export interface DelegationFindUniqueArgs extends DelegationFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead @@ -3132,76 +2865,76 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject /** - * Clause findUniqueOrThrow + * Delegation findUniqueOrThrow */ - export type ClauseFindUniqueOrThrowArgs = { + export type DelegationFindUniqueOrThrowArgs = { /** - * Select specific fields to fetch from the Clause + * Select specific fields to fetch from the Delegation */ - select?: ClauseSelect | null + select?: DelegationSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ClauseInclude | null + include?: DelegationInclude | null /** - * Filter, which Clause to fetch. + * Filter, which Delegation to fetch. */ - where: ClauseWhereUniqueInput + where: DelegationWhereUniqueInput } /** - * Clause base type for findFirst actions + * Delegation base type for findFirst actions */ - export type ClauseFindFirstArgsBase = { + export type DelegationFindFirstArgsBase = { /** - * Select specific fields to fetch from the Clause + * Select specific fields to fetch from the Delegation */ - select?: ClauseSelect | null + select?: DelegationSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ClauseInclude | null + include?: DelegationInclude | null /** - * Filter, which Clause to fetch. + * Filter, which Delegation to fetch. */ - where?: ClauseWhereInput + where?: DelegationWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Clauses to fetch. + * Determine the order of Delegations to fetch. */ - orderBy?: Enumerable + 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. + * Sets the position for searching for Delegations. */ - cursor?: ClauseWhereUniqueInput + cursor?: DelegationWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Clauses from the position of the cursor. + * 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` Clauses. + * 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 Clauses. + * Filter by unique combinations of Delegations. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * Clause findFirst + * Delegation findFirst */ - export interface ClauseFindFirstArgs extends ClauseFindFirstArgsBase { + export interface DelegationFindFirstArgs extends DelegationFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findFirstOrThrow` method instead @@ -3211,2588 +2944,731 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject /** - * Clause findFirstOrThrow + * Delegation findFirstOrThrow */ - export type ClauseFindFirstOrThrowArgs = { + export type DelegationFindFirstOrThrowArgs = { /** - * Select specific fields to fetch from the Clause + * Select specific fields to fetch from the Delegation */ - select?: ClauseSelect | null + select?: DelegationSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ClauseInclude | null + include?: DelegationInclude | null /** - * Filter, which Clause to fetch. + * Filter, which Delegation to fetch. */ - where?: ClauseWhereInput + where?: DelegationWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Clauses to fetch. + * Determine the order of Delegations to fetch. */ - orderBy?: Enumerable + 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. + * Sets the position for searching for Delegations. */ - cursor?: ClauseWhereUniqueInput + cursor?: DelegationWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Clauses from the position of the cursor. + * 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` Clauses. + * 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 Clauses. + * Filter by unique combinations of Delegations. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * Clause findMany + * Delegation findMany */ - export type ClauseFindManyArgs = { + export type DelegationFindManyArgs = { /** - * Select specific fields to fetch from the Clause + * Select specific fields to fetch from the Delegation */ - select?: ClauseSelect | null + select?: DelegationSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ClauseInclude | null + include?: DelegationInclude | null /** - * Filter, which Clauses to fetch. + * Filter, which Delegations to fetch. */ - where?: ClauseWhereInput + where?: DelegationWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Clauses to fetch. + * Determine the order of Delegations to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for listing Clauses. + * Sets the position for listing Delegations. */ - cursor?: ClauseWhereUniqueInput + cursor?: DelegationWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Clauses from the position of the cursor. + * 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` Clauses. + * Skip the first `n` Delegations. */ skip?: number - distinct?: Enumerable + distinct?: Enumerable } /** - * Clause create + * Delegation create */ - export type ClauseCreateArgs = { + export type DelegationCreateArgs = { /** - * Select specific fields to fetch from the Clause + * Select specific fields to fetch from the Delegation */ - select?: ClauseSelect | null + select?: DelegationSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ClauseInclude | null + include?: DelegationInclude | null /** - * The data needed to create a Clause. + * The data needed to create a Delegation. */ - data: XOR + data: XOR } /** - * Clause createMany + * Delegation createMany */ - export type ClauseCreateManyArgs = { + export type DelegationCreateManyArgs = { /** - * The data used to create many Clauses. + * The data used to create many Delegations. */ - data: Enumerable + data: Enumerable skipDuplicates?: boolean } /** - * Clause update + * Delegation update */ - export type ClauseUpdateArgs = { + export type DelegationUpdateArgs = { /** - * Select specific fields to fetch from the Clause + * Select specific fields to fetch from the Delegation */ - select?: ClauseSelect | null + select?: DelegationSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ClauseInclude | null + include?: DelegationInclude | null /** - * The data needed to update a Clause. + * The data needed to update a Delegation. */ - data: XOR + data: XOR /** - * Choose, which Clause to update. + * Choose, which Delegation to update. */ - where: ClauseWhereUniqueInput + where: DelegationWhereUniqueInput } /** - * Clause updateMany + * Delegation updateMany */ - export type ClauseUpdateManyArgs = { + export type DelegationUpdateManyArgs = { /** - * The data used to update Clauses. + * The data used to update Delegations. */ - data: XOR + data: XOR /** - * Filter which Clauses to update + * Filter which Delegations to update */ - where?: ClauseWhereInput + where?: DelegationWhereInput } /** - * Clause upsert + * Delegation upsert */ - export type ClauseUpsertArgs = { + export type DelegationUpsertArgs = { /** - * Select specific fields to fetch from the Clause + * Select specific fields to fetch from the Delegation */ - select?: ClauseSelect | null + select?: DelegationSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ClauseInclude | null + include?: DelegationInclude | null /** - * The filter to search for the Clause to update in case it exists. + * The filter to search for the Delegation to update in case it exists. */ - where: ClauseWhereUniqueInput + where: DelegationWhereUniqueInput /** - * In case the Clause found by the `where` argument doesn't exist, create a new Clause with this data. + * In case the Delegation found by the `where` argument doesn't exist, create a new Delegation with this data. */ - create: XOR + create: XOR /** - * In case the Clause was found with the provided `where` argument, update it with this data. + * In case the Delegation was found with the provided `where` argument, update it with this data. */ - update: XOR + update: XOR } /** - * Clause delete + * Delegation delete */ - export type ClauseDeleteArgs = { + export type DelegationDeleteArgs = { /** - * Select specific fields to fetch from the Clause + * Select specific fields to fetch from the Delegation */ - select?: ClauseSelect | null + select?: DelegationSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ClauseInclude | null - /** - * Filter which Clause to delete. - */ - where: ClauseWhereUniqueInput - } - - - /** - * Clause deleteMany - */ - export type ClauseDeleteManyArgs = { + include?: DelegationInclude | null /** - * Filter which Clauses to delete + * Filter which Delegation to delete. */ - where?: ClauseWhereInput + where: DelegationWhereUniqueInput } /** - * Clause.report_to_clause + * Delegation deleteMany */ - export type Clause$report_to_clauseArgs = { - /** - * Select specific fields to fetch from the Report_to_clause - */ - select?: Report_to_clauseSelect | null + export type DelegationDeleteManyArgs = { /** - * Choose, which related nodes to fetch as well. + * Filter which Delegations to delete */ - include?: Report_to_clauseInclude | null - where?: Report_to_clauseWhereInput - orderBy?: Enumerable - cursor?: Report_to_clauseWhereUniqueInput - take?: number - skip?: number - distinct?: Enumerable + where?: DelegationWhereInput } /** - * Clause without action + * Delegation without action */ - export type ClauseArgs = { + export type DelegationArgs = { /** - * Select specific fields to fetch from the Clause + * Select specific fields to fetch from the Delegation */ - select?: ClauseSelect | null + select?: DelegationSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: ClauseInclude | null + include?: DelegationInclude | null } /** - * Model Delegation + * Model Report */ - 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 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 - } - - 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 - } - - 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 - _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 - } - - 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 - } - - 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 - _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 - _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 - user?: boolean | UserArgs - report_to_clause?: boolean | Report$report_to_clauseArgs - _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 - } - - export type ReportInclude = { - user?: boolean | UserArgs - report_to_clause?: boolean | Report$report_to_clauseArgs - _count?: boolean | ReportCountOutputTypeArgs - } - - - type ReportGetPayload = $Types.GetResult - - type ReportCountArgs = - Omit & { - select?: ReportCountAggregateInputType | true - } - - export interface ReportDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Report'], meta: { name: 'Report' } } - /** - * Find zero or one Report that matches the filter. - * @param {ReportFindUniqueArgs} args - Arguments to find a Report - * @example - * // Get one Report - * const report = await prisma.report.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__ReportClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__ReportClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one Report that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ReportFindUniqueOrThrowArgs} args - Arguments to find a Report - * @example - * // Get one Report - * const report = await prisma.report.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__ReportClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first Report that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ReportFindFirstArgs} args - Arguments to find a Report - * @example - * // Get one Report - * const report = await prisma.report.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__ReportClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__ReportClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first Report that matches the filter or - * throw `NotFoundError` if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ReportFindFirstOrThrowArgs} args - Arguments to find a Report - * @example - * // Get one Report - * const report = await prisma.report.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__ReportClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Reports that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ReportFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Reports - * const reports = await prisma.report.findMany() - * - * // Get first 10 Reports - * const reports = await prisma.report.findMany({ take: 10 }) - * - * // Only select the `id` - * const reportWithIdOnly = await prisma.report.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a Report. - * @param {ReportCreateArgs} args - Arguments to create a Report. - * @example - * // Create one Report - * const Report = await prisma.report.create({ - * data: { - * // ... data to create a Report - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__ReportClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Reports. - * @param {ReportCreateManyArgs} args - Arguments to create many Reports. - * @example - * // Create many Reports - * const report = await prisma.report.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a Report. - * @param {ReportDeleteArgs} args - Arguments to delete one Report. - * @example - * // Delete one Report - * const Report = await prisma.report.delete({ - * where: { - * // ... filter to delete one Report - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__ReportClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one Report. - * @param {ReportUpdateArgs} args - Arguments to update one Report. - * @example - * // Update one Report - * const report = await prisma.report.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__ReportClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Reports. - * @param {ReportDeleteManyArgs} args - Arguments to filter Reports to delete. - * @example - * // Delete a few Reports - * const { count } = await prisma.report.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Reports. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ReportUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Reports - * const report = await prisma.report.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Report. - * @param {ReportUpsertArgs} args - Arguments to update or create a Report. - * @example - * // Update or create a Report - * const report = await prisma.report.upsert({ - * create: { - * // ... data to create a Report - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Report we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__ReportClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Reports. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ReportCountArgs} args - Arguments to filter Reports to count. - * @example - * // Count the number of Reports - * const count = await prisma.report.count({ - * where: { - * // ... the filter for the Reports we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Report. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ReportAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Report. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ReportGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ReportGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ReportGroupByArgs['orderBy'] } - : { orderBy?: ReportGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetReportGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Report. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export class Prisma__ReportClient implements Prisma.PrismaPromise { - private readonly _dmmf; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - readonly [Symbol.toStringTag]: 'PrismaPromise'; - constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - - user = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; - - report_to_clause = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; - - private get _document(); - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; - } - - - - // Custom InputTypes - - /** - * Report base type for findUnique actions - */ - export type ReportFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Report - */ - select?: ReportSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: ReportInclude | null - /** - * Filter, which Report to fetch. - */ - where: ReportWhereUniqueInput - } - - /** - * Report findUnique - */ - export interface ReportFindUniqueArgs extends ReportFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Report findUniqueOrThrow - */ - export type ReportFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Report - */ - select?: ReportSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: ReportInclude | null - /** - * Filter, which Report to fetch. - */ - where: ReportWhereUniqueInput - } - - - /** - * Report base type for findFirst actions - */ - export type ReportFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Report - */ - select?: ReportSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: ReportInclude | null - /** - * Filter, which Report to fetch. - */ - where?: ReportWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Reports to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Reports. - */ - cursor?: ReportWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Reports from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Reports. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Reports. - */ - distinct?: Enumerable - } - - /** - * Report findFirst - */ - export interface ReportFindFirstArgs extends ReportFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Report findFirstOrThrow - */ - export type ReportFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Report - */ - select?: ReportSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: ReportInclude | null - /** - * Filter, which Report to fetch. - */ - where?: ReportWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Reports to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Reports. - */ - cursor?: ReportWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Reports from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Reports. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Reports. - */ - distinct?: Enumerable - } - - - /** - * Report findMany - */ - export type ReportFindManyArgs = { - /** - * Select specific fields to fetch from the Report - */ - select?: ReportSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: ReportInclude | null - /** - * Filter, which Reports to fetch. - */ - where?: ReportWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Reports to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Reports. - */ - cursor?: ReportWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Reports from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Reports. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * Report create - */ - export type ReportCreateArgs = { - /** - * Select specific fields to fetch from the Report - */ - select?: ReportSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: ReportInclude | null - /** - * The data needed to create a Report. - */ - data: XOR - } - - - /** - * Report createMany - */ - export type ReportCreateManyArgs = { - /** - * The data used to create many Reports. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * Report update - */ - export type ReportUpdateArgs = { - /** - * Select specific fields to fetch from the Report - */ - select?: ReportSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: ReportInclude | null - /** - * The data needed to update a Report. - */ - data: XOR - /** - * Choose, which Report to update. - */ - where: ReportWhereUniqueInput - } - - - /** - * Report updateMany - */ - export type ReportUpdateManyArgs = { - /** - * The data used to update Reports. - */ - data: XOR - /** - * Filter which Reports to update - */ - where?: ReportWhereInput - } - - - /** - * Report upsert - */ - export type ReportUpsertArgs = { - /** - * Select specific fields to fetch from the Report - */ - select?: ReportSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: ReportInclude | null - /** - * The filter to search for the Report to update in case it exists. - */ - where: ReportWhereUniqueInput - /** - * In case the Report found by the `where` argument doesn't exist, create a new Report with this data. - */ - create: XOR - /** - * In case the Report was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * Report delete - */ - export type ReportDeleteArgs = { - /** - * Select specific fields to fetch from the Report - */ - select?: ReportSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: ReportInclude | null - /** - * Filter which Report to delete. - */ - where: ReportWhereUniqueInput - } - - - /** - * Report deleteMany - */ - export type ReportDeleteManyArgs = { - /** - * Filter which Reports to delete - */ - where?: ReportWhereInput + export type AggregateReport = { + _count: ReportCountAggregateOutputType | null + _avg: ReportAvgAggregateOutputType | null + _sum: ReportSumAggregateOutputType | null + _min: ReportMinAggregateOutputType | null + _max: ReportMaxAggregateOutputType | null } - - /** - * Report.report_to_clause - */ - export type Report$report_to_clauseArgs = { - /** - * Select specific fields to fetch from the Report_to_clause - */ - select?: Report_to_clauseSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: Report_to_clauseInclude | null - where?: Report_to_clauseWhereInput - orderBy?: Enumerable - cursor?: Report_to_clauseWhereUniqueInput - take?: number - skip?: number - distinct?: Enumerable + export type ReportAvgAggregateOutputType = { + serviceInstructeur: number | null } - - /** - * 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 + export type ReportSumAggregateOutputType = { + serviceInstructeur: number | null } - - - /** - * Model Report_to_clause - */ - - - export type AggregateReport_to_clause = { - _count: Report_to_clauseCountAggregateOutputType | null - _min: Report_to_clauseMinAggregateOutputType | null - _max: Report_to_clauseMaxAggregateOutputType | null + export type 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 } - export type Report_to_clauseMinAggregateOutputType = { + export type ReportMaxAggregateOutputType = { id: string | null - reportId: string | null - clauseId: 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 } - export type Report_to_clauseMaxAggregateOutputType = { - id: string | null - reportId: string | null - clauseId: 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 + _all: number } - export type Report_to_clauseCountAggregateOutputType = { - id: number - reportId: number - clauseId: number - _all: number + + export type ReportAvgAggregateInputType = { + serviceInstructeur?: true } + export type ReportSumAggregateInputType = { + serviceInstructeur?: true + } - export type Report_to_clauseMinAggregateInputType = { + export type ReportMinAggregateInputType = { id?: true - reportId?: true - clauseId?: 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 } - export type Report_to_clauseMaxAggregateInputType = { + export type ReportMaxAggregateInputType = { id?: true - reportId?: true - clauseId?: 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 } - export type Report_to_clauseCountAggregateInputType = { + export type ReportCountAggregateInputType = { id?: true - reportId?: true - clauseId?: 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 _all?: true } - export type Report_to_clauseAggregateArgs = { + export type ReportAggregateArgs = { /** - * Filter which Report_to_clause to aggregate. + * Filter which Report to aggregate. */ - where?: Report_to_clauseWhereInput + where?: ReportWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Report_to_clauses to fetch. + * Determine the order of Reports to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ - cursor?: Report_to_clauseWhereUniqueInput + cursor?: ReportWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Report_to_clauses from the position of the cursor. + * Take `±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` Report_to_clauses. + * Skip the first `n` Reports. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * - * Count returned Report_to_clauses + * 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 **/ - _count?: true | Report_to_clauseCountAggregateInputType + _sum?: ReportSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ - _min?: Report_to_clauseMinAggregateInputType + _min?: ReportMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ - _max?: Report_to_clauseMaxAggregateInputType + _max?: ReportMaxAggregateInputType } - export type GetReport_to_clauseAggregateType = { - [P in keyof T & keyof AggregateReport_to_clause]: P extends '_count' | 'count' + export type GetReportAggregateType = { + [P in keyof T & keyof AggregateReport]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type Report_to_clauseGroupByArgs = { - where?: Report_to_clauseWhereInput - orderBy?: Enumerable - by: Report_to_clauseScalarFieldEnum[] - having?: Report_to_clauseScalarWhereWithAggregatesInput + export type ReportGroupByArgs = { + where?: ReportWhereInput + orderBy?: Enumerable + by: ReportScalarFieldEnum[] + having?: ReportScalarWhereWithAggregatesInput take?: number skip?: number - _count?: Report_to_clauseCountAggregateInputType | true - _min?: Report_to_clauseMinAggregateInputType - _max?: Report_to_clauseMaxAggregateInputType + _count?: ReportCountAggregateInputType | true + _avg?: ReportAvgAggregateInputType + _sum?: ReportSumAggregateInputType + _min?: ReportMinAggregateInputType + _max?: ReportMaxAggregateInputType } - export type Report_to_clauseGroupByOutputType = { + export type ReportGroupByOutputType = { id: string - reportId: string - clauseId: string - _count: Report_to_clauseCountAggregateOutputType | null - _min: Report_to_clauseMinAggregateOutputType | null - _max: Report_to_clauseMaxAggregateOutputType | 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 + createdAt: Date + serviceInstructeur: number | null + pdf: string | null + disabled: boolean | null + udap_id: string | null + _count: ReportCountAggregateOutputType | null + _avg: ReportAvgAggregateOutputType | null + _sum: ReportSumAggregateOutputType | null + _min: ReportMinAggregateOutputType | null + _max: ReportMaxAggregateOutputType | null } - type GetReport_to_clauseGroupByPayload = Prisma.PrismaPromise< + type GetReportGroupByPayload = Prisma.PrismaPromise< Array< - PickArray & + PickArray & { - [P in ((keyof T) & (keyof Report_to_clauseGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof ReportGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type Report_to_clauseSelect = $Extensions.GetSelect<{ + export type ReportSelect = $Extensions.GetSelect<{ id?: boolean - reportId?: boolean - clauseId?: boolean - clause?: boolean | ClauseArgs - report?: boolean | ReportArgs - }, ExtArgs["result"]["report_to_clause"]> + 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 + user?: boolean | UserArgs + }, ExtArgs["result"]["report"]> - export type Report_to_clauseSelectScalar = { + export type ReportSelectScalar = { id?: boolean - reportId?: boolean - clauseId?: 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 } - export type Report_to_clauseInclude = { - clause?: boolean | ClauseArgs - report?: boolean | ReportArgs + export type ReportInclude = { + user?: boolean | UserArgs } - type Report_to_clauseGetPayload = $Types.GetResult + type ReportGetPayload = $Types.GetResult - type Report_to_clauseCountArgs = - Omit & { - select?: Report_to_clauseCountAggregateInputType | true + type ReportCountArgs = + Omit & { + select?: ReportCountAggregateInputType | true } - export interface Report_to_clauseDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Report_to_clause'], meta: { name: 'Report_to_clause' } } + export interface ReportDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Report'], meta: { name: 'Report' } } /** - * Find zero or one Report_to_clause that matches the filter. - * @param {Report_to_clauseFindUniqueArgs} args - Arguments to find a Report_to_clause + * Find zero or one Report that matches the filter. + * @param {ReportFindUniqueArgs} args - Arguments to find a Report * @example - * // Get one Report_to_clause - * const report_to_clause = await prisma.report_to_clause.findUnique({ + * // 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__Report_to_clauseClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__Report_to_clauseClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + 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_to_clause that matches the filter or throw an error with `error.code='P2025'` + * Find one Report that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. - * @param {Report_to_clauseFindUniqueOrThrowArgs} args - Arguments to find a Report_to_clause + * @param {ReportFindUniqueOrThrowArgs} args - Arguments to find a Report * @example - * // Get one Report_to_clause - * const report_to_clause = await prisma.report_to_clause.findUniqueOrThrow({ + * // Get one Report + * const report = await prisma.report.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** - * Find the first Report_to_clause that matches the filter. + * 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 {Report_to_clauseFindFirstArgs} args - Arguments to find a Report_to_clause + * @param {ReportFindFirstArgs} args - Arguments to find a Report * @example - * // Get one Report_to_clause - * const report_to_clause = await prisma.report_to_clause.findFirst({ + * // 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__Report_to_clauseClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__Report_to_clauseClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + 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_to_clause that matches the filter or + * 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 {Report_to_clauseFindFirstOrThrowArgs} args - Arguments to find a Report_to_clause + * @param {ReportFindFirstOrThrowArgs} args - Arguments to find a Report * @example - * // Get one Report_to_clause - * const report_to_clause = await prisma.report_to_clause.findFirstOrThrow({ + * // Get one Report + * const report = await prisma.report.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** - * Find zero or more Report_to_clauses that matches the filter. + * 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 {Report_to_clauseFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {ReportFindManyArgs=} args - Arguments to filter and select certain fields only. * @example - * // Get all Report_to_clauses - * const report_to_clauses = await prisma.report_to_clause.findMany() + * // Get all Reports + * const reports = await prisma.report.findMany() * - * // Get first 10 Report_to_clauses - * const report_to_clauses = await prisma.report_to_clause.findMany({ take: 10 }) + * // Get first 10 Reports + * const reports = await prisma.report.findMany({ take: 10 }) * * // Only select the `id` - * const report_to_clauseWithIdOnly = await prisma.report_to_clause.findMany({ select: { id: true } }) + * const reportWithIdOnly = await prisma.report.findMany({ select: { id: true } }) * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** - * Create a Report_to_clause. - * @param {Report_to_clauseCreateArgs} args - Arguments to create a Report_to_clause. + * Create a Report. + * @param {ReportCreateArgs} args - Arguments to create a Report. * @example - * // Create one Report_to_clause - * const Report_to_clause = await prisma.report_to_clause.create({ + * // Create one Report + * const Report = await prisma.report.create({ * data: { - * // ... data to create a Report_to_clause + * // ... data to create a Report * } * }) * **/ - create>( - args: SelectSubset> - ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create>( + args: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** - * Create many Report_to_clauses. - * @param {Report_to_clauseCreateManyArgs} args - Arguments to create many Report_to_clauses. + * Create many Reports. + * @param {ReportCreateManyArgs} args - Arguments to create many Reports. * @example - * // Create many Report_to_clauses - * const report_to_clause = await prisma.report_to_clause.createMany({ + * // Create many Reports + * const report = await prisma.report.createMany({ * data: { * // ... provide data here * } * }) * **/ - createMany>( - args?: SelectSubset> + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Delete a Report_to_clause. - * @param {Report_to_clauseDeleteArgs} args - Arguments to delete one Report_to_clause. + * Delete a Report. + * @param {ReportDeleteArgs} args - Arguments to delete one Report. * @example - * // Delete one Report_to_clause - * const Report_to_clause = await prisma.report_to_clause.delete({ + * // Delete one Report + * const Report = await prisma.report.delete({ * where: { - * // ... filter to delete one Report_to_clause + * // ... filter to delete one Report * } * }) * **/ - delete>( - args: SelectSubset> - ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete>( + args: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** - * Update one Report_to_clause. - * @param {Report_to_clauseUpdateArgs} args - Arguments to update one Report_to_clause. + * Update one Report. + * @param {ReportUpdateArgs} args - Arguments to update one Report. * @example - * // Update one Report_to_clause - * const report_to_clause = await prisma.report_to_clause.update({ + * // Update one Report + * const report = await prisma.report.update({ * where: { * // ... provide filter here * }, @@ -5802,34 +3678,34 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * }) * **/ - update>( - args: SelectSubset> - ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update>( + args: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** - * Delete zero or more Report_to_clauses. - * @param {Report_to_clauseDeleteManyArgs} args - Arguments to filter Report_to_clauses to delete. + * Delete zero or more Reports. + * @param {ReportDeleteManyArgs} args - Arguments to filter Reports to delete. * @example - * // Delete a few Report_to_clauses - * const { count } = await prisma.report_to_clause.deleteMany({ + * // Delete a few Reports + * const { count } = await prisma.report.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ - deleteMany>( - args?: SelectSubset> + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Update zero or more Report_to_clauses. + * 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 {Report_to_clauseUpdateManyArgs} args - Arguments to update one or more rows. + * @param {ReportUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many Report_to_clauses - * const report_to_clause = await prisma.report_to_clause.updateMany({ + * // Update many Reports + * const report = await prisma.report.updateMany({ * where: { * // ... provide filter here * }, @@ -5839,59 +3715,59 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * }) * **/ - updateMany>( - args: SelectSubset> + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** - * Create or update one Report_to_clause. - * @param {Report_to_clauseUpsertArgs} args - Arguments to update or create a Report_to_clause. + * Create or update one Report. + * @param {ReportUpsertArgs} args - Arguments to update or create a Report. * @example - * // Update or create a Report_to_clause - * const report_to_clause = await prisma.report_to_clause.upsert({ + * // Update or create a Report + * const report = await prisma.report.upsert({ * create: { - * // ... data to create a Report_to_clause + * // ... data to create a Report * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the Report_to_clause we want to update + * // ... the filter for the Report we want to update * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__Report_to_clauseClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert>( + args: SelectSubset> + ): Prisma__ReportClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** - * Count the number of Report_to_clauses. + * 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 {Report_to_clauseCountArgs} args - Arguments to filter Report_to_clauses to count. + * @param {ReportCountArgs} args - Arguments to filter Reports to count. * @example - * // Count the number of Report_to_clauses - * const count = await prisma.report_to_clause.count({ + * // Count the number of Reports + * const count = await prisma.report.count({ * where: { - * // ... the filter for the Report_to_clauses we want to count + * // ... the filter for the Reports we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a Report_to_clause. + * 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 {Report_to_clauseAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @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 @@ -5911,13 +3787,13 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by Report_to_clause. + * 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 {Report_to_clauseGroupByArgs} args - Group by arguments. + * @param {ReportGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -5932,14 +3808,14 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject * **/ groupBy< - T extends Report_to_clauseGroupByArgs, + T extends ReportGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: Report_to_clauseGroupByArgs['orderBy'] } - : { orderBy?: Report_to_clauseGroupByArgs['orderBy'] }, + ? { orderBy: ReportGroupByArgs['orderBy'] } + : { orderBy?: ReportGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends TupleToUnion, ByValid extends Has, @@ -5988,17 +3864,17 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetReport_to_clauseGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetReportGroupByPayload : Prisma.PrismaPromise } /** - * The delegate class that acts as a "Promise-like" for Report_to_clause. + * 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__Report_to_clauseClient implements Prisma.PrismaPromise { + export class Prisma__ReportClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -6013,9 +3889,7 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - clause = {}>(args?: Subset>): Prisma__ClauseClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; - - report = {}>(args?: Subset>): Prisma__ReportClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + user = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -6045,27 +3919,27 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject // Custom InputTypes /** - * Report_to_clause base type for findUnique actions + * Report base type for findUnique actions */ - export type Report_to_clauseFindUniqueArgsBase = { + export type ReportFindUniqueArgsBase = { /** - * Select specific fields to fetch from the Report_to_clause + * Select specific fields to fetch from the Report */ - select?: Report_to_clauseSelect | null + select?: ReportSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: Report_to_clauseInclude | null + include?: ReportInclude | null /** - * Filter, which Report_to_clause to fetch. + * Filter, which Report to fetch. */ - where: Report_to_clauseWhereUniqueInput + where: ReportWhereUniqueInput } /** - * Report_to_clause findUnique + * Report findUnique */ - export interface Report_to_clauseFindUniqueArgs extends Report_to_clauseFindUniqueArgsBase { + export interface ReportFindUniqueArgs extends ReportFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead @@ -6075,76 +3949,76 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject /** - * Report_to_clause findUniqueOrThrow + * Report findUniqueOrThrow */ - export type Report_to_clauseFindUniqueOrThrowArgs = { + export type ReportFindUniqueOrThrowArgs = { /** - * Select specific fields to fetch from the Report_to_clause + * Select specific fields to fetch from the Report */ - select?: Report_to_clauseSelect | null + select?: ReportSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: Report_to_clauseInclude | null + include?: ReportInclude | null /** - * Filter, which Report_to_clause to fetch. + * Filter, which Report to fetch. */ - where: Report_to_clauseWhereUniqueInput + where: ReportWhereUniqueInput } /** - * Report_to_clause base type for findFirst actions + * Report base type for findFirst actions */ - export type Report_to_clauseFindFirstArgsBase = { + export type ReportFindFirstArgsBase = { /** - * Select specific fields to fetch from the Report_to_clause + * Select specific fields to fetch from the Report */ - select?: Report_to_clauseSelect | null + select?: ReportSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: Report_to_clauseInclude | null + include?: ReportInclude | null /** - * Filter, which Report_to_clause to fetch. + * Filter, which Report to fetch. */ - where?: Report_to_clauseWhereInput + where?: ReportWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Report_to_clauses to fetch. + * Determine the order of Reports to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for Report_to_clauses. + * Sets the position for searching for Reports. */ - cursor?: Report_to_clauseWhereUniqueInput + cursor?: ReportWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Report_to_clauses from the position of the cursor. + * Take `±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` Report_to_clauses. + * 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 Report_to_clauses. + * Filter by unique combinations of Reports. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * Report_to_clause findFirst + * Report findFirst */ - export interface Report_to_clauseFindFirstArgs extends Report_to_clauseFindFirstArgsBase { + export interface ReportFindFirstArgs extends ReportFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findFirstOrThrow` method instead @@ -6154,236 +4028,236 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject /** - * Report_to_clause findFirstOrThrow + * Report findFirstOrThrow */ - export type Report_to_clauseFindFirstOrThrowArgs = { + export type ReportFindFirstOrThrowArgs = { /** - * Select specific fields to fetch from the Report_to_clause + * Select specific fields to fetch from the Report */ - select?: Report_to_clauseSelect | null + select?: ReportSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: Report_to_clauseInclude | null + include?: ReportInclude | null /** - * Filter, which Report_to_clause to fetch. + * Filter, which Report to fetch. */ - where?: Report_to_clauseWhereInput + where?: ReportWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Report_to_clauses to fetch. + * Determine the order of Reports to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for searching for Report_to_clauses. + * Sets the position for searching for Reports. */ - cursor?: Report_to_clauseWhereUniqueInput + cursor?: ReportWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Report_to_clauses from the position of the cursor. + * Take `±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` Report_to_clauses. + * 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 Report_to_clauses. + * Filter by unique combinations of Reports. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * Report_to_clause findMany + * Report findMany */ - export type Report_to_clauseFindManyArgs = { + export type ReportFindManyArgs = { /** - * Select specific fields to fetch from the Report_to_clause + * Select specific fields to fetch from the Report */ - select?: Report_to_clauseSelect | null + select?: ReportSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: Report_to_clauseInclude | null + include?: ReportInclude | null /** - * Filter, which Report_to_clauses to fetch. + * Filter, which Reports to fetch. */ - where?: Report_to_clauseWhereInput + where?: ReportWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * - * Determine the order of Report_to_clauses to fetch. + * Determine the order of Reports to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * - * Sets the position for listing Report_to_clauses. + * Sets the position for listing Reports. */ - cursor?: Report_to_clauseWhereUniqueInput + cursor?: ReportWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * - * Take `±n` Report_to_clauses from the position of the cursor. + * Take `±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` Report_to_clauses. + * Skip the first `n` Reports. */ skip?: number - distinct?: Enumerable + distinct?: Enumerable } /** - * Report_to_clause create + * Report create */ - export type Report_to_clauseCreateArgs = { + export type ReportCreateArgs = { /** - * Select specific fields to fetch from the Report_to_clause + * Select specific fields to fetch from the Report */ - select?: Report_to_clauseSelect | null + select?: ReportSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: Report_to_clauseInclude | null + include?: ReportInclude | null /** - * The data needed to create a Report_to_clause. + * The data needed to create a Report. */ - data: XOR + data: XOR } /** - * Report_to_clause createMany + * Report createMany */ - export type Report_to_clauseCreateManyArgs = { + export type ReportCreateManyArgs = { /** - * The data used to create many Report_to_clauses. + * The data used to create many Reports. */ - data: Enumerable + data: Enumerable skipDuplicates?: boolean } /** - * Report_to_clause update + * Report update */ - export type Report_to_clauseUpdateArgs = { + export type ReportUpdateArgs = { /** - * Select specific fields to fetch from the Report_to_clause + * Select specific fields to fetch from the Report */ - select?: Report_to_clauseSelect | null + select?: ReportSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: Report_to_clauseInclude | null + include?: ReportInclude | null /** - * The data needed to update a Report_to_clause. + * The data needed to update a Report. */ - data: XOR + data: XOR /** - * Choose, which Report_to_clause to update. + * Choose, which Report to update. */ - where: Report_to_clauseWhereUniqueInput + where: ReportWhereUniqueInput } /** - * Report_to_clause updateMany + * Report updateMany */ - export type Report_to_clauseUpdateManyArgs = { + export type ReportUpdateManyArgs = { /** - * The data used to update Report_to_clauses. + * The data used to update Reports. */ - data: XOR + data: XOR /** - * Filter which Report_to_clauses to update + * Filter which Reports to update */ - where?: Report_to_clauseWhereInput + where?: ReportWhereInput } /** - * Report_to_clause upsert + * Report upsert */ - export type Report_to_clauseUpsertArgs = { + export type ReportUpsertArgs = { /** - * Select specific fields to fetch from the Report_to_clause + * Select specific fields to fetch from the Report */ - select?: Report_to_clauseSelect | null + select?: ReportSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: Report_to_clauseInclude | null + include?: ReportInclude | null /** - * The filter to search for the Report_to_clause to update in case it exists. + * The filter to search for the Report to update in case it exists. */ - where: Report_to_clauseWhereUniqueInput + where: ReportWhereUniqueInput /** - * In case the Report_to_clause found by the `where` argument doesn't exist, create a new Report_to_clause with this data. + * In case the Report found by the `where` argument doesn't exist, create a new Report with this data. */ - create: XOR + create: XOR /** - * In case the Report_to_clause was found with the provided `where` argument, update it with this data. + * In case the Report was found with the provided `where` argument, update it with this data. */ - update: XOR + update: XOR } /** - * Report_to_clause delete + * Report delete */ - export type Report_to_clauseDeleteArgs = { + export type ReportDeleteArgs = { /** - * Select specific fields to fetch from the Report_to_clause + * Select specific fields to fetch from the Report */ - select?: Report_to_clauseSelect | null + select?: ReportSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: Report_to_clauseInclude | null + include?: ReportInclude | null /** - * Filter which Report_to_clause to delete. + * Filter which Report to delete. */ - where: Report_to_clauseWhereUniqueInput + where: ReportWhereUniqueInput } /** - * Report_to_clause deleteMany + * Report deleteMany */ - export type Report_to_clauseDeleteManyArgs = { + export type ReportDeleteManyArgs = { /** - * Filter which Report_to_clauses to delete + * Filter which Reports to delete */ - where?: Report_to_clauseWhereInput + where?: ReportWhereInput } /** - * Report_to_clause without action + * Report without action */ - export type Report_to_clauseArgs = { + export type ReportArgs = { /** - * Select specific fields to fetch from the Report_to_clause + * Select specific fields to fetch from the Report */ - select?: Report_to_clauseSelect | null + select?: ReportSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: Report_to_clauseInclude | null + include?: ReportInclude | null } @@ -8377,22 +6251,13 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - export const ChipScalarFieldEnum: { + export const ClauseScalarFieldEnum: { key: 'key', value: 'value', udap_id: 'udap_id', text: 'text' }; - export type ChipScalarFieldEnum = (typeof ChipScalarFieldEnum)[keyof typeof ChipScalarFieldEnum] - - - export const ClauseScalarFieldEnum: { - id: 'id', - label: 'label', - value: 'value' - }; - export type ClauseScalarFieldEnum = (typeof ClauseScalarFieldEnum)[keyof typeof ClauseScalarFieldEnum] @@ -8429,15 +6294,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject export type ReportScalarFieldEnum = (typeof ReportScalarFieldEnum)[keyof typeof ReportScalarFieldEnum] - export const Report_to_clauseScalarFieldEnum: { - id: 'id', - reportId: 'reportId', - clauseId: 'clauseId' - }; - - export type Report_to_clauseScalarFieldEnum = (typeof Report_to_clauseScalarFieldEnum)[keyof typeof Report_to_clauseScalarFieldEnum] - - export const UdapScalarFieldEnum: { id: 'id', department: 'department', @@ -8492,72 +6348,32 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject */ - export type ChipWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable + export type ClauseWhereInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable key?: StringFilter | string value?: StringFilter | string udap_id?: StringFilter | string text?: StringFilter | string } - export type ChipOrderByWithRelationInput = { + export type ClauseOrderByWithRelationInput = { key?: SortOrder value?: SortOrder udap_id?: SortOrder text?: SortOrder } - export type ChipWhereUniqueInput = { - key_value_udap_id?: ChipKeyValueUdap_idCompoundUniqueInput + export type ClauseWhereUniqueInput = { + key_value_udap_id?: ClauseKeyValueUdap_idCompoundUniqueInput } - export type ChipOrderByWithAggregationInput = { + export type ClauseOrderByWithAggregationInput = { key?: SortOrder value?: SortOrder udap_id?: SortOrder text?: SortOrder - _count?: ChipCountOrderByAggregateInput - _max?: ChipMaxOrderByAggregateInput - _min?: ChipMinOrderByAggregateInput - } - - export type ChipScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - key?: StringWithAggregatesFilter | string - value?: StringWithAggregatesFilter | string - udap_id?: StringWithAggregatesFilter | string - text?: StringWithAggregatesFilter | string - } - - export type ClauseWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - label?: StringFilter | string - value?: StringFilter | string - report_to_clause?: Report_to_clauseListRelationFilter - } - - export type ClauseOrderByWithRelationInput = { - id?: SortOrder - label?: SortOrder - value?: SortOrder - report_to_clause?: Report_to_clauseOrderByRelationAggregateInput - } - - export type ClauseWhereUniqueInput = { - id?: string - } - - export type ClauseOrderByWithAggregationInput = { - id?: SortOrder - label?: SortOrder - value?: SortOrder _count?: ClauseCountOrderByAggregateInput _max?: ClauseMaxOrderByAggregateInput _min?: ClauseMinOrderByAggregateInput @@ -8567,9 +6383,10 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject AND?: Enumerable OR?: Enumerable NOT?: Enumerable - id?: StringWithAggregatesFilter | string - label?: StringWithAggregatesFilter | string + key?: StringWithAggregatesFilter | string value?: StringWithAggregatesFilter | string + udap_id?: StringWithAggregatesFilter | string + text?: StringWithAggregatesFilter | string } export type DelegationWhereInput = { @@ -8633,7 +6450,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject disabled?: BoolNullableFilter | boolean | null udap_id?: StringNullableFilter | string | null user?: XOR - report_to_clause?: Report_to_clauseListRelationFilter } export type ReportOrderByWithRelationInput = { @@ -8657,7 +6473,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject disabled?: SortOrderInput | SortOrder udap_id?: SortOrderInput | SortOrder user?: UserOrderByWithRelationInput - report_to_clause?: Report_to_clauseOrderByRelationAggregateInput } export type ReportWhereUniqueInput = { @@ -8716,47 +6531,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject udap_id?: StringNullableWithAggregatesFilter | string | null } - export type Report_to_clauseWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - reportId?: StringFilter | string - clauseId?: StringFilter | string - clause?: XOR - report?: XOR - } - - export type Report_to_clauseOrderByWithRelationInput = { - id?: SortOrder - reportId?: SortOrder - clauseId?: SortOrder - clause?: ClauseOrderByWithRelationInput - report?: ReportOrderByWithRelationInput - } - - export type Report_to_clauseWhereUniqueInput = { - id?: string - } - - export type Report_to_clauseOrderByWithAggregationInput = { - id?: SortOrder - reportId?: SortOrder - clauseId?: SortOrder - _count?: Report_to_clauseCountOrderByAggregateInput - _max?: Report_to_clauseMaxOrderByAggregateInput - _min?: Report_to_clauseMinOrderByAggregateInput - } - - export type Report_to_clauseScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringWithAggregatesFilter | string - reportId?: StringWithAggregatesFilter | string - clauseId?: StringWithAggregatesFilter | string - } - export type UdapWhereInput = { AND?: Enumerable OR?: Enumerable @@ -8869,99 +6643,53 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject udap_id?: StringWithAggregatesFilter | string } - export type ChipCreateInput = { - key: string - value: string - udap_id: string - text: string - } - - export type ChipUncheckedCreateInput = { + export type ClauseCreateInput = { key: string value: string udap_id: string text: string } - export type ChipUpdateInput = { - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - udap_id?: StringFieldUpdateOperationsInput | string - text?: StringFieldUpdateOperationsInput | string - } - - export type ChipUncheckedUpdateInput = { - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - udap_id?: StringFieldUpdateOperationsInput | string - text?: StringFieldUpdateOperationsInput | string - } - - export type ChipCreateManyInput = { + export type ClauseUncheckedCreateInput = { key: string value: string udap_id: string text: string } - export type ChipUpdateManyMutationInput = { + export type ClauseUpdateInput = { key?: StringFieldUpdateOperationsInput | string value?: StringFieldUpdateOperationsInput | string udap_id?: StringFieldUpdateOperationsInput | string text?: StringFieldUpdateOperationsInput | string } - export type ChipUncheckedUpdateManyInput = { + export type ClauseUncheckedUpdateInput = { key?: StringFieldUpdateOperationsInput | string value?: StringFieldUpdateOperationsInput | string udap_id?: StringFieldUpdateOperationsInput | string - text?: StringFieldUpdateOperationsInput | string - } - - export type ClauseCreateInput = { - id: string - label: string - value: string - report_to_clause?: Report_to_clauseCreateNestedManyWithoutClauseInput - } - - export type ClauseUncheckedCreateInput = { - id: string - label: string - value: string - report_to_clause?: Report_to_clauseUncheckedCreateNestedManyWithoutClauseInput - } - - export type ClauseUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - label?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - report_to_clause?: Report_to_clauseUpdateManyWithoutClauseNestedInput - } - - export type ClauseUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - label?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - report_to_clause?: Report_to_clauseUncheckedUpdateManyWithoutClauseNestedInput + text?: StringFieldUpdateOperationsInput | string } export type ClauseCreateManyInput = { - id: string - label: string + key: string value: string + udap_id: string + text: string } export type ClauseUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - label?: StringFieldUpdateOperationsInput | string + key?: StringFieldUpdateOperationsInput | string value?: StringFieldUpdateOperationsInput | string + udap_id?: StringFieldUpdateOperationsInput | string + text?: StringFieldUpdateOperationsInput | string } export type ClauseUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - label?: StringFieldUpdateOperationsInput | string + key?: StringFieldUpdateOperationsInput | string value?: StringFieldUpdateOperationsInput | string + udap_id?: StringFieldUpdateOperationsInput | string + text?: StringFieldUpdateOperationsInput | string } export type DelegationCreateInput = { @@ -9018,7 +6746,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject disabled?: boolean | null udap_id?: string | null user: UserCreateNestedOneWithoutReportInput - report_to_clause?: Report_to_clauseCreateNestedManyWithoutReportInput } export type ReportUncheckedCreateInput = { @@ -9041,7 +6768,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject pdf?: string | null disabled?: boolean | null udap_id?: string | null - report_to_clause?: Report_to_clauseUncheckedCreateNestedManyWithoutReportInput } export type ReportUpdateInput = { @@ -9064,7 +6790,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null udap_id?: NullableStringFieldUpdateOperationsInput | string | null user?: UserUpdateOneRequiredWithoutReportNestedInput - report_to_clause?: Report_to_clauseUpdateManyWithoutReportNestedInput } export type ReportUncheckedUpdateInput = { @@ -9087,7 +6812,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject pdf?: NullableStringFieldUpdateOperationsInput | string | null disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null udap_id?: NullableStringFieldUpdateOperationsInput | string | null - report_to_clause?: Report_to_clauseUncheckedUpdateManyWithoutReportNestedInput } export type ReportCreateManyInput = { @@ -9155,46 +6879,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject udap_id?: NullableStringFieldUpdateOperationsInput | string | null } - export type Report_to_clauseCreateInput = { - id: string - clause: ClauseCreateNestedOneWithoutReport_to_clauseInput - report: ReportCreateNestedOneWithoutReport_to_clauseInput - } - - export type Report_to_clauseUncheckedCreateInput = { - id: string - reportId: string - clauseId: string - } - - export type Report_to_clauseUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - clause?: ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInput - report?: ReportUpdateOneRequiredWithoutReport_to_clauseNestedInput - } - - export type Report_to_clauseUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - reportId?: StringFieldUpdateOperationsInput | string - clauseId?: StringFieldUpdateOperationsInput | string - } - - export type Report_to_clauseCreateManyInput = { - id: string - reportId: string - clauseId: string - } - - export type Report_to_clauseUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - } - - export type Report_to_clauseUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - reportId?: StringFieldUpdateOperationsInput | string - clauseId?: StringFieldUpdateOperationsInput | string - } - export type UdapCreateInput = { id: string department: string @@ -9358,27 +7042,27 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject not?: NestedStringFilter | string } - export type ChipKeyValueUdap_idCompoundUniqueInput = { + export type ClauseKeyValueUdap_idCompoundUniqueInput = { key: string value: string udap_id: string } - export type ChipCountOrderByAggregateInput = { + export type ClauseCountOrderByAggregateInput = { key?: SortOrder value?: SortOrder udap_id?: SortOrder text?: SortOrder } - export type ChipMaxOrderByAggregateInput = { + export type ClauseMaxOrderByAggregateInput = { key?: SortOrder value?: SortOrder udap_id?: SortOrder text?: SortOrder } - export type ChipMinOrderByAggregateInput = { + export type ClauseMinOrderByAggregateInput = { key?: SortOrder value?: SortOrder udap_id?: SortOrder @@ -9403,34 +7087,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject _max?: NestedStringFilter } - export type Report_to_clauseListRelationFilter = { - every?: Report_to_clauseWhereInput - some?: Report_to_clauseWhereInput - none?: Report_to_clauseWhereInput - } - - export type Report_to_clauseOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type ClauseCountOrderByAggregateInput = { - id?: SortOrder - label?: SortOrder - value?: SortOrder - } - - export type ClauseMaxOrderByAggregateInput = { - id?: SortOrder - label?: SortOrder - value?: SortOrder - } - - export type ClauseMinOrderByAggregateInput = { - id?: SortOrder - label?: SortOrder - value?: SortOrder - } - export type UserRelationFilter = { is?: UserWhereInput | null isNot?: UserWhereInput | null @@ -9658,34 +7314,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject _max?: NestedBoolNullableFilter } - export type ClauseRelationFilter = { - is?: ClauseWhereInput | null - isNot?: ClauseWhereInput | null - } - - export type ReportRelationFilter = { - is?: ReportWhereInput | null - isNot?: ReportWhereInput | null - } - - export type Report_to_clauseCountOrderByAggregateInput = { - id?: SortOrder - reportId?: SortOrder - clauseId?: SortOrder - } - - export type Report_to_clauseMaxOrderByAggregateInput = { - id?: SortOrder - reportId?: SortOrder - clauseId?: SortOrder - } - - export type Report_to_clauseMinOrderByAggregateInput = { - id?: SortOrder - reportId?: SortOrder - clauseId?: SortOrder - } - export type UserListRelationFilter = { every?: UserWhereInput some?: UserWhereInput @@ -9782,48 +7410,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject set?: string } - export type Report_to_clauseCreateNestedManyWithoutClauseInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: Report_to_clauseCreateManyClauseInputEnvelope - connect?: Enumerable - } - - export type Report_to_clauseUncheckedCreateNestedManyWithoutClauseInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: Report_to_clauseCreateManyClauseInputEnvelope - connect?: Enumerable - } - - export type Report_to_clauseUpdateManyWithoutClauseNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: Report_to_clauseCreateManyClauseInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type Report_to_clauseUncheckedUpdateManyWithoutClauseNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: Report_to_clauseCreateManyClauseInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - export type UserCreateNestedOneWithoutDelegation_delegation_createdByTouserInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutDelegation_delegation_createdByTouserInput @@ -9858,20 +7444,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject connect?: UserWhereUniqueInput } - export type Report_to_clauseCreateNestedManyWithoutReportInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: Report_to_clauseCreateManyReportInputEnvelope - connect?: Enumerable - } - - export type Report_to_clauseUncheckedCreateNestedManyWithoutReportInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: Report_to_clauseCreateManyReportInputEnvelope - connect?: Enumerable - } - export type NullableStringFieldUpdateOperationsInput = { set?: string | null } @@ -9904,62 +7476,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject update?: XOR } - export type Report_to_clauseUpdateManyWithoutReportNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: Report_to_clauseCreateManyReportInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type Report_to_clauseUncheckedUpdateManyWithoutReportNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: Report_to_clauseCreateManyReportInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type ClauseCreateNestedOneWithoutReport_to_clauseInput = { - create?: XOR - connectOrCreate?: ClauseCreateOrConnectWithoutReport_to_clauseInput - connect?: ClauseWhereUniqueInput - } - - export type ReportCreateNestedOneWithoutReport_to_clauseInput = { - create?: XOR - connectOrCreate?: ReportCreateOrConnectWithoutReport_to_clauseInput - connect?: ReportWhereUniqueInput - } - - export type ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInput = { - create?: XOR - connectOrCreate?: ClauseCreateOrConnectWithoutReport_to_clauseInput - upsert?: ClauseUpsertWithoutReport_to_clauseInput - connect?: ClauseWhereUniqueInput - update?: XOR - } - - export type ReportUpdateOneRequiredWithoutReport_to_clauseNestedInput = { - create?: XOR - connectOrCreate?: ReportCreateOrConnectWithoutReport_to_clauseInput - upsert?: ReportUpsertWithoutReport_to_clauseInput - connect?: ReportWhereUniqueInput - update?: XOR - } - export type UserCreateNestedManyWithoutUdapInput = { create?: XOR, Enumerable> connectOrCreate?: Enumerable @@ -10316,51 +7832,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject _max?: NestedBoolNullableFilter } - export type Report_to_clauseCreateWithoutClauseInput = { - id: string - report: ReportCreateNestedOneWithoutReport_to_clauseInput - } - - export type Report_to_clauseUncheckedCreateWithoutClauseInput = { - id: string - reportId: string - } - - export type Report_to_clauseCreateOrConnectWithoutClauseInput = { - where: Report_to_clauseWhereUniqueInput - create: XOR - } - - export type Report_to_clauseCreateManyClauseInputEnvelope = { - data: Enumerable - skipDuplicates?: boolean - } - - export type Report_to_clauseUpsertWithWhereUniqueWithoutClauseInput = { - where: Report_to_clauseWhereUniqueInput - update: XOR - create: XOR - } - - export type Report_to_clauseUpdateWithWhereUniqueWithoutClauseInput = { - where: Report_to_clauseWhereUniqueInput - data: XOR - } - - export type Report_to_clauseUpdateManyWithWhereWithoutClauseInput = { - where: Report_to_clauseScalarWhereInput - data: XOR - } - - export type Report_to_clauseScalarWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: StringFilter | string - reportId?: StringFilter | string - clauseId?: StringFilter | string - } - export type UserCreateWithoutDelegation_delegation_createdByTouserInput = { id: string name: string @@ -10466,26 +7937,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject create: XOR } - export type Report_to_clauseCreateWithoutReportInput = { - id: string - clause: ClauseCreateNestedOneWithoutReport_to_clauseInput - } - - export type Report_to_clauseUncheckedCreateWithoutReportInput = { - id: string - clauseId: string - } - - export type Report_to_clauseCreateOrConnectWithoutReportInput = { - where: Report_to_clauseWhereUniqueInput - create: XOR - } - - export type Report_to_clauseCreateManyReportInputEnvelope = { - data: Enumerable - skipDuplicates?: boolean - } - export type UserUpsertWithoutReportInput = { update: XOR create: XOR @@ -10507,154 +7958,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject delegation_delegation_delegatedToTouser?: DelegationUncheckedUpdateManyWithoutUser_delegation_delegatedToTouserNestedInput } - export type Report_to_clauseUpsertWithWhereUniqueWithoutReportInput = { - where: Report_to_clauseWhereUniqueInput - update: XOR - create: XOR - } - - export type Report_to_clauseUpdateWithWhereUniqueWithoutReportInput = { - where: Report_to_clauseWhereUniqueInput - data: XOR - } - - export type Report_to_clauseUpdateManyWithWhereWithoutReportInput = { - where: Report_to_clauseScalarWhereInput - data: XOR - } - - export type ClauseCreateWithoutReport_to_clauseInput = { - id: string - label: string - value: string - } - - export type ClauseUncheckedCreateWithoutReport_to_clauseInput = { - id: string - label: string - value: string - } - - export type ClauseCreateOrConnectWithoutReport_to_clauseInput = { - where: ClauseWhereUniqueInput - create: XOR - } - - export type ReportCreateWithoutReport_to_clauseInput = { - id: string - title?: string | null - 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 - user: UserCreateNestedOneWithoutReportInput - } - - export type ReportUncheckedCreateWithoutReport_to_clauseInput = { - 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 - } - - export type ReportCreateOrConnectWithoutReport_to_clauseInput = { - where: ReportWhereUniqueInput - create: XOR - } - - export type ClauseUpsertWithoutReport_to_clauseInput = { - update: XOR - create: XOR - } - - export type ClauseUpdateWithoutReport_to_clauseInput = { - id?: StringFieldUpdateOperationsInput | string - label?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - } - - export type ClauseUncheckedUpdateWithoutReport_to_clauseInput = { - id?: StringFieldUpdateOperationsInput | string - label?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - } - - export type ReportUpsertWithoutReport_to_clauseInput = { - update: XOR - create: XOR - } - - export type ReportUpdateWithoutReport_to_clauseInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - 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 - user?: UserUpdateOneRequiredWithoutReportNestedInput - } - - export type ReportUncheckedUpdateWithoutReport_to_clauseInput = { - 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 - } - export type UserCreateWithoutUdapInput = { id: string name: string @@ -10761,7 +8064,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject pdf?: string | null disabled?: boolean | null udap_id?: string | null - report_to_clause?: Report_to_clauseCreateNestedManyWithoutReportInput } export type ReportUncheckedCreateWithoutUserInput = { @@ -10783,7 +8085,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject pdf?: string | null disabled?: boolean | null udap_id?: string | null - report_to_clause?: Report_to_clauseUncheckedCreateNestedManyWithoutReportInput } export type ReportCreateOrConnectWithoutUserInput = { @@ -10939,41 +8240,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject email?: NullableStringFieldUpdateOperationsInput | string | null } - export type Report_to_clauseCreateManyClauseInput = { - id: string - reportId: string - } - - export type Report_to_clauseUpdateWithoutClauseInput = { - id?: StringFieldUpdateOperationsInput | string - report?: ReportUpdateOneRequiredWithoutReport_to_clauseNestedInput - } - - export type Report_to_clauseUncheckedUpdateWithoutClauseInput = { - id?: StringFieldUpdateOperationsInput | string - reportId?: StringFieldUpdateOperationsInput | string - } - - export type Report_to_clauseUncheckedUpdateManyWithoutReport_to_clauseInput = { - id?: StringFieldUpdateOperationsInput | string - reportId?: StringFieldUpdateOperationsInput | string - } - - export type Report_to_clauseCreateManyReportInput = { - id: string - clauseId: string - } - - export type Report_to_clauseUpdateWithoutReportInput = { - id?: StringFieldUpdateOperationsInput | string - clause?: ClauseUpdateOneRequiredWithoutReport_to_clauseNestedInput - } - - export type Report_to_clauseUncheckedUpdateWithoutReportInput = { - id?: StringFieldUpdateOperationsInput | string - clauseId?: StringFieldUpdateOperationsInput | string - } - export type UserCreateManyUdapInput = { id: string name: string @@ -11072,7 +8338,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject pdf?: NullableStringFieldUpdateOperationsInput | string | null disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null udap_id?: NullableStringFieldUpdateOperationsInput | string | null - report_to_clause?: Report_to_clauseUpdateManyWithoutReportNestedInput } export type ReportUncheckedUpdateWithoutUserInput = { @@ -11094,7 +8359,6 @@ export type InputJsonValue = null | string | number | boolean | InputJsonObject pdf?: NullableStringFieldUpdateOperationsInput | string | null disabled?: NullableBoolFieldUpdateOperationsInput | boolean | null udap_id?: NullableStringFieldUpdateOperationsInput | string | null - report_to_clause?: Report_to_clauseUncheckedUpdateManyWithoutReportNestedInput } export type ReportUncheckedUpdateManyWithoutReportInput = { diff --git a/packages/frontend/src/components/ColorPicker.tsx b/packages/frontend/src/components/ColorPicker.tsx new file mode 100644 index 00000000..ac9080fd --- /dev/null +++ b/packages/frontend/src/components/ColorPicker.tsx @@ -0,0 +1,81 @@ +import { ColorPicker as ArkColorPicker } from "@ark-ui/react/color-picker"; +import type { ComponentProps } from "react"; +import { styled } from "#styled-system/jsx"; +import { colorPicker } from "#styled-system/recipes"; +import { createStyleContext } from "./createStyleContext"; + +const { withProvider, withContext } = createStyleContext(colorPicker); + +const Root = withProvider(styled(ArkColorPicker.Root), "root"); +const Area = withContext(styled(ArkColorPicker.Area), "area"); +const AreaBackground = withContext(styled(ArkColorPicker.AreaBackground), "areaBackground"); +const AreaThumb = withContext(styled(ArkColorPicker.AreaThumb), "areaThumb"); +const ChannelInput = withContext(styled(ArkColorPicker.ChannelInput), "channelInput"); +const ChannelSlider = withContext(styled(ArkColorPicker.ChannelSlider), "channelSlider"); +const ChannelSliderThumb = withContext(styled(ArkColorPicker.ChannelSliderThumb), "channelSliderThumb"); +const ChannelSliderTrack = withContext(styled(ArkColorPicker.ChannelSliderTrack), "channelSliderTrack"); +const Content = withContext(styled(ArkColorPicker.Content), "content"); +const Control = withContext(styled(ArkColorPicker.Control), "control"); +const EyeDropperTrigger = withContext(styled(ArkColorPicker.EyeDropperTrigger), "eyeDropperTrigger"); +const FormatSelect = withContext(styled(ArkColorPicker.FormatSelect), "formatSelect"); +const FormatTrigger = withContext(styled(ArkColorPicker.FormatTrigger), "formatTrigger"); +const Label = withContext(styled(ArkColorPicker.Label), "label"); +const Positioner = withContext(styled(ArkColorPicker.Positioner), "positioner"); +const Swatch = withContext(styled(ArkColorPicker.Swatch), "swatch"); +const SwatchGroup = withContext(styled(ArkColorPicker.SwatchGroup), "swatchGroup"); +const SwatchIndicator = withContext(styled(ArkColorPicker.SwatchIndicator), "swatchIndicator"); +const SwatchTrigger = withContext(styled(ArkColorPicker.SwatchTrigger), "swatchTrigger"); +const TransparencyGrid = withContext(styled(ArkColorPicker.TransparencyGrid), "transparencyGrid"); +const Trigger = withContext(styled(ArkColorPicker.Trigger), "trigger"); +const ValueText = withContext(styled(ArkColorPicker.ValueText), "valueText"); +const View = withContext(styled(ArkColorPicker.View), "view"); + +export const ColorPicker = { + Root, + Area, + AreaBackground, + AreaThumb, + ChannelInput, + ChannelSlider, + ChannelSliderThumb, + ChannelSliderTrack, + Content, + Control, + EyeDropperTrigger, + FormatSelect, + FormatTrigger, + Label, + Positioner, + Swatch, + SwatchGroup, + SwatchIndicator, + SwatchTrigger, + TransparencyGrid, + Trigger, + ValueText, + View, +}; + +export interface RootProps extends ComponentProps {} +export interface AreaProps extends ComponentProps {} +export interface AreaBackgroundProps extends ComponentProps {} +export interface AreaThumbProps extends ComponentProps {} +export interface ChannelInputProps extends ComponentProps {} +export interface ChannelSliderProps extends ComponentProps {} +export interface ChannelSliderThumbProps extends ComponentProps {} +export interface ChannelSliderTrackProps extends ComponentProps {} +export interface ContentProps extends ComponentProps {} +export interface ControlProps extends ComponentProps {} +export interface EyeDropperTriggerProps extends ComponentProps {} +export interface FormatSelectProps extends ComponentProps {} +export interface FormatTriggerProps extends ComponentProps {} +export interface LabelProps extends ComponentProps {} +export interface PositionerProps extends ComponentProps {} +export interface SwatchProps extends ComponentProps {} +export interface SwatchGroupProps extends ComponentProps {} +export interface SwatchIndicatorProps extends ComponentProps {} +export interface SwatchTriggerProps extends ComponentProps {} +export interface TransparencyGridProps extends ComponentProps {} +export interface TriggerProps extends ComponentProps {} +export interface ValueTextProps extends ComponentProps {} +export interface ViewProps extends ComponentProps {} diff --git a/packages/frontend/src/components/SyncForm.tsx b/packages/frontend/src/components/SyncForm.tsx index f1fecd27..3295eddf 100644 --- a/packages/frontend/src/components/SyncForm.tsx +++ b/packages/frontend/src/components/SyncForm.tsx @@ -39,7 +39,7 @@ export function SyncFormBanner({ form, baseObject }: { form: UseFormReturn - + {/* @ts-ignore dsfr buttons props must have children */} - + ); }; diff --git a/packages/frontend/src/features/ServiceInstructeurSelect.tsx b/packages/frontend/src/features/ServiceInstructeurSelect.tsx index 0eff35c4..2e5d374f 100644 --- a/packages/frontend/src/features/ServiceInstructeurSelect.tsx +++ b/packages/frontend/src/features/ServiceInstructeurSelect.tsx @@ -1,8 +1,8 @@ import { Combobox } from "#components/Combobox"; import Button from "@codegouvfr/react-dsfr/Button"; import Input from "@codegouvfr/react-dsfr/Input"; -import { forwardRef, useState } from "react"; -import serviceInstructeurs from "../serviceInstructeur.json"; +import { useState } from "react"; +import { serviceInstructeurs } from "@cr-vif/pdf"; import { useFormContext, useWatch } from "react-hook-form"; import { Report } from "@cr-vif/electric-client/frontend"; @@ -12,7 +12,7 @@ export const ServiceInstructeurSelect = () => { const filterItems = ({ value }: { value: string }) => { const filteredItems = serviceInstructeurs.filter((item) => - item["abrégé"].toLowerCase().includes(value.toLowerCase()), + item["libellé tiers"].toLowerCase().includes(value.toLowerCase()), ); setItems(filteredItems); @@ -27,7 +27,7 @@ export const ServiceInstructeurSelect = () => { return ( (item as ServiceInstructeur)?.["abrégé"] ?? ""} + itemToString={(item) => (item as ServiceInstructeur)?.["libellé tiers"] ?? ""} itemToValue={(item) => (item as ServiceInstructeur)?.tiers.toString() ?? ""} items={items} value={value ? [value.toString()] : undefined} @@ -36,7 +36,7 @@ export const ServiceInstructeurSelect = () => { > - + {/* @ts-expect-error */} @@ -48,7 +48,7 @@ export const ServiceInstructeurSelect = () => { {items.map((item) => ( - {item["abrégé"]} + {item["libellé tiers"]} ))} @@ -59,8 +59,4 @@ export const ServiceInstructeurSelect = () => { ); }; -const A = forwardRef((props, ref: any) => { - return ; -}); - type ServiceInstructeur = (typeof serviceInstructeurs)[number]; diff --git a/packages/frontend/src/features/chips/useChipOptions.tsx b/packages/frontend/src/features/chips/useChipOptions.tsx index 90984bac..67b2cbad 100644 --- a/packages/frontend/src/features/chips/useChipOptions.tsx +++ b/packages/frontend/src/features/chips/useChipOptions.tsx @@ -3,14 +3,14 @@ import { useUser } from "../../contexts/AuthContext"; import { useLiveQuery } from "electric-sql/react"; import { db } from "../../db"; import { groupBy } from "pastable"; -import { Chip } from "@cr-vif/electric-client/frontend"; +import { Clause } from "@cr-vif/electric-client/frontend"; export const useChipOptions = (key?: string) => { const user = useUser()!; // retrieve all chips with the given key const decisionsChipsQuery = useLiveQuery( - db.chip.liveMany({ + db.clause.liveMany({ where: { ...(key ? { key } : {}), udap_id: { in: ["ALL", user.udap.id] }, @@ -29,9 +29,9 @@ export const useChipOptions = (key?: string) => { return chips.map(transformChip); }; -const transformChip = (chip: Chip) => { +const transformChip = (chip: Clause) => { return { ...chip, - text: chip.text?.replaceAll("\n", "
"), + text: chip.text?.replaceAll("\\n", "
"), }; }; diff --git a/packages/frontend/src/features/text-editor/TextEditorToolbar.tsx b/packages/frontend/src/features/text-editor/TextEditorToolbar.tsx index 7397abfc..24eb58ca 100644 --- a/packages/frontend/src/features/text-editor/TextEditorToolbar.tsx +++ b/packages/frontend/src/features/text-editor/TextEditorToolbar.tsx @@ -1,44 +1,25 @@ -import { cva, css } from "#styled-system/css"; -import { hstack } from "#styled-system/patterns"; -import type { Editor } from "@tiptap/react"; -import { useContext, useRef } from "react"; -import { LuBold, LuItalic, LuStrikethrough } from "react-icons/lu"; -import { TextEditorContext } from "./TextEditorContext"; +import { cva } from "#styled-system/css"; +import { HStack, Stack } from "#styled-system/jsx"; import Button from "@codegouvfr/react-dsfr/Button"; -import { useDebounce } from "react-use"; - -const toolbar = hstack({ - gap: "5px", - roundedBottom: "sm", - mt: "-1px", - lineHeight: "0", - transition: "all 0.15s", -}); +import { useContext, useState } from "react"; +import { ColorPicker } from "../../components/ColorPicker"; +import { TextEditorContext } from "./TextEditorContext"; const toolbarButtonRecipe = cva({ base: { - color: "grey", - // display: "flex", - // justifyContent: "center", - // alignItems: "center", - // w: "8", - // h: "8", + color: "background-flat-blue-france", bg: "white", }, variants: { active: { true: { - color: "black", - bg: "gray.600", + color: "white", + bg: "background-flat-blue-france", }, }, }, }); -interface Props { - editor: Editor; -} - export const TextEditorToolbar = () => { const { editor } = useContext(TextEditorContext); @@ -85,6 +66,7 @@ export const TextEditorToolbar = () => { onClick: () => editor.chain().focus().toggleStrike().run(), }} > + ); @@ -92,20 +74,86 @@ export const TextEditorToolbar = () => { const ColorInput = () => { const editor = useContext(TextEditorContext).editor!; + const [isOpen, baseSetIsOpen] = useState(false); + const [currentValue, setCurrentValue] = useState(editor.getAttributes("textStyle").color ?? "#000000"); + + const setIsOpen = (isOpen: boolean) => { + baseSetIsOpen(isOpen); + + if (isOpen) { + setCurrentValue(editor.getAttributes("textStyle").color ?? "#000000"); + } + }; return ( - - editor - .chain() - .focus() - .setColor((event.target as any).value) - .run() - } - value={editor.getAttributes("textStyle").color ?? "#000000"} - /> + setIsOpen(open)} + value={currentValue} + onValueChangeEnd={(e) => editor.chain().focus().setColor(e.value.toString("hex")).run()} + closeOnSelect={false} + > + {() => ( + <> + + + + + + + + + + + + + + + + + + + + + {/* + + Saved Colors + + + {presets.map((color, id) => ( + + + + ))} + + */} + + + + + )} + + // + // editor + // .chain() + // .focus() + // .setColor((event.target as any).value) + // .run() + // } + // value={editor.getAttributes("textStyle").color ?? "#000000"} + // /> ); }; diff --git a/packages/frontend/src/routes/pdf.$reportId.tsx b/packages/frontend/src/routes/pdf.$reportId.tsx index 79c1f26e..c6670699 100644 --- a/packages/frontend/src/routes/pdf.$reportId.tsx +++ b/packages/frontend/src/routes/pdf.$reportId.tsx @@ -43,7 +43,7 @@ export const PDF = () => { return ( - diff --git a/packages/pdf/src/index.ts b/packages/pdf/src/index.ts index b25cb5d3..f1a5c7ca 100644 --- a/packages/pdf/src/index.ts +++ b/packages/pdf/src/index.ts @@ -1 +1,4 @@ export * from "./report"; +import serviceInstructeurs from "./serviceInstructeur.json"; + +export { serviceInstructeurs }; diff --git a/packages/pdf/src/report.tsx b/packages/pdf/src/report.tsx index 0bff6003..fc7ea948 100644 --- a/packages/pdf/src/report.tsx +++ b/packages/pdf/src/report.tsx @@ -1,7 +1,8 @@ import { Document, PDFViewer, Page } from "@react-pdf/renderer"; import { Html } from "react-pdf-html"; import React from "react"; -import type { Udap, Report, Chip } from "@cr-vif/electric-client/frontend"; +import type { Udap, Report, Clause } from "@cr-vif/electric-client/frontend"; +import serviceInstructeurs from "./serviceInstructeur.json"; export const ReportPDFDocument = ({ udap, htmlString, images }: { udap: Udap; htmlString: string; images: Images }) => { return ( @@ -72,7 +73,7 @@ type Images = { export type ReportWithUser = Report & { user?: { email: string; name: string } }; -export const getReportHtmlString = (report: ReportWithUser, chipOptions: Chip[], udap: Udap) => { +export const getReportHtmlString = (report: ReportWithUser, chipOptions: Clause[], udap: Udap) => { 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); const contacts = report.contacts ? getMultipleChips(chipOptions, "contacts-utiles", report.contacts) : []; @@ -80,18 +81,25 @@ export const getReportHtmlString = (report: ReportWithUser, chipOptions: Chip[], ? getMultipleChips(chipOptions, "bonnes-pratiques", report.furtherInformation) : []; + const serviceInstructeur = report.serviceInstructeur + ? serviceInstructeurs.find((service) => service.tiers === report.serviceInstructeur) + : null; + return minifyHtml(`

- Objet : ${report.title ?? ""}
- Votre interlocuteur : ${report.user?.name ?? ""}
+ Votre interlocuteur : ${report.user?.name ?? ""}
Demandeur : ${report.applicantName ?? ""}
Adresse du projet : ${report.applicantAddress ?? ""}
Ref cadastrale : ${report.projectCadastralRef ?? ""}

+ +

+ Objet de la demande : ${report.title ?? ""} +

${spaceType ? `

${spaceType?.text}

` : ""} - ${decision ? `

${decision?.text}

` : ""} + ${decision ? `

${decision?.text}

` : ""} ${ report.precisions @@ -101,6 +109,11 @@ export const getReportHtmlString = (report: ReportWithUser, chipOptions: Chip[],

` : "" } + +

+ Le projet pour rappel :
+ ${report.projectDescription ?? ""} +

Contacts utiles :
@@ -120,7 +133,7 @@ export const getReportHtmlString = (report: ReportWithUser, chipOptions: Chip[], `); }; -const getMultipleChips = (chipOptions: Chip[], key: string, values: string) => { +const getMultipleChips = (chipOptions: Clause[], key: string, values: string) => { return values .split(",") .map((value) => { diff --git a/packages/frontend/src/serviceInstructeur.json b/packages/pdf/src/serviceInstructeur.json similarity index 100% rename from packages/frontend/src/serviceInstructeur.json rename to packages/pdf/src/serviceInstructeur.json