Skip to content

Commit 2d740f1

Browse files
ymc9Copilot
andauthored
feat(orm): implement field omission (#441)
* feat: implement field omission * Update tests/e2e/orm/client-api/omit.test.ts Co-authored-by: Copilot <[email protected]> * fix build * fix build * fix build * update sample * fix tests * update --------- Co-authored-by: Copilot <[email protected]>
1 parent a4a1162 commit 2d740f1

File tree

39 files changed

+1046
-476
lines changed

39 files changed

+1046
-476
lines changed

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
- [x] Error system
8686
- [x] Custom table name
8787
- [x] Custom field name
88-
- [ ] Global omit
88+
- [x] Global omit
8989
- [ ] DbNull vs JsonNull
9090
- [ ] Migrate to tsdown
9191
- [x] @default validation

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "zenstack-v3",
33
"version": "3.0.0-beta.26",
44
"description": "ZenStack",
5-
"packageManager": "pnpm@10.20.0",
5+
"packageManager": "pnpm@10.23.0",
66
"scripts": {
77
"build": "turbo run build",
88
"watch": "turbo run watch build",
@@ -25,14 +25,14 @@
2525
"eslint": "~9.29.0",
2626
"glob": "^11.0.2",
2727
"prettier": "^3.5.3",
28+
"prisma": "catalog:",
2829
"tsup": "^8.5.0",
2930
"tsx": "^4.20.3",
3031
"turbo": "^2.5.4",
3132
"typescript": "catalog:",
3233
"typescript-eslint": "^8.34.1",
3334
"vitest": "^3.2.4",
34-
"yaml": "^2.8.0",
35-
"prisma": "catalog:"
35+
"yaml": "^2.8.0"
3636
},
3737
"pnpm": {
3838
"onlyBuiltDependencies": [

packages/clients/tanstack-query/src/react.ts

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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

138142
export 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>>(

packages/clients/tanstack-query/src/svelte.ts

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import type {
2020
AggregateArgs,
2121
AggregateResult,
2222
BatchResult,
23+
ClientOptions,
2324
CountArgs,
2425
CountResult,
2526
CreateArgs,
@@ -118,13 +119,18 @@ export type ModelMutationModelResult<
118119
Array extends boolean = false,
119120
> = Readable<
120121
Omit<
121-
UnwrapStore<ModelMutationResult<SimplifiedModelResult<Schema, Model, TArgs, false, Array>, TArgs>>,
122+
UnwrapStore<
123+
ModelMutationResult<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, TArgs, false, Array>, TArgs>
124+
>,
122125
'mutateAsync'
123126
> & {
124127
mutateAsync<T extends TArgs>(
125128
args: T,
126-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T, false, Array>, T>,
127-
): Promise<SimplifiedModelResult<Schema, Model, T, false, Array>>;
129+
options?: ModelMutationOptions<
130+
SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T, false, Array>,
131+
T
132+
>,
133+
): Promise<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T, false, Array>>;
128134
}
129135
>;
130136

@@ -140,54 +146,54 @@ export type ModelQueryHooks<Schema extends SchemaDef, Model extends GetModels<Sc
140146
{
141147
useFindUnique<T extends FindUniqueArgs<Schema, Model>>(
142148
args: SelectSubset<T, FindUniqueArgs<Schema, Model>>,
143-
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, T> | null>,
144-
): ModelQueryResult<SimplifiedModelResult<Schema, Model, T> | null>;
149+
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T> | null>,
150+
): ModelQueryResult<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T> | null>;
145151

146152
useFindFirst<T extends FindFirstArgs<Schema, Model>>(
147153
args?: SelectSubset<T, FindFirstArgs<Schema, Model>>,
148-
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, T> | null>,
149-
): 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>;
150156

151157
useFindMany<T extends FindManyArgs<Schema, Model>>(
152158
args?: SelectSubset<T, FindManyArgs<Schema, Model>>,
153-
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, T>[]>,
154-
): ModelQueryResult<SimplifiedModelResult<Schema, Model, T>[]>;
159+
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[]>,
160+
): ModelQueryResult<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[]>;
155161

156162
useInfiniteFindMany<T extends FindManyArgs<Schema, Model>>(
157163
args?: SelectSubset<T, FindManyArgs<Schema, Model>>,
158-
options?: ModelInfiniteQueryOptions<SimplifiedModelResult<Schema, Model, T>[]>,
159-
): ModelInfiniteQueryResult<InfiniteData<SimplifiedModelResult<Schema, Model, T>[]>>;
164+
options?: ModelInfiniteQueryOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[]>,
165+
): ModelInfiniteQueryResult<InfiniteData<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[]>>;
160166

161167
useCreate<T extends CreateArgs<Schema, Model>>(
162-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>, T>,
168+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>, T>,
163169
): ModelMutationModelResult<Schema, Model, T>;
164170

165171
useCreateMany<T extends CreateManyArgs<Schema, Model>>(
166172
options?: ModelMutationOptions<BatchResult, T>,
167173
): ModelMutationResult<BatchResult, T>;
168174

169175
useCreateManyAndReturn<T extends CreateManyAndReturnArgs<Schema, Model>>(
170-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>[], T>,
176+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[], T>,
171177
): ModelMutationModelResult<Schema, Model, T, true>;
172178

173179
useUpdate<T extends UpdateArgs<Schema, Model>>(
174-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>, T>,
180+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>, T>,
175181
): ModelMutationModelResult<Schema, Model, T>;
176182

177183
useUpdateMany<T extends UpdateManyArgs<Schema, Model>>(
178184
options?: ModelMutationOptions<BatchResult, T>,
179185
): ModelMutationResult<BatchResult, T>;
180186

181187
useUpdateManyAndReturn<T extends UpdateManyAndReturnArgs<Schema, Model>>(
182-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>[], T>,
188+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[], T>,
183189
): ModelMutationModelResult<Schema, Model, T, true>;
184190

185191
useUpsert<T extends UpsertArgs<Schema, Model>>(
186-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>, T>,
192+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>, T>,
187193
): ModelMutationModelResult<Schema, Model, T>;
188194

189195
useDelete<T extends DeleteArgs<Schema, Model>>(
190-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>, T>,
196+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>, T>,
191197
): ModelMutationModelResult<Schema, Model, T>;
192198

193199
useDeleteMany<T extends DeleteManyArgs<Schema, Model>>(

packages/clients/tanstack-query/src/vue.ts

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import type {
1818
AggregateArgs,
1919
AggregateResult,
2020
BatchResult,
21+
ClientOptions,
2122
CountArgs,
2223
CountResult,
2324
CreateArgs,
@@ -105,11 +106,14 @@ export type ModelMutationModelResult<
105106
Model extends GetModels<Schema>,
106107
TArgs,
107108
Array extends boolean = false,
108-
> = Omit<ModelMutationResult<SimplifiedModelResult<Schema, Model, TArgs, false, Array>, TArgs>, 'mutateAsync'> & {
109+
> = Omit<
110+
ModelMutationResult<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, TArgs, false, Array>, TArgs>,
111+
'mutateAsync'
112+
> & {
109113
mutateAsync<T extends TArgs>(
110114
args: T,
111-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T, false, Array>, T>,
112-
): Promise<SimplifiedModelResult<Schema, Model, T, false, Array>>;
115+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T, false, Array>, T>,
116+
): Promise<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T, false, Array>>;
113117
};
114118

115119
export type ClientHooks<Schema extends SchemaDef> = {
@@ -124,54 +128,54 @@ export type ModelQueryHooks<Schema extends SchemaDef, Model extends GetModels<Sc
124128
{
125129
useFindUnique<T extends FindUniqueArgs<Schema, Model>>(
126130
args: SelectSubset<T, FindUniqueArgs<Schema, Model>>,
127-
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, T> | null>,
128-
): ModelQueryResult<SimplifiedModelResult<Schema, Model, T> | null>;
131+
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T> | null>,
132+
): ModelQueryResult<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T> | null>;
129133

130134
useFindFirst<T extends FindFirstArgs<Schema, Model>>(
131135
args?: SelectSubset<T, FindFirstArgs<Schema, Model>>,
132-
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, T> | null>,
133-
): ModelQueryResult<SimplifiedModelResult<Schema, Model, T> | null>;
136+
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T> | null>,
137+
): ModelQueryResult<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T> | null>;
134138

135139
useFindMany<T extends FindManyArgs<Schema, Model>>(
136140
args?: SelectSubset<T, FindManyArgs<Schema, Model>>,
137-
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, T>[]>,
138-
): ModelQueryResult<SimplifiedModelResult<Schema, Model, T>[]>;
141+
options?: ModelQueryOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[]>,
142+
): ModelQueryResult<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[]>;
139143

140144
useInfiniteFindMany<T extends FindManyArgs<Schema, Model>>(
141145
args?: SelectSubset<T, FindManyArgs<Schema, Model>>,
142-
options?: ModelInfiniteQueryOptions<SimplifiedModelResult<Schema, Model, T>[]>,
143-
): ModelInfiniteQueryResult<InfiniteData<SimplifiedModelResult<Schema, Model, T>[]>>;
146+
options?: ModelInfiniteQueryOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[]>,
147+
): ModelInfiniteQueryResult<InfiniteData<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[]>>;
144148

145149
useCreate<T extends CreateArgs<Schema, Model>>(
146-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>, T>,
150+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>, T>,
147151
): ModelMutationModelResult<Schema, Model, T>;
148152

149153
useCreateMany<T extends CreateManyArgs<Schema, Model>>(
150154
options?: ModelMutationOptions<BatchResult, T>,
151155
): ModelMutationResult<BatchResult, T>;
152156

153157
useCreateManyAndReturn<T extends CreateManyAndReturnArgs<Schema, Model>>(
154-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>[], T>,
158+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[], T>,
155159
): ModelMutationModelResult<Schema, Model, T, true>;
156160

157161
useUpdate<T extends UpdateArgs<Schema, Model>>(
158-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>, T>,
162+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>, T>,
159163
): ModelMutationModelResult<Schema, Model, T>;
160164

161165
useUpdateMany<T extends UpdateManyArgs<Schema, Model>>(
162166
options?: ModelMutationOptions<BatchResult, T>,
163167
): ModelMutationResult<BatchResult, T>;
164168

165169
useUpdateManyAndReturn<T extends UpdateManyAndReturnArgs<Schema, Model>>(
166-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>[], T>,
170+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>[], T>,
167171
): ModelMutationModelResult<Schema, Model, T, true>;
168172

169173
useUpsert<T extends UpsertArgs<Schema, Model>>(
170-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>, T>,
174+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>, T>,
171175
): ModelMutationModelResult<Schema, Model, T>;
172176

173177
useDelete<T extends DeleteArgs<Schema, Model>>(
174-
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, T>, T>,
178+
options?: ModelMutationOptions<SimplifiedModelResult<Schema, Model, ClientOptions<Schema>, T>, T>,
175179
): ModelMutationModelResult<Schema, Model, T>;
176180

177181
useDeleteMany<T extends DeleteManyArgs<Schema, Model>>(

0 commit comments

Comments
 (0)