@@ -24,6 +24,7 @@ import type {
2424 AggregateArgs ,
2525 AggregateResult ,
2626 BatchResult ,
27+ ClientOptions ,
2728 CountArgs ,
2829 CountResult ,
2930 CreateArgs ,
@@ -128,11 +129,14 @@ export type ModelMutationModelResult<
128129 Model extends GetModels < Schema > ,
129130 TArgs ,
130131 Array extends boolean = false ,
131- > = Omit < ModelMutationResult < SimplifiedModelResult < Schema , Model , TArgs , false , Array > , TArgs > , 'mutateAsync' > & {
132+ > = Omit <
133+ ModelMutationResult < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , TArgs , false , Array > , TArgs > ,
134+ 'mutateAsync'
135+ > & {
132136 mutateAsync < T extends TArgs > (
133137 args : T ,
134- options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , T , false , Array > , T > ,
135- ) : Promise < SimplifiedModelResult < Schema , Model , T , false , Array > > ;
138+ options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T , false , Array > , T > ,
139+ ) : Promise < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T , false , Array > > ;
136140} ;
137141
138142export type ClientHooks < Schema extends SchemaDef > = {
@@ -147,74 +151,78 @@ export type ModelQueryHooks<Schema extends SchemaDef, Model extends GetModels<Sc
147151 {
148152 useFindUnique < T extends FindUniqueArgs < Schema , Model > > (
149153 args : SelectSubset < T , FindUniqueArgs < Schema , Model > > ,
150- options ?: ModelQueryOptions < SimplifiedModelResult < Schema , Model , T > | null > ,
151- ) : ModelQueryResult < SimplifiedModelResult < Schema , Model , T > | null > ;
154+ options ?: ModelQueryOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > | null > ,
155+ ) : ModelQueryResult < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > | null > ;
152156
153157 useSuspenseFindUnique < T extends FindUniqueArgs < Schema , Model > > (
154158 args : SelectSubset < T , FindUniqueArgs < Schema , Model > > ,
155- options ?: ModelSuspenseQueryOptions < SimplifiedModelResult < Schema , Model , T > | null > ,
156- ) : ModelSuspenseQueryResult < SimplifiedModelResult < Schema , Model , T > | null > ;
159+ options ?: ModelSuspenseQueryOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > | null > ,
160+ ) : ModelSuspenseQueryResult < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > | null > ;
157161
158162 useFindFirst < T extends FindFirstArgs < Schema , Model > > (
159163 args ?: SelectSubset < T , FindFirstArgs < Schema , Model > > ,
160- options ?: ModelQueryOptions < SimplifiedModelResult < Schema , Model , T > | null > ,
161- ) : ModelQueryResult < SimplifiedModelResult < Schema , Model , T > | null > ;
164+ options ?: ModelQueryOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > | null > ,
165+ ) : ModelQueryResult < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > | null > ;
162166
163167 useSuspenseFindFirst < T extends FindFirstArgs < Schema , Model > > (
164168 args ?: SelectSubset < T , FindFirstArgs < Schema , Model > > ,
165- options ?: ModelSuspenseQueryOptions < SimplifiedModelResult < Schema , Model , T > | null > ,
166- ) : ModelSuspenseQueryResult < SimplifiedModelResult < Schema , Model , T > | null > ;
169+ options ?: ModelSuspenseQueryOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > | null > ,
170+ ) : ModelSuspenseQueryResult < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > | null > ;
167171
168172 useFindMany < T extends FindManyArgs < Schema , Model > > (
169173 args ?: SelectSubset < T , FindManyArgs < Schema , Model > > ,
170- options ?: ModelQueryOptions < SimplifiedModelResult < Schema , Model , T > [ ] > ,
171- ) : ModelQueryResult < SimplifiedModelResult < Schema , Model , T > [ ] > ;
174+ options ?: ModelQueryOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > [ ] > ,
175+ ) : ModelQueryResult < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > [ ] > ;
172176
173177 useSuspenseFindMany < T extends FindManyArgs < Schema , Model > > (
174178 args ?: SelectSubset < T , FindManyArgs < Schema , Model > > ,
175- options ?: ModelSuspenseQueryOptions < SimplifiedModelResult < Schema , Model , T > [ ] > ,
176- ) : ModelSuspenseQueryResult < SimplifiedModelResult < Schema , Model , T > [ ] > ;
179+ options ?: ModelSuspenseQueryOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > [ ] > ,
180+ ) : ModelSuspenseQueryResult < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > [ ] > ;
177181
178182 useInfiniteFindMany < T extends FindManyArgs < Schema , Model > > (
179183 args ?: SelectSubset < T , FindManyArgs < Schema , Model > > ,
180- options ?: ModelInfiniteQueryOptions < SimplifiedModelResult < Schema , Model , T > [ ] > ,
181- ) : ModelInfiniteQueryResult < InfiniteData < SimplifiedModelResult < Schema , Model , T > [ ] > > ;
184+ options ?: ModelInfiniteQueryOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > [ ] > ,
185+ ) : ModelInfiniteQueryResult < InfiniteData < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > [ ] > > ;
182186
183187 useSuspenseInfiniteFindMany < T extends FindManyArgs < Schema , Model > > (
184188 args ?: SelectSubset < T , FindManyArgs < Schema , Model > > ,
185- options ?: ModelSuspenseInfiniteQueryOptions < SimplifiedModelResult < Schema , Model , T > [ ] > ,
186- ) : ModelSuspenseInfiniteQueryResult < InfiniteData < SimplifiedModelResult < Schema , Model , T > [ ] > > ;
189+ options ?: ModelSuspenseInfiniteQueryOptions <
190+ SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > [ ]
191+ > ,
192+ ) : ModelSuspenseInfiniteQueryResult <
193+ InfiniteData < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > [ ] >
194+ > ;
187195
188196 useCreate < T extends CreateArgs < Schema , Model > > (
189- options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , T > , T > ,
197+ options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > , T > ,
190198 ) : ModelMutationModelResult < Schema , Model , T > ;
191199
192200 useCreateMany < T extends CreateManyArgs < Schema , Model > > (
193201 options ?: ModelMutationOptions < BatchResult , T > ,
194202 ) : ModelMutationResult < BatchResult , T > ;
195203
196204 useCreateManyAndReturn < T extends CreateManyAndReturnArgs < Schema , Model > > (
197- options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , T > [ ] , T > ,
205+ options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > [ ] , T > ,
198206 ) : ModelMutationModelResult < Schema , Model , T , true > ;
199207
200208 useUpdate < T extends UpdateArgs < Schema , Model > > (
201- options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , T > , T > ,
209+ options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > , T > ,
202210 ) : ModelMutationModelResult < Schema , Model , T > ;
203211
204212 useUpdateMany < T extends UpdateManyArgs < Schema , Model > > (
205213 options ?: ModelMutationOptions < BatchResult , T > ,
206214 ) : ModelMutationResult < BatchResult , T > ;
207215
208216 useUpdateManyAndReturn < T extends UpdateManyAndReturnArgs < Schema , Model > > (
209- options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , T > [ ] , T > ,
217+ options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > [ ] , T > ,
210218 ) : ModelMutationModelResult < Schema , Model , T , true > ;
211219
212220 useUpsert < T extends UpsertArgs < Schema , Model > > (
213- options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , T > , T > ,
221+ options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > , T > ,
214222 ) : ModelMutationModelResult < Schema , Model , T > ;
215223
216224 useDelete < T extends DeleteArgs < Schema , Model > > (
217- options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , T > , T > ,
225+ options ?: ModelMutationOptions < SimplifiedModelResult < Schema , Model , ClientOptions < Schema > , T > , T > ,
218226 ) : ModelMutationModelResult < Schema , Model , T > ;
219227
220228 useDeleteMany < T extends DeleteManyArgs < Schema , Model > > (
0 commit comments