11// This file is auto-generated by @hey-api/openapi-ts
22
3- import type { Client , Options as Options2 , TDataShape } from './client' ;
3+ import type {
4+ Client ,
5+ Options as Options2 ,
6+ RequestResult ,
7+ TDataShape ,
8+ } from './client' ;
49import { client } from './client.gen' ;
510import type {
611 AddPetData ,
@@ -86,7 +91,7 @@ export type Options<
8691 */
8792export const addPet = < ThrowOnError extends boolean = true > (
8893 options : Options < AddPetData , ThrowOnError > ,
89- ) =>
94+ ) : RequestResult < AddPetResponses , AddPetErrors , ThrowOnError , 'data' > =>
9095 ( options . client ?? client ) . post <
9196 AddPetResponses ,
9297 AddPetErrors ,
@@ -115,7 +120,7 @@ export const addPet = <ThrowOnError extends boolean = true>(
115120 */
116121export const updatePet = < ThrowOnError extends boolean = true > (
117122 options : Options < UpdatePetData , ThrowOnError > ,
118- ) =>
123+ ) : RequestResult < UpdatePetResponses , UpdatePetErrors , ThrowOnError , 'data' > =>
119124 ( options . client ?? client ) . put <
120125 UpdatePetResponses ,
121126 UpdatePetErrors ,
@@ -144,7 +149,12 @@ export const updatePet = <ThrowOnError extends boolean = true>(
144149 */
145150export const findPetsByStatus = < ThrowOnError extends boolean = true > (
146151 options : Options < FindPetsByStatusData , ThrowOnError > ,
147- ) =>
152+ ) : RequestResult <
153+ FindPetsByStatusResponses ,
154+ FindPetsByStatusErrors ,
155+ ThrowOnError ,
156+ 'data'
157+ > =>
148158 ( options . client ?? client ) . get <
149159 FindPetsByStatusResponses ,
150160 FindPetsByStatusErrors ,
@@ -169,7 +179,12 @@ export const findPetsByStatus = <ThrowOnError extends boolean = true>(
169179 */
170180export const findPetsByTags = < ThrowOnError extends boolean = true > (
171181 options : Options < FindPetsByTagsData , ThrowOnError > ,
172- ) =>
182+ ) : RequestResult <
183+ FindPetsByTagsResponses ,
184+ FindPetsByTagsErrors ,
185+ ThrowOnError ,
186+ 'data'
187+ > =>
173188 ( options . client ?? client ) . get <
174189 FindPetsByTagsResponses ,
175190 FindPetsByTagsErrors ,
@@ -194,7 +209,7 @@ export const findPetsByTags = <ThrowOnError extends boolean = true>(
194209 */
195210export const deletePet = < ThrowOnError extends boolean = true > (
196211 options : Options < DeletePetData , ThrowOnError > ,
197- ) =>
212+ ) : RequestResult < DeletePetResponses , DeletePetErrors , ThrowOnError , 'data' > =>
198213 ( options . client ?? client ) . delete <
199214 DeletePetResponses ,
200215 DeletePetErrors ,
@@ -219,7 +234,7 @@ export const deletePet = <ThrowOnError extends boolean = true>(
219234 */
220235export const getPetById = < ThrowOnError extends boolean = true > (
221236 options : Options < GetPetByIdData , ThrowOnError > ,
222- ) =>
237+ ) : RequestResult < GetPetByIdResponses , GetPetByIdErrors , ThrowOnError , 'data' > =>
223238 ( options . client ?? client ) . get <
224239 GetPetByIdResponses ,
225240 GetPetByIdErrors ,
@@ -248,7 +263,12 @@ export const getPetById = <ThrowOnError extends boolean = true>(
248263 */
249264export const updatePetWithForm = < ThrowOnError extends boolean = true > (
250265 options : Options < UpdatePetWithFormData , ThrowOnError > ,
251- ) =>
266+ ) : RequestResult <
267+ UpdatePetWithFormResponses ,
268+ UpdatePetWithFormErrors ,
269+ ThrowOnError ,
270+ 'data'
271+ > =>
252272 ( options . client ?? client ) . post <
253273 UpdatePetWithFormResponses ,
254274 UpdatePetWithFormErrors ,
@@ -273,7 +293,7 @@ export const updatePetWithForm = <ThrowOnError extends boolean = true>(
273293 */
274294export const uploadFile = < ThrowOnError extends boolean = true > (
275295 options : Options < UploadFileData , ThrowOnError > ,
276- ) =>
296+ ) : RequestResult < UploadFileResponses , UploadFileErrors , ThrowOnError , 'data' > =>
277297 ( options . client ?? client ) . post <
278298 UploadFileResponses ,
279299 UploadFileErrors ,
@@ -303,7 +323,12 @@ export const uploadFile = <ThrowOnError extends boolean = true>(
303323 */
304324export const getInventory = < ThrowOnError extends boolean = true > (
305325 options ?: Options < GetInventoryData , ThrowOnError > ,
306- ) =>
326+ ) : RequestResult <
327+ GetInventoryResponses ,
328+ GetInventoryErrors ,
329+ ThrowOnError ,
330+ 'data'
331+ > =>
307332 ( options ?. client ?? client ) . get <
308333 GetInventoryResponses ,
309334 GetInventoryErrors ,
@@ -328,7 +353,7 @@ export const getInventory = <ThrowOnError extends boolean = true>(
328353 */
329354export const placeOrder = < ThrowOnError extends boolean = true > (
330355 options ?: Options < PlaceOrderData , ThrowOnError > ,
331- ) =>
356+ ) : RequestResult < PlaceOrderResponses , PlaceOrderErrors , ThrowOnError , 'data' > =>
332357 ( options ?. client ?? client ) . post <
333358 PlaceOrderResponses ,
334359 PlaceOrderErrors ,
@@ -351,7 +376,12 @@ export const placeOrder = <ThrowOnError extends boolean = true>(
351376 */
352377export const deleteOrder = < ThrowOnError extends boolean = true > (
353378 options : Options < DeleteOrderData , ThrowOnError > ,
354- ) =>
379+ ) : RequestResult <
380+ DeleteOrderResponses ,
381+ DeleteOrderErrors ,
382+ ThrowOnError ,
383+ 'data'
384+ > =>
355385 ( options . client ?? client ) . delete <
356386 DeleteOrderResponses ,
357387 DeleteOrderErrors ,
@@ -370,7 +400,12 @@ export const deleteOrder = <ThrowOnError extends boolean = true>(
370400 */
371401export const getOrderById = < ThrowOnError extends boolean = true > (
372402 options : Options < GetOrderByIdData , ThrowOnError > ,
373- ) =>
403+ ) : RequestResult <
404+ GetOrderByIdResponses ,
405+ GetOrderByIdErrors ,
406+ ThrowOnError ,
407+ 'data'
408+ > =>
374409 ( options . client ?? client ) . get <
375410 GetOrderByIdResponses ,
376411 GetOrderByIdErrors ,
@@ -389,7 +424,7 @@ export const getOrderById = <ThrowOnError extends boolean = true>(
389424 */
390425export const createUser = < ThrowOnError extends boolean = true > (
391426 options ?: Options < CreateUserData , ThrowOnError > ,
392- ) =>
427+ ) : RequestResult < CreateUserResponses , CreateUserErrors , ThrowOnError , 'data' > =>
393428 ( options ?. client ?? client ) . post <
394429 CreateUserResponses ,
395430 CreateUserErrors ,
@@ -412,7 +447,12 @@ export const createUser = <ThrowOnError extends boolean = true>(
412447 */
413448export const createUsersWithListInput = < ThrowOnError extends boolean = true > (
414449 options ?: Options < CreateUsersWithListInputData , ThrowOnError > ,
415- ) =>
450+ ) : RequestResult <
451+ CreateUsersWithListInputResponses ,
452+ CreateUsersWithListInputErrors ,
453+ ThrowOnError ,
454+ 'data'
455+ > =>
416456 ( options ?. client ?? client ) . post <
417457 CreateUsersWithListInputResponses ,
418458 CreateUsersWithListInputErrors ,
@@ -435,7 +475,7 @@ export const createUsersWithListInput = <ThrowOnError extends boolean = true>(
435475 */
436476export const loginUser = < ThrowOnError extends boolean = true > (
437477 options ?: Options < LoginUserData , ThrowOnError > ,
438- ) =>
478+ ) : RequestResult < LoginUserResponses , LoginUserErrors , ThrowOnError , 'data' > =>
439479 ( options ?. client ?? client ) . get <
440480 LoginUserResponses ,
441481 LoginUserErrors ,
@@ -454,7 +494,7 @@ export const loginUser = <ThrowOnError extends boolean = true>(
454494 */
455495export const logoutUser = < ThrowOnError extends boolean = true > (
456496 options ?: Options < LogoutUserData , ThrowOnError > ,
457- ) =>
497+ ) : RequestResult < LogoutUserResponses , LogoutUserErrors , ThrowOnError , 'data' > =>
458498 ( options ?. client ?? client ) . get <
459499 LogoutUserResponses ,
460500 LogoutUserErrors ,
@@ -473,7 +513,7 @@ export const logoutUser = <ThrowOnError extends boolean = true>(
473513 */
474514export const deleteUser = < ThrowOnError extends boolean = true > (
475515 options : Options < DeleteUserData , ThrowOnError > ,
476- ) =>
516+ ) : RequestResult < DeleteUserResponses , DeleteUserErrors , ThrowOnError , 'data' > =>
477517 ( options . client ?? client ) . delete <
478518 DeleteUserResponses ,
479519 DeleteUserErrors ,
@@ -492,7 +532,12 @@ export const deleteUser = <ThrowOnError extends boolean = true>(
492532 */
493533export const getUserByName = < ThrowOnError extends boolean = true > (
494534 options : Options < GetUserByNameData , ThrowOnError > ,
495- ) =>
535+ ) : RequestResult <
536+ GetUserByNameResponses ,
537+ GetUserByNameErrors ,
538+ ThrowOnError ,
539+ 'data'
540+ > =>
496541 ( options . client ?? client ) . get <
497542 GetUserByNameResponses ,
498543 GetUserByNameErrors ,
@@ -511,7 +556,7 @@ export const getUserByName = <ThrowOnError extends boolean = true>(
511556 */
512557export const updateUser = < ThrowOnError extends boolean = true > (
513558 options : Options < UpdateUserData , ThrowOnError > ,
514- ) =>
559+ ) : RequestResult < UpdateUserResponses , UpdateUserErrors , ThrowOnError , 'data' > =>
515560 ( options . client ?? client ) . put <
516561 UpdateUserResponses ,
517562 UpdateUserErrors ,
0 commit comments