@@ -163,8 +163,8 @@ export const relationship = <TData extends RelationshipDataSchema>(
163
163
164
164
type ParseDataRequestOptions <
165
165
TType extends string ,
166
- TAttributesSchema extends z . SomeZodObject | undefined ,
167
- TRelationshipsSchema extends z . SomeZodObject | undefined ,
166
+ TAttributesSchema extends z . ZodTypeAny | undefined ,
167
+ TRelationshipsSchema extends z . ZodTypeAny | undefined ,
168
168
> = {
169
169
type : TType ;
170
170
attributesSchema ?: TAttributesSchema ;
@@ -174,13 +174,13 @@ type ParseDataRequestOptions<
174
174
type ParseDataRequestResult <
175
175
TIdSchema extends z . ZodType < unknown > ,
176
176
TType extends string ,
177
- TAttributesSchema extends z . SomeZodObject | undefined ,
178
- TRelationshipsSchema extends z . SomeZodObject | undefined ,
177
+ TAttributesSchema extends z . ZodTypeAny | undefined ,
178
+ TRelationshipsSchema extends z . ZodTypeAny | undefined ,
179
179
> = {
180
180
id : z . output < TIdSchema > ;
181
181
type : TType ;
182
- attributes : TAttributesSchema extends z . SomeZodObject ? z . output < TAttributesSchema > : undefined ;
183
- relationships : TRelationshipsSchema extends z . SomeZodObject
182
+ attributes : TAttributesSchema extends z . ZodTypeAny ? z . output < TAttributesSchema > : undefined ;
183
+ relationships : TRelationshipsSchema extends z . ZodTypeAny
184
184
? z . output < TRelationshipsSchema >
185
185
: undefined ;
186
186
} ;
@@ -231,8 +231,8 @@ const validateContentType = (context: Context): void => {
231
231
const parseDataRequest = <
232
232
TIdSchema extends z . ZodType < unknown > ,
233
233
TType extends string ,
234
- TAttributesSchema extends z . SomeZodObject | undefined ,
235
- TRelationshipsSchema extends z . SomeZodObject | undefined ,
234
+ TAttributesSchema extends z . ZodTypeAny | undefined ,
235
+ TRelationshipsSchema extends z . ZodTypeAny | undefined ,
236
236
> (
237
237
idSchema : TIdSchema ,
238
238
koaContext : Context ,
@@ -246,10 +246,10 @@ const parseDataRequest = <
246
246
id : idSchema as z . ZodType < unknown > ,
247
247
type : fixedTypeSchema ( options . type ) as z . ZodType < unknown > ,
248
248
attributes : options . attributesSchema
249
- ? ( options . attributesSchema as z . SomeZodObject )
249
+ ? ( options . attributesSchema as z . ZodTypeAny )
250
250
: z . undefined ( ) ,
251
251
relationships : options . relationshipsSchema
252
- ? ( options . relationshipsSchema as z . SomeZodObject )
252
+ ? ( options . relationshipsSchema as z . ZodTypeAny )
253
253
: z . undefined ( ) ,
254
254
} ) ,
255
255
} )
@@ -262,26 +262,26 @@ const parseDataRequest = <
262
262
return {
263
263
id : parseResult . data . data . id ,
264
264
type : parseResult . data . data . type as TType ,
265
- attributes : parseResult . data . data . attributes as TAttributesSchema extends z . SomeZodObject
265
+ attributes : parseResult . data . data . attributes as TAttributesSchema extends z . ZodTypeAny
266
266
? z . output < TAttributesSchema >
267
267
: undefined ,
268
268
relationships : parseResult . data . data
269
- . relationships as TRelationshipsSchema extends z . SomeZodObject
269
+ . relationships as TRelationshipsSchema extends z . ZodTypeAny
270
270
? z . output < TRelationshipsSchema >
271
271
: undefined ,
272
272
} ;
273
273
} ;
274
274
275
275
export type ParseCreateRequestOptions <
276
276
TType extends string ,
277
- TAttributesSchema extends z . SomeZodObject | undefined ,
278
- TRelationshipsSchema extends z . SomeZodObject | undefined ,
277
+ TAttributesSchema extends z . ZodTypeAny | undefined ,
278
+ TRelationshipsSchema extends z . ZodTypeAny | undefined ,
279
279
> = ParseDataRequestOptions < TType , TAttributesSchema , TRelationshipsSchema > ;
280
280
281
281
export type ParseCreateRequestResult <
282
282
TType extends string ,
283
- TAttributesSchema extends z . SomeZodObject | undefined ,
284
- TRelationshipsSchema extends z . SomeZodObject | undefined ,
283
+ TAttributesSchema extends z . ZodTypeAny | undefined ,
284
+ TRelationshipsSchema extends z . ZodTypeAny | undefined ,
285
285
> = ParseDataRequestResult <
286
286
z . ZodOptional < z . ZodString > ,
287
287
TType ,
@@ -293,8 +293,8 @@ export type ParseCreateRequestResult<
293
293
294
294
export const parseCreateRequest = <
295
295
TType extends string ,
296
- TAttributesSchema extends z . SomeZodObject | undefined ,
297
- TRelationshipsSchema extends z . SomeZodObject | undefined ,
296
+ TAttributesSchema extends z . ZodTypeAny | undefined ,
297
+ TRelationshipsSchema extends z . ZodTypeAny | undefined ,
298
298
> (
299
299
koaContext : Context ,
300
300
options : ParseCreateRequestOptions < TType , TAttributesSchema , TRelationshipsSchema > ,
@@ -304,24 +304,24 @@ export const parseCreateRequest = <
304
304
305
305
export type ParseUpdateRequestOptions <
306
306
TType extends string ,
307
- TAttributesSchema extends z . SomeZodObject | undefined ,
308
- TRelationshipsSchema extends z . SomeZodObject | undefined ,
307
+ TAttributesSchema extends z . ZodTypeAny | undefined ,
308
+ TRelationshipsSchema extends z . ZodTypeAny | undefined ,
309
309
> = ParseDataRequestOptions < TType , TAttributesSchema , TRelationshipsSchema > ;
310
310
311
311
export type ParseUpdateRequestResult <
312
312
TId extends string ,
313
313
TType extends string ,
314
- TAttributesSchema extends z . SomeZodObject | undefined ,
315
- TRelationshipsSchema extends z . SomeZodObject | undefined ,
314
+ TAttributesSchema extends z . ZodTypeAny | undefined ,
315
+ TRelationshipsSchema extends z . ZodTypeAny | undefined ,
316
316
> = ParseDataRequestResult < z . ZodType < TId > , TType , TAttributesSchema , TRelationshipsSchema > & {
317
317
id : TId ;
318
318
} ;
319
319
320
320
export const parseUpdateRequest = <
321
321
TId extends string ,
322
322
TType extends string ,
323
- TAttributesSchema extends z . SomeZodObject | undefined ,
324
- TRelationshipsSchema extends z . SomeZodObject | undefined ,
323
+ TAttributesSchema extends z . ZodTypeAny | undefined ,
324
+ TRelationshipsSchema extends z . ZodTypeAny | undefined ,
325
325
> (
326
326
id : TId ,
327
327
koaContext : Context ,
0 commit comments