@@ -94,7 +94,7 @@ export type ClientContract<
9494 * const result = await db.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email .com'};`
9595 * ```
9696 */
97- $executeRaw ( query : TemplateStringsArray , ...values : any [ ] ) : ZenStackPromise < Schema , number > ;
97+ $executeRaw ( query : TemplateStringsArray , ...values : any [ ] ) : ZenStackPromise < number > ;
9898
9999 /**
100100 * Executes a raw query and returns the number of affected rows.
@@ -104,7 +104,7 @@ export type ClientContract<
104104 * const result = await db.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
105105 * ```
106106 */
107- $executeRawUnsafe ( query : string , ...values : any [ ] ) : ZenStackPromise < Schema , number > ;
107+ $executeRawUnsafe ( query : string , ...values : any [ ] ) : ZenStackPromise < number > ;
108108
109109 /**
110110 * Performs a prepared raw query and returns the `SELECT` data.
@@ -113,7 +113,7 @@ export type ClientContract<
113113 * const result = await db.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email .com'};`
114114 * ```
115115 */
116- $queryRaw < T = unknown > ( query : TemplateStringsArray , ...values : any [ ] ) : ZenStackPromise < Schema , T > ;
116+ $queryRaw < T = unknown > ( query : TemplateStringsArray , ...values : any [ ] ) : ZenStackPromise < T > ;
117117
118118 /**
119119 * Performs a raw query and returns the `SELECT` data.
@@ -123,7 +123,7 @@ export type ClientContract<
123123 * const result = await db.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
124124 * ```
125125 */
126- $queryRawUnsafe < T = unknown > ( query : string , ...values : any [ ] ) : ZenStackPromise < Schema , T > ;
126+ $queryRawUnsafe < T = unknown > ( query : string , ...values : any [ ] ) : ZenStackPromise < T > ;
127127
128128 /**
129129 * The current user identity. If the client is not bound to any user context, returns `undefined`.
@@ -205,7 +205,7 @@ export type ClientContract<
205205 * db.post.create({ data: { title: 'Hello World', authorId: 1 } }),
206206 * ]);
207207 */
208- $transaction < P extends ZenStackPromise < Schema , any > [ ] > (
208+ $transaction < P extends ZenStackPromise < any > [ ] > (
209209 arg : [ ...P ] ,
210210 options ?: { isolationLevel ?: TransactionIsolationLevel } ,
211211 ) : Promise < UnwrapTuplePromises < P > > ;
@@ -388,10 +388,7 @@ export type AllModelOperations<
388388 T ,
389389 CrudArgsType < Schema , Model , 'createManyAndReturn' , Options , ExtQueryArgs , ExtResult >
390390 > ,
391- ) : ZenStackPromise <
392- Schema ,
393- CrudReturnType < Schema , Model , 'createManyAndReturn' , T , Options , ExtResult >
394- > ;
391+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'createManyAndReturn' , T , Options , ExtResult > > ;
395392
396393 /**
397394 * Updates multiple entities and returns them.
@@ -418,14 +415,8 @@ export type AllModelOperations<
418415 updateManyAndReturn <
419416 T extends CrudArgsType < Schema , Model , 'updateManyAndReturn' , Options , ExtQueryArgs , ExtResult > ,
420417 > (
421- args : Subset <
422- T ,
423- CrudArgsType < Schema , Model , 'updateManyAndReturn' , Options , ExtQueryArgs , ExtResult >
424- > ,
425- ) : ZenStackPromise <
426- Schema ,
427- CrudReturnType < Schema , Model , 'updateManyAndReturn' , T , Options , ExtResult >
428- > ;
418+ args : Subset < T , CrudArgsType < Schema , Model , 'updateManyAndReturn' , Options , ExtQueryArgs , ExtResult > > ,
419+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'updateManyAndReturn' , T , Options , ExtResult > > ;
429420 } ) ;
430421
431422type CommonModelOperations <
@@ -518,7 +509,7 @@ type CommonModelOperations<
518509 */
519510 findMany < T extends CrudArgsType < Schema , Model , 'findMany' , Options , ExtQueryArgs , ExtResult > > (
520511 args ?: SelectSubset < T , CrudArgsType < Schema , Model , 'findMany' , Options , ExtQueryArgs , ExtResult > > ,
521- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'findMany' , T , Options , ExtResult > > ;
512+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'findMany' , T , Options , ExtResult > > ;
522513
523514 /**
524515 * Returns a uniquely identified entity.
@@ -528,7 +519,7 @@ type CommonModelOperations<
528519 */
529520 findUnique < T extends CrudArgsType < Schema , Model , 'findUnique' , Options , ExtQueryArgs , ExtResult > > (
530521 args : SelectSubset < T , CrudArgsType < Schema , Model , 'findUnique' , Options , ExtQueryArgs , ExtResult > > ,
531- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'findUnique' , T , Options , ExtResult > > ;
522+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'findUnique' , T , Options , ExtResult > > ;
532523
533524 /**
534525 * Returns a uniquely identified entity or throws `NotFoundError` if not found.
@@ -538,7 +529,7 @@ type CommonModelOperations<
538529 */
539530 findUniqueOrThrow < T extends CrudArgsType < Schema , Model , 'findUniqueOrThrow' , Options , ExtQueryArgs , ExtResult > > (
540531 args : SelectSubset < T , CrudArgsType < Schema , Model , 'findUniqueOrThrow' , Options , ExtQueryArgs , ExtResult > > ,
541- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'findUniqueOrThrow' , T , Options , ExtResult > > ;
532+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'findUniqueOrThrow' , T , Options , ExtResult > > ;
542533
543534 /**
544535 * Returns the first entity.
@@ -548,7 +539,7 @@ type CommonModelOperations<
548539 */
549540 findFirst < T extends CrudArgsType < Schema , Model , 'findFirst' , Options , ExtQueryArgs , ExtResult > > (
550541 args ?: SelectSubset < T , CrudArgsType < Schema , Model , 'findFirst' , Options , ExtQueryArgs , ExtResult > > ,
551- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'findFirst' , T , Options , ExtResult > > ;
542+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'findFirst' , T , Options , ExtResult > > ;
552543
553544 /**
554545 * Returns the first entity or throws `NotFoundError` if not found.
@@ -558,7 +549,7 @@ type CommonModelOperations<
558549 */
559550 findFirstOrThrow < T extends CrudArgsType < Schema , Model , 'findFirstOrThrow' , Options , ExtQueryArgs , ExtResult > > (
560551 args ?: SelectSubset < T , CrudArgsType < Schema , Model , 'findFirstOrThrow' , Options , ExtQueryArgs , ExtResult > > ,
561- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'findFirstOrThrow' , T , Options , ExtResult > > ;
552+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'findFirstOrThrow' , T , Options , ExtResult > > ;
562553
563554 /**
564555 * Creates a new entity.
@@ -614,7 +605,7 @@ type CommonModelOperations<
614605 */
615606 create < T extends CrudArgsType < Schema , Model , 'create' , Options , ExtQueryArgs , ExtResult > > (
616607 args : SelectSubset < T , CrudArgsType < Schema , Model , 'create' , Options , ExtQueryArgs , ExtResult > > ,
617- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'create' , T , Options , ExtResult > > ;
608+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'create' , T , Options , ExtResult > > ;
618609
619610 /**
620611 * Creates multiple entities. Only scalar fields are allowed.
@@ -643,7 +634,7 @@ type CommonModelOperations<
643634 */
644635 createMany < T extends CrudArgsType < Schema , Model , 'createMany' , Options , ExtQueryArgs , ExtResult > > (
645636 args ?: SelectSubset < T , CrudArgsType < Schema , Model , 'createMany' , Options , ExtQueryArgs , ExtResult > > ,
646- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'createMany' , T , Options , ExtResult > > ;
637+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'createMany' , T , Options , ExtResult > > ;
647638
648639 /**
649640 * Updates a uniquely identified entity.
@@ -764,7 +755,7 @@ type CommonModelOperations<
764755 */
765756 update < T extends CrudArgsType < Schema , Model , 'update' , Options , ExtQueryArgs , ExtResult > > (
766757 args : SelectSubset < T , CrudArgsType < Schema , Model , 'update' , Options , ExtQueryArgs , ExtResult > > ,
767- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'update' , T , Options , ExtResult > > ;
758+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'update' , T , Options , ExtResult > > ;
768759
769760 /**
770761 * Updates multiple entities.
@@ -788,7 +779,7 @@ type CommonModelOperations<
788779 */
789780 updateMany < T extends CrudArgsType < Schema , Model , 'updateMany' , Options , ExtQueryArgs , ExtResult > > (
790781 args : Subset < T , CrudArgsType < Schema , Model , 'updateMany' , Options , ExtQueryArgs , ExtResult > > ,
791- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'updateMany' , T , Options , ExtResult > > ;
782+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'updateMany' , T , Options , ExtResult > > ;
792783
793784 /**
794785 * Creates or updates an entity.
@@ -812,7 +803,7 @@ type CommonModelOperations<
812803 */
813804 upsert < T extends CrudArgsType < Schema , Model , 'upsert' , Options , ExtQueryArgs , ExtResult > > (
814805 args : SelectSubset < T , CrudArgsType < Schema , Model , 'upsert' , Options , ExtQueryArgs , ExtResult > > ,
815- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'upsert' , T , Options , ExtResult > > ;
806+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'upsert' , T , Options , ExtResult > > ;
816807
817808 /**
818809 * Deletes a uniquely identifiable entity.
@@ -835,7 +826,7 @@ type CommonModelOperations<
835826 */
836827 delete < T extends CrudArgsType < Schema , Model , 'delete' , Options , ExtQueryArgs , ExtResult > > (
837828 args : SelectSubset < T , CrudArgsType < Schema , Model , 'delete' , Options , ExtQueryArgs , ExtResult > > ,
838- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'delete' , T , Options , ExtResult > > ;
829+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'delete' , T , Options , ExtResult > > ;
839830
840831 /**
841832 * Deletes multiple entities.
@@ -858,7 +849,7 @@ type CommonModelOperations<
858849 */
859850 deleteMany < T extends CrudArgsType < Schema , Model , 'deleteMany' , Options , ExtQueryArgs , ExtResult > > (
860851 args ?: Subset < T , CrudArgsType < Schema , Model , 'deleteMany' , Options , ExtQueryArgs , ExtResult > > ,
861- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'deleteMany' , T , Options , ExtResult > > ;
852+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'deleteMany' , T , Options , ExtResult > > ;
862853
863854 /**
864855 * Counts rows or field values.
@@ -880,7 +871,7 @@ type CommonModelOperations<
880871 */
881872 count < T extends CrudArgsType < Schema , Model , 'count' , Options , ExtQueryArgs , ExtResult > > (
882873 args ?: Subset < T , CrudArgsType < Schema , Model , 'count' , Options , ExtQueryArgs , ExtResult > > ,
883- ) : ZenStackPromise < Schema , Simplify < CrudReturnType < Schema , Model , 'count' , T , Options , ExtResult > > > ;
874+ ) : ZenStackPromise < Simplify < CrudReturnType < Schema , Model , 'count' , T , Options , ExtResult > > > ;
884875
885876 /**
886877 * Aggregates rows.
@@ -901,7 +892,7 @@ type CommonModelOperations<
901892 */
902893 aggregate < T extends CrudArgsType < Schema , Model , 'aggregate' , Options , ExtQueryArgs , ExtResult > > (
903894 args : Subset < T , CrudArgsType < Schema , Model , 'aggregate' , Options , ExtQueryArgs , ExtResult > > ,
904- ) : ZenStackPromise < Schema , Simplify < CrudReturnType < Schema , Model , 'aggregate' , T , Options , ExtResult > > > ;
895+ ) : ZenStackPromise < Simplify < CrudReturnType < Schema , Model , 'aggregate' , T , Options , ExtResult > > > ;
905896
906897 /**
907898 * Groups rows by columns.
@@ -938,7 +929,7 @@ type CommonModelOperations<
938929 */
939930 groupBy < T extends CrudArgsType < Schema , Model , 'groupBy' , Options , ExtQueryArgs , ExtResult > > (
940931 args : Subset < T , CrudArgsType < Schema , Model , 'groupBy' , Options , ExtQueryArgs , ExtResult > > ,
941- ) : ZenStackPromise < Schema , Simplify < CrudReturnType < Schema , Model , 'groupBy' , T , Options , ExtResult > > > ;
932+ ) : ZenStackPromise < Simplify < CrudReturnType < Schema , Model , 'groupBy' , T , Options , ExtResult > > > ;
942933
943934 /**
944935 * Checks if an entity exists.
@@ -959,7 +950,7 @@ type CommonModelOperations<
959950 */
960951 exists < T extends CrudArgsType < Schema , Model , 'exists' , Options , ExtQueryArgs , ExtResult > > (
961952 args ?: Subset < T , CrudArgsType < Schema , Model , 'exists' , Options , ExtQueryArgs , ExtResult > > ,
962- ) : ZenStackPromise < Schema , CrudReturnType < Schema , Model , 'exists' , T , Options , ExtResult > > ;
953+ ) : ZenStackPromise < CrudReturnType < Schema , Model , 'exists' , T , Options , ExtResult > > ;
963954} ;
964955
965956export type OperationsRequiringCreate = 'create' | 'createMany' | 'createManyAndReturn' | 'upsert' ;
0 commit comments