fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>

+973 -741
+38 -19
examples/openapi-ts-angular-common/src/client/@angular/common.gen.ts
··· 48 48 */ 49 49 export const addPetRequest = <ThrowOnError extends boolean = false>( 50 50 options: Options<AddPetData, ThrowOnError>, 51 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 51 + ): HttpRequest<unknown> => 52 + (options?.client ?? client).requestOptions({ 52 53 method: 'POST', 53 54 responseStyle: 'data', 54 55 url: '/pet', ··· 62 63 */ 63 64 export const updatePetRequest = <ThrowOnError extends boolean = false>( 64 65 options: Options<UpdatePetData, ThrowOnError>, 65 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 66 + ): HttpRequest<unknown> => 67 + (options?.client ?? client).requestOptions({ 66 68 method: 'PUT', 67 69 responseStyle: 'data', 68 70 url: '/pet', ··· 76 78 */ 77 79 export const findPetsByStatusRequest = <ThrowOnError extends boolean = false>( 78 80 options: Options<FindPetsByStatusData, ThrowOnError>, 79 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 81 + ): HttpRequest<unknown> => 82 + (options?.client ?? client).requestOptions({ 80 83 method: 'GET', 81 84 responseStyle: 'data', 82 85 url: '/pet/findByStatus', ··· 90 93 */ 91 94 export const findPetsByTagsRequest = <ThrowOnError extends boolean = false>( 92 95 options: Options<FindPetsByTagsData, ThrowOnError>, 93 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 96 + ): HttpRequest<unknown> => 97 + (options?.client ?? client).requestOptions({ 94 98 method: 'GET', 95 99 responseStyle: 'data', 96 100 url: '/pet/findByTags', ··· 104 108 */ 105 109 export const deletePetRequest = <ThrowOnError extends boolean = false>( 106 110 options: Options<DeletePetData, ThrowOnError>, 107 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 111 + ): HttpRequest<unknown> => 112 + (options?.client ?? client).requestOptions({ 108 113 method: 'DELETE', 109 114 responseStyle: 'data', 110 115 url: '/pet/{petId}', ··· 118 123 */ 119 124 export const getPetByIdRequest = <ThrowOnError extends boolean = false>( 120 125 options: Options<GetPetByIdData, ThrowOnError>, 121 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 126 + ): HttpRequest<unknown> => 127 + (options?.client ?? client).requestOptions({ 122 128 method: 'GET', 123 129 responseStyle: 'data', 124 130 url: '/pet/{petId}', ··· 132 138 */ 133 139 export const updatePetWithFormRequest = <ThrowOnError extends boolean = false>( 134 140 options: Options<UpdatePetWithFormData, ThrowOnError>, 135 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 141 + ): HttpRequest<unknown> => 142 + (options?.client ?? client).requestOptions({ 136 143 method: 'POST', 137 144 responseStyle: 'data', 138 145 url: '/pet/{petId}', ··· 146 153 */ 147 154 export const uploadFileRequest = <ThrowOnError extends boolean = false>( 148 155 options: Options<UploadFileData, ThrowOnError>, 149 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 156 + ): HttpRequest<unknown> => 157 + (options?.client ?? client).requestOptions({ 150 158 method: 'POST', 151 159 responseStyle: 'data', 152 160 url: '/pet/{petId}/uploadImage', ··· 160 168 */ 161 169 export const getInventoryRequest = <ThrowOnError extends boolean = false>( 162 170 options?: Options<GetInventoryData, ThrowOnError>, 163 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 171 + ): HttpRequest<unknown> => 172 + (options?.client ?? client).requestOptions({ 164 173 method: 'GET', 165 174 responseStyle: 'data', 166 175 url: '/store/inventory', ··· 174 183 */ 175 184 export const placeOrderRequest = <ThrowOnError extends boolean = false>( 176 185 options?: Options<PlaceOrderData, ThrowOnError>, 177 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 186 + ): HttpRequest<unknown> => 187 + (options?.client ?? client).requestOptions({ 178 188 method: 'POST', 179 189 responseStyle: 'data', 180 190 url: '/store/order', ··· 188 198 */ 189 199 export const deleteOrderRequest = <ThrowOnError extends boolean = false>( 190 200 options: Options<DeleteOrderData, ThrowOnError>, 191 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 201 + ): HttpRequest<unknown> => 202 + (options?.client ?? client).requestOptions({ 192 203 method: 'DELETE', 193 204 responseStyle: 'data', 194 205 url: '/store/order/{orderId}', ··· 202 213 */ 203 214 export const getOrderByIdRequest = <ThrowOnError extends boolean = false>( 204 215 options: Options<GetOrderByIdData, ThrowOnError>, 205 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 216 + ): HttpRequest<unknown> => 217 + (options?.client ?? client).requestOptions({ 206 218 method: 'GET', 207 219 responseStyle: 'data', 208 220 url: '/store/order/{orderId}', ··· 216 228 */ 217 229 export const createUserRequest = <ThrowOnError extends boolean = false>( 218 230 options?: Options<CreateUserData, ThrowOnError>, 219 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 231 + ): HttpRequest<unknown> => 232 + (options?.client ?? client).requestOptions({ 220 233 method: 'POST', 221 234 responseStyle: 'data', 222 235 url: '/user', ··· 232 245 ThrowOnError extends boolean = false, 233 246 >( 234 247 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 235 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 248 + ): HttpRequest<unknown> => 249 + (options?.client ?? client).requestOptions({ 236 250 method: 'POST', 237 251 responseStyle: 'data', 238 252 url: '/user/createWithList', ··· 246 260 */ 247 261 export const loginUserRequest = <ThrowOnError extends boolean = false>( 248 262 options?: Options<LoginUserData, ThrowOnError>, 249 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 263 + ): HttpRequest<unknown> => 264 + (options?.client ?? client).requestOptions({ 250 265 method: 'GET', 251 266 responseStyle: 'data', 252 267 url: '/user/login', ··· 260 275 */ 261 276 export const logoutUserRequest = <ThrowOnError extends boolean = false>( 262 277 options?: Options<LogoutUserData, ThrowOnError>, 263 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 278 + ): HttpRequest<unknown> => 279 + (options?.client ?? client).requestOptions({ 264 280 method: 'GET', 265 281 responseStyle: 'data', 266 282 url: '/user/logout', ··· 274 290 */ 275 291 export const deleteUserRequest = <ThrowOnError extends boolean = false>( 276 292 options: Options<DeleteUserData, ThrowOnError>, 277 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 293 + ): HttpRequest<unknown> => 294 + (options?.client ?? client).requestOptions({ 278 295 method: 'DELETE', 279 296 responseStyle: 'data', 280 297 url: '/user/{username}', ··· 288 305 */ 289 306 export const getUserByNameRequest = <ThrowOnError extends boolean = false>( 290 307 options: Options<GetUserByNameData, ThrowOnError>, 291 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 308 + ): HttpRequest<unknown> => 309 + (options?.client ?? client).requestOptions({ 292 310 method: 'GET', 293 311 responseStyle: 'data', 294 312 url: '/user/{username}', ··· 302 320 */ 303 321 export const updateUserRequest = <ThrowOnError extends boolean = false>( 304 322 options: Options<UpdateUserData, ThrowOnError>, 305 - ): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 323 + ): HttpRequest<unknown> => 324 + (options?.client ?? client).requestOptions({ 306 325 method: 'PUT', 307 326 responseStyle: 'data', 308 327 url: '/user/{username}',
+38 -19
examples/openapi-ts-angular-common/src/client/sdk.gen.ts
··· 86 86 */ 87 87 export const addPet = <ThrowOnError extends boolean = true>( 88 88 options: Options<AddPetData, ThrowOnError>, 89 - ) => (options.client ?? client).post< 89 + ) => 90 + (options.client ?? client).post< 90 91 AddPetResponses, 91 92 AddPetErrors, 92 93 ThrowOnError, ··· 114 115 */ 115 116 export const updatePet = <ThrowOnError extends boolean = true>( 116 117 options: Options<UpdatePetData, ThrowOnError>, 117 - ) => (options.client ?? client).put< 118 + ) => 119 + (options.client ?? client).put< 118 120 UpdatePetResponses, 119 121 UpdatePetErrors, 120 122 ThrowOnError, ··· 142 144 */ 143 145 export const findPetsByStatus = <ThrowOnError extends boolean = true>( 144 146 options: Options<FindPetsByStatusData, ThrowOnError>, 145 - ) => (options.client ?? client).get< 147 + ) => 148 + (options.client ?? client).get< 146 149 FindPetsByStatusResponses, 147 150 FindPetsByStatusErrors, 148 151 ThrowOnError, ··· 166 169 */ 167 170 export const findPetsByTags = <ThrowOnError extends boolean = true>( 168 171 options: Options<FindPetsByTagsData, ThrowOnError>, 169 - ) => (options.client ?? client).get< 172 + ) => 173 + (options.client ?? client).get< 170 174 FindPetsByTagsResponses, 171 175 FindPetsByTagsErrors, 172 176 ThrowOnError, ··· 190 194 */ 191 195 export const deletePet = <ThrowOnError extends boolean = true>( 192 196 options: Options<DeletePetData, ThrowOnError>, 193 - ) => (options.client ?? client).delete< 197 + ) => 198 + (options.client ?? client).delete< 194 199 DeletePetResponses, 195 200 DeletePetErrors, 196 201 ThrowOnError, ··· 214 219 */ 215 220 export const getPetById = <ThrowOnError extends boolean = true>( 216 221 options: Options<GetPetByIdData, ThrowOnError>, 217 - ) => (options.client ?? client).get< 222 + ) => 223 + (options.client ?? client).get< 218 224 GetPetByIdResponses, 219 225 GetPetByIdErrors, 220 226 ThrowOnError, ··· 242 248 */ 243 249 export const updatePetWithForm = <ThrowOnError extends boolean = true>( 244 250 options: Options<UpdatePetWithFormData, ThrowOnError>, 245 - ) => (options.client ?? client).post< 251 + ) => 252 + (options.client ?? client).post< 246 253 UpdatePetWithFormResponses, 247 254 UpdatePetWithFormErrors, 248 255 ThrowOnError, ··· 266 273 */ 267 274 export const uploadFile = <ThrowOnError extends boolean = true>( 268 275 options: Options<UploadFileData, ThrowOnError>, 269 - ) => (options.client ?? client).post< 276 + ) => 277 + (options.client ?? client).post< 270 278 UploadFileResponses, 271 279 UploadFileErrors, 272 280 ThrowOnError, ··· 295 303 */ 296 304 export const getInventory = <ThrowOnError extends boolean = true>( 297 305 options?: Options<GetInventoryData, ThrowOnError>, 298 - ) => (options?.client ?? client).get< 306 + ) => 307 + (options?.client ?? client).get< 299 308 GetInventoryResponses, 300 309 GetInventoryErrors, 301 310 ThrowOnError, ··· 319 328 */ 320 329 export const placeOrder = <ThrowOnError extends boolean = true>( 321 330 options?: Options<PlaceOrderData, ThrowOnError>, 322 - ) => (options?.client ?? client).post< 331 + ) => 332 + (options?.client ?? client).post< 323 333 PlaceOrderResponses, 324 334 PlaceOrderErrors, 325 335 ThrowOnError, ··· 341 351 */ 342 352 export const deleteOrder = <ThrowOnError extends boolean = true>( 343 353 options: Options<DeleteOrderData, ThrowOnError>, 344 - ) => (options.client ?? client).delete< 354 + ) => 355 + (options.client ?? client).delete< 345 356 DeleteOrderResponses, 346 357 DeleteOrderErrors, 347 358 ThrowOnError, ··· 359 370 */ 360 371 export const getOrderById = <ThrowOnError extends boolean = true>( 361 372 options: Options<GetOrderByIdData, ThrowOnError>, 362 - ) => (options.client ?? client).get< 373 + ) => 374 + (options.client ?? client).get< 363 375 GetOrderByIdResponses, 364 376 GetOrderByIdErrors, 365 377 ThrowOnError, ··· 377 389 */ 378 390 export const createUser = <ThrowOnError extends boolean = true>( 379 391 options?: Options<CreateUserData, ThrowOnError>, 380 - ) => (options?.client ?? client).post< 392 + ) => 393 + (options?.client ?? client).post< 381 394 CreateUserResponses, 382 395 CreateUserErrors, 383 396 ThrowOnError, ··· 399 412 */ 400 413 export const createUsersWithListInput = <ThrowOnError extends boolean = true>( 401 414 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 402 - ) => (options?.client ?? client).post< 415 + ) => 416 + (options?.client ?? client).post< 403 417 CreateUsersWithListInputResponses, 404 418 CreateUsersWithListInputErrors, 405 419 ThrowOnError, ··· 421 435 */ 422 436 export const loginUser = <ThrowOnError extends boolean = true>( 423 437 options?: Options<LoginUserData, ThrowOnError>, 424 - ) => (options?.client ?? client).get< 438 + ) => 439 + (options?.client ?? client).get< 425 440 LoginUserResponses, 426 441 LoginUserErrors, 427 442 ThrowOnError, ··· 439 454 */ 440 455 export const logoutUser = <ThrowOnError extends boolean = true>( 441 456 options?: Options<LogoutUserData, ThrowOnError>, 442 - ) => (options?.client ?? client).get< 457 + ) => 458 + (options?.client ?? client).get< 443 459 LogoutUserResponses, 444 460 LogoutUserErrors, 445 461 ThrowOnError, ··· 457 473 */ 458 474 export const deleteUser = <ThrowOnError extends boolean = true>( 459 475 options: Options<DeleteUserData, ThrowOnError>, 460 - ) => (options.client ?? client).delete< 476 + ) => 477 + (options.client ?? client).delete< 461 478 DeleteUserResponses, 462 479 DeleteUserErrors, 463 480 ThrowOnError, ··· 475 492 */ 476 493 export const getUserByName = <ThrowOnError extends boolean = true>( 477 494 options: Options<GetUserByNameData, ThrowOnError>, 478 - ) => (options.client ?? client).get< 495 + ) => 496 + (options.client ?? client).get< 479 497 GetUserByNameResponses, 480 498 GetUserByNameErrors, 481 499 ThrowOnError, ··· 493 511 */ 494 512 export const updateUser = <ThrowOnError extends boolean = true>( 495 513 options: Options<UpdateUserData, ThrowOnError>, 496 - ) => (options.client ?? client).put< 514 + ) => 515 + (options.client ?? client).put< 497 516 UpdateUserResponses, 498 517 UpdateUserErrors, 499 518 ThrowOnError,
+38 -23
examples/openapi-ts-axios/src/client/sdk.gen.ts
··· 86 86 */ 87 87 export const addPet = <ThrowOnError extends boolean = false>( 88 88 options: Options<AddPetData, ThrowOnError>, 89 - ) => (options.client ?? client).post< 90 - AddPetResponses, 91 - AddPetErrors, 92 - ThrowOnError 93 - >({ 89 + ) => 90 + (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 94 91 responseType: 'json', 95 92 security: [ 96 93 { ··· 113 110 */ 114 111 export const updatePet = <ThrowOnError extends boolean = false>( 115 112 options: Options<UpdatePetData, ThrowOnError>, 116 - ) => (options.client ?? client).put< 113 + ) => 114 + (options.client ?? client).put< 117 115 UpdatePetResponses, 118 116 UpdatePetErrors, 119 117 ThrowOnError ··· 140 138 */ 141 139 export const findPetsByStatus = <ThrowOnError extends boolean = false>( 142 140 options: Options<FindPetsByStatusData, ThrowOnError>, 143 - ) => (options.client ?? client).get< 141 + ) => 142 + (options.client ?? client).get< 144 143 FindPetsByStatusResponses, 145 144 FindPetsByStatusErrors, 146 145 ThrowOnError ··· 163 162 */ 164 163 export const findPetsByTags = <ThrowOnError extends boolean = false>( 165 164 options: Options<FindPetsByTagsData, ThrowOnError>, 166 - ) => (options.client ?? client).get< 165 + ) => 166 + (options.client ?? client).get< 167 167 FindPetsByTagsResponses, 168 168 FindPetsByTagsErrors, 169 169 ThrowOnError ··· 186 186 */ 187 187 export const deletePet = <ThrowOnError extends boolean = false>( 188 188 options: Options<DeletePetData, ThrowOnError>, 189 - ) => (options.client ?? client).delete< 189 + ) => 190 + (options.client ?? client).delete< 190 191 DeletePetResponses, 191 192 DeletePetErrors, 192 193 ThrowOnError ··· 208 209 */ 209 210 export const getPetById = <ThrowOnError extends boolean = false>( 210 211 options: Options<GetPetByIdData, ThrowOnError>, 211 - ) => (options.client ?? client).get< 212 + ) => 213 + (options.client ?? client).get< 212 214 GetPetByIdResponses, 213 215 GetPetByIdErrors, 214 216 ThrowOnError ··· 235 237 */ 236 238 export const updatePetWithForm = <ThrowOnError extends boolean = false>( 237 239 options: Options<UpdatePetWithFormData, ThrowOnError>, 238 - ) => (options.client ?? client).post< 240 + ) => 241 + (options.client ?? client).post< 239 242 UpdatePetWithFormResponses, 240 243 UpdatePetWithFormErrors, 241 244 ThrowOnError ··· 258 261 */ 259 262 export const uploadFile = <ThrowOnError extends boolean = false>( 260 263 options: Options<UploadFileData, ThrowOnError>, 261 - ) => (options.client ?? client).post< 264 + ) => 265 + (options.client ?? client).post< 262 266 UploadFileResponses, 263 267 UploadFileErrors, 264 268 ThrowOnError ··· 286 290 */ 287 291 export const getInventory = <ThrowOnError extends boolean = false>( 288 292 options?: Options<GetInventoryData, ThrowOnError>, 289 - ) => (options?.client ?? client).get< 293 + ) => 294 + (options?.client ?? client).get< 290 295 GetInventoryResponses, 291 296 GetInventoryErrors, 292 297 ThrowOnError ··· 309 314 */ 310 315 export const placeOrder = <ThrowOnError extends boolean = false>( 311 316 options?: Options<PlaceOrderData, ThrowOnError>, 312 - ) => (options?.client ?? client).post< 317 + ) => 318 + (options?.client ?? client).post< 313 319 PlaceOrderResponses, 314 320 PlaceOrderErrors, 315 321 ThrowOnError ··· 330 336 */ 331 337 export const deleteOrder = <ThrowOnError extends boolean = false>( 332 338 options: Options<DeleteOrderData, ThrowOnError>, 333 - ) => (options.client ?? client).delete< 339 + ) => 340 + (options.client ?? client).delete< 334 341 DeleteOrderResponses, 335 342 DeleteOrderErrors, 336 343 ThrowOnError ··· 346 353 */ 347 354 export const getOrderById = <ThrowOnError extends boolean = false>( 348 355 options: Options<GetOrderByIdData, ThrowOnError>, 349 - ) => (options.client ?? client).get< 356 + ) => 357 + (options.client ?? client).get< 350 358 GetOrderByIdResponses, 351 359 GetOrderByIdErrors, 352 360 ThrowOnError ··· 363 371 */ 364 372 export const createUser = <ThrowOnError extends boolean = false>( 365 373 options?: Options<CreateUserData, ThrowOnError>, 366 - ) => (options?.client ?? client).post< 374 + ) => 375 + (options?.client ?? client).post< 367 376 CreateUserResponses, 368 377 CreateUserErrors, 369 378 ThrowOnError ··· 384 393 */ 385 394 export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 386 395 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 387 - ) => (options?.client ?? client).post< 396 + ) => 397 + (options?.client ?? client).post< 388 398 CreateUsersWithListInputResponses, 389 399 CreateUsersWithListInputErrors, 390 400 ThrowOnError ··· 405 415 */ 406 416 export const loginUser = <ThrowOnError extends boolean = false>( 407 417 options?: Options<LoginUserData, ThrowOnError>, 408 - ) => (options?.client ?? client).get< 418 + ) => 419 + (options?.client ?? client).get< 409 420 LoginUserResponses, 410 421 LoginUserErrors, 411 422 ThrowOnError ··· 422 433 */ 423 434 export const logoutUser = <ThrowOnError extends boolean = false>( 424 435 options?: Options<LogoutUserData, ThrowOnError>, 425 - ) => (options?.client ?? client).get< 436 + ) => 437 + (options?.client ?? client).get< 426 438 LogoutUserResponses, 427 439 LogoutUserErrors, 428 440 ThrowOnError ··· 438 450 */ 439 451 export const deleteUser = <ThrowOnError extends boolean = false>( 440 452 options: Options<DeleteUserData, ThrowOnError>, 441 - ) => (options.client ?? client).delete< 453 + ) => 454 + (options.client ?? client).delete< 442 455 DeleteUserResponses, 443 456 DeleteUserErrors, 444 457 ThrowOnError ··· 454 467 */ 455 468 export const getUserByName = <ThrowOnError extends boolean = false>( 456 469 options: Options<GetUserByNameData, ThrowOnError>, 457 - ) => (options.client ?? client).get< 470 + ) => 471 + (options.client ?? client).get< 458 472 GetUserByNameResponses, 459 473 GetUserByNameErrors, 460 474 ThrowOnError ··· 471 485 */ 472 486 export const updateUser = <ThrowOnError extends boolean = false>( 473 487 options: Options<UpdateUserData, ThrowOnError>, 474 - ) => (options.client ?? client).put< 488 + ) => 489 + (options.client ?? client).put< 475 490 UpdateUserResponses, 476 491 UpdateUserErrors, 477 492 ThrowOnError
+6 -3
examples/openapi-ts-fastify/src/client/sdk.gen.ts
··· 36 36 */ 37 37 export const listPets = <ThrowOnError extends boolean = false>( 38 38 options?: Options<ListPetsData, ThrowOnError>, 39 - ) => (options?.client ?? client).get< 39 + ) => 40 + (options?.client ?? client).get< 40 41 ListPetsResponses, 41 42 ListPetsErrors, 42 43 ThrowOnError ··· 50 51 */ 51 52 export const createPets = <ThrowOnError extends boolean = false>( 52 53 options?: Options<CreatePetsData, ThrowOnError>, 53 - ) => (options?.client ?? client).post< 54 + ) => 55 + (options?.client ?? client).post< 54 56 CreatePetsResponses, 55 57 CreatePetsErrors, 56 58 ThrowOnError ··· 64 66 */ 65 67 export const showPetById = <ThrowOnError extends boolean = false>( 66 68 options: Options<ShowPetByIdData, ThrowOnError>, 67 - ) => (options.client ?? client).get< 69 + ) => 70 + (options.client ?? client).get< 68 71 ShowPetByIdResponses, 69 72 ShowPetByIdErrors, 70 73 ThrowOnError
+38 -23
examples/openapi-ts-fetch/src/client/sdk.gen.ts
··· 86 86 */ 87 87 export const addPet = <ThrowOnError extends boolean = false>( 88 88 options: Options<AddPetData, ThrowOnError>, 89 - ) => (options.client ?? client).post< 90 - AddPetResponses, 91 - AddPetErrors, 92 - ThrowOnError 93 - >({ 89 + ) => 90 + (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 94 91 security: [ 95 92 { 96 93 scheme: 'bearer', ··· 112 109 */ 113 110 export const updatePet = <ThrowOnError extends boolean = false>( 114 111 options: Options<UpdatePetData, ThrowOnError>, 115 - ) => (options.client ?? client).put< 112 + ) => 113 + (options.client ?? client).put< 116 114 UpdatePetResponses, 117 115 UpdatePetErrors, 118 116 ThrowOnError ··· 138 136 */ 139 137 export const findPetsByStatus = <ThrowOnError extends boolean = false>( 140 138 options: Options<FindPetsByStatusData, ThrowOnError>, 141 - ) => (options.client ?? client).get< 139 + ) => 140 + (options.client ?? client).get< 142 141 FindPetsByStatusResponses, 143 142 FindPetsByStatusErrors, 144 143 ThrowOnError ··· 160 159 */ 161 160 export const findPetsByTags = <ThrowOnError extends boolean = false>( 162 161 options: Options<FindPetsByTagsData, ThrowOnError>, 163 - ) => (options.client ?? client).get< 162 + ) => 163 + (options.client ?? client).get< 164 164 FindPetsByTagsResponses, 165 165 FindPetsByTagsErrors, 166 166 ThrowOnError ··· 182 182 */ 183 183 export const deletePet = <ThrowOnError extends boolean = false>( 184 184 options: Options<DeletePetData, ThrowOnError>, 185 - ) => (options.client ?? client).delete< 185 + ) => 186 + (options.client ?? client).delete< 186 187 DeletePetResponses, 187 188 DeletePetErrors, 188 189 ThrowOnError ··· 204 205 */ 205 206 export const getPetById = <ThrowOnError extends boolean = false>( 206 207 options: Options<GetPetByIdData, ThrowOnError>, 207 - ) => (options.client ?? client).get< 208 + ) => 209 + (options.client ?? client).get< 208 210 GetPetByIdResponses, 209 211 GetPetByIdErrors, 210 212 ThrowOnError ··· 230 232 */ 231 233 export const updatePetWithForm = <ThrowOnError extends boolean = false>( 232 234 options: Options<UpdatePetWithFormData, ThrowOnError>, 233 - ) => (options.client ?? client).post< 235 + ) => 236 + (options.client ?? client).post< 234 237 UpdatePetWithFormResponses, 235 238 UpdatePetWithFormErrors, 236 239 ThrowOnError ··· 252 255 */ 253 256 export const uploadFile = <ThrowOnError extends boolean = false>( 254 257 options: Options<UploadFileData, ThrowOnError>, 255 - ) => (options.client ?? client).post< 258 + ) => 259 + (options.client ?? client).post< 256 260 UploadFileResponses, 257 261 UploadFileErrors, 258 262 ThrowOnError ··· 279 283 */ 280 284 export const getInventory = <ThrowOnError extends boolean = false>( 281 285 options?: Options<GetInventoryData, ThrowOnError>, 282 - ) => (options?.client ?? client).get< 286 + ) => 287 + (options?.client ?? client).get< 283 288 GetInventoryResponses, 284 289 GetInventoryErrors, 285 290 ThrowOnError ··· 301 306 */ 302 307 export const placeOrder = <ThrowOnError extends boolean = false>( 303 308 options?: Options<PlaceOrderData, ThrowOnError>, 304 - ) => (options?.client ?? client).post< 309 + ) => 310 + (options?.client ?? client).post< 305 311 PlaceOrderResponses, 306 312 PlaceOrderErrors, 307 313 ThrowOnError ··· 321 327 */ 322 328 export const deleteOrder = <ThrowOnError extends boolean = false>( 323 329 options: Options<DeleteOrderData, ThrowOnError>, 324 - ) => (options.client ?? client).delete< 330 + ) => 331 + (options.client ?? client).delete< 325 332 DeleteOrderResponses, 326 333 DeleteOrderErrors, 327 334 ThrowOnError ··· 337 344 */ 338 345 export const getOrderById = <ThrowOnError extends boolean = false>( 339 346 options: Options<GetOrderByIdData, ThrowOnError>, 340 - ) => (options.client ?? client).get< 347 + ) => 348 + (options.client ?? client).get< 341 349 GetOrderByIdResponses, 342 350 GetOrderByIdErrors, 343 351 ThrowOnError ··· 353 361 */ 354 362 export const createUser = <ThrowOnError extends boolean = false>( 355 363 options?: Options<CreateUserData, ThrowOnError>, 356 - ) => (options?.client ?? client).post< 364 + ) => 365 + (options?.client ?? client).post< 357 366 CreateUserResponses, 358 367 CreateUserErrors, 359 368 ThrowOnError ··· 373 382 */ 374 383 export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 375 384 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 376 - ) => (options?.client ?? client).post< 385 + ) => 386 + (options?.client ?? client).post< 377 387 CreateUsersWithListInputResponses, 378 388 CreateUsersWithListInputErrors, 379 389 ThrowOnError ··· 393 403 */ 394 404 export const loginUser = <ThrowOnError extends boolean = false>( 395 405 options?: Options<LoginUserData, ThrowOnError>, 396 - ) => (options?.client ?? client).get< 406 + ) => 407 + (options?.client ?? client).get< 397 408 LoginUserResponses, 398 409 LoginUserErrors, 399 410 ThrowOnError ··· 409 420 */ 410 421 export const logoutUser = <ThrowOnError extends boolean = false>( 411 422 options?: Options<LogoutUserData, ThrowOnError>, 412 - ) => (options?.client ?? client).get< 423 + ) => 424 + (options?.client ?? client).get< 413 425 LogoutUserResponses, 414 426 LogoutUserErrors, 415 427 ThrowOnError ··· 425 437 */ 426 438 export const deleteUser = <ThrowOnError extends boolean = false>( 427 439 options: Options<DeleteUserData, ThrowOnError>, 428 - ) => (options.client ?? client).delete< 440 + ) => 441 + (options.client ?? client).delete< 429 442 DeleteUserResponses, 430 443 DeleteUserErrors, 431 444 ThrowOnError ··· 441 454 */ 442 455 export const getUserByName = <ThrowOnError extends boolean = false>( 443 456 options: Options<GetUserByNameData, ThrowOnError>, 444 - ) => (options.client ?? client).get< 457 + ) => 458 + (options.client ?? client).get< 445 459 GetUserByNameResponses, 446 460 GetUserByNameErrors, 447 461 ThrowOnError ··· 457 471 */ 458 472 export const updateUser = <ThrowOnError extends boolean = false>( 459 473 options: Options<UpdateUserData, ThrowOnError>, 460 - ) => (options.client ?? client).put< 474 + ) => 475 + (options.client ?? client).put< 461 476 UpdateUserResponses, 462 477 UpdateUserErrors, 463 478 ThrowOnError
+38 -23
examples/openapi-ts-next/src/client/sdk.gen.ts
··· 86 86 */ 87 87 export const addPet = <ThrowOnError extends boolean = false>( 88 88 options: Options<AddPetData, ThrowOnError>, 89 - ) => (options.client ?? client).post< 90 - AddPetResponses, 91 - AddPetErrors, 92 - ThrowOnError 93 - >({ 89 + ) => 90 + (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 94 91 security: [ 95 92 { 96 93 scheme: 'bearer', ··· 112 109 */ 113 110 export const updatePet = <ThrowOnError extends boolean = false>( 114 111 options: Options<UpdatePetData, ThrowOnError>, 115 - ) => (options.client ?? client).put< 112 + ) => 113 + (options.client ?? client).put< 116 114 UpdatePetResponses, 117 115 UpdatePetErrors, 118 116 ThrowOnError ··· 138 136 */ 139 137 export const findPetsByStatus = <ThrowOnError extends boolean = false>( 140 138 options: Options<FindPetsByStatusData, ThrowOnError>, 141 - ) => (options.client ?? client).get< 139 + ) => 140 + (options.client ?? client).get< 142 141 FindPetsByStatusResponses, 143 142 FindPetsByStatusErrors, 144 143 ThrowOnError ··· 160 159 */ 161 160 export const findPetsByTags = <ThrowOnError extends boolean = false>( 162 161 options: Options<FindPetsByTagsData, ThrowOnError>, 163 - ) => (options.client ?? client).get< 162 + ) => 163 + (options.client ?? client).get< 164 164 FindPetsByTagsResponses, 165 165 FindPetsByTagsErrors, 166 166 ThrowOnError ··· 182 182 */ 183 183 export const deletePet = <ThrowOnError extends boolean = false>( 184 184 options: Options<DeletePetData, ThrowOnError>, 185 - ) => (options.client ?? client).delete< 185 + ) => 186 + (options.client ?? client).delete< 186 187 DeletePetResponses, 187 188 DeletePetErrors, 188 189 ThrowOnError ··· 204 205 */ 205 206 export const getPetById = <ThrowOnError extends boolean = false>( 206 207 options: Options<GetPetByIdData, ThrowOnError>, 207 - ) => (options.client ?? client).get< 208 + ) => 209 + (options.client ?? client).get< 208 210 GetPetByIdResponses, 209 211 GetPetByIdErrors, 210 212 ThrowOnError ··· 230 232 */ 231 233 export const updatePetWithForm = <ThrowOnError extends boolean = false>( 232 234 options: Options<UpdatePetWithFormData, ThrowOnError>, 233 - ) => (options.client ?? client).post< 235 + ) => 236 + (options.client ?? client).post< 234 237 UpdatePetWithFormResponses, 235 238 UpdatePetWithFormErrors, 236 239 ThrowOnError ··· 252 255 */ 253 256 export const uploadFile = <ThrowOnError extends boolean = false>( 254 257 options: Options<UploadFileData, ThrowOnError>, 255 - ) => (options.client ?? client).post< 258 + ) => 259 + (options.client ?? client).post< 256 260 UploadFileResponses, 257 261 UploadFileErrors, 258 262 ThrowOnError ··· 279 283 */ 280 284 export const getInventory = <ThrowOnError extends boolean = false>( 281 285 options?: Options<GetInventoryData, ThrowOnError>, 282 - ) => (options?.client ?? client).get< 286 + ) => 287 + (options?.client ?? client).get< 283 288 GetInventoryResponses, 284 289 GetInventoryErrors, 285 290 ThrowOnError ··· 301 306 */ 302 307 export const placeOrder = <ThrowOnError extends boolean = false>( 303 308 options?: Options<PlaceOrderData, ThrowOnError>, 304 - ) => (options?.client ?? client).post< 309 + ) => 310 + (options?.client ?? client).post< 305 311 PlaceOrderResponses, 306 312 PlaceOrderErrors, 307 313 ThrowOnError ··· 321 327 */ 322 328 export const deleteOrder = <ThrowOnError extends boolean = false>( 323 329 options: Options<DeleteOrderData, ThrowOnError>, 324 - ) => (options.client ?? client).delete< 330 + ) => 331 + (options.client ?? client).delete< 325 332 DeleteOrderResponses, 326 333 DeleteOrderErrors, 327 334 ThrowOnError ··· 337 344 */ 338 345 export const getOrderById = <ThrowOnError extends boolean = false>( 339 346 options: Options<GetOrderByIdData, ThrowOnError>, 340 - ) => (options.client ?? client).get< 347 + ) => 348 + (options.client ?? client).get< 341 349 GetOrderByIdResponses, 342 350 GetOrderByIdErrors, 343 351 ThrowOnError ··· 353 361 */ 354 362 export const createUser = <ThrowOnError extends boolean = false>( 355 363 options?: Options<CreateUserData, ThrowOnError>, 356 - ) => (options?.client ?? client).post< 364 + ) => 365 + (options?.client ?? client).post< 357 366 CreateUserResponses, 358 367 CreateUserErrors, 359 368 ThrowOnError ··· 373 382 */ 374 383 export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 375 384 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 376 - ) => (options?.client ?? client).post< 385 + ) => 386 + (options?.client ?? client).post< 377 387 CreateUsersWithListInputResponses, 378 388 CreateUsersWithListInputErrors, 379 389 ThrowOnError ··· 393 403 */ 394 404 export const loginUser = <ThrowOnError extends boolean = false>( 395 405 options?: Options<LoginUserData, ThrowOnError>, 396 - ) => (options?.client ?? client).get< 406 + ) => 407 + (options?.client ?? client).get< 397 408 LoginUserResponses, 398 409 LoginUserErrors, 399 410 ThrowOnError ··· 409 420 */ 410 421 export const logoutUser = <ThrowOnError extends boolean = false>( 411 422 options?: Options<LogoutUserData, ThrowOnError>, 412 - ) => (options?.client ?? client).get< 423 + ) => 424 + (options?.client ?? client).get< 413 425 LogoutUserResponses, 414 426 LogoutUserErrors, 415 427 ThrowOnError ··· 425 437 */ 426 438 export const deleteUser = <ThrowOnError extends boolean = false>( 427 439 options: Options<DeleteUserData, ThrowOnError>, 428 - ) => (options.client ?? client).delete< 440 + ) => 441 + (options.client ?? client).delete< 429 442 DeleteUserResponses, 430 443 DeleteUserErrors, 431 444 ThrowOnError ··· 441 454 */ 442 455 export const getUserByName = <ThrowOnError extends boolean = false>( 443 456 options: Options<GetUserByNameData, ThrowOnError>, 444 - ) => (options.client ?? client).get< 457 + ) => 458 + (options.client ?? client).get< 445 459 GetUserByNameResponses, 446 460 GetUserByNameErrors, 447 461 ThrowOnError ··· 457 471 */ 458 472 export const updateUser = <ThrowOnError extends boolean = false>( 459 473 options: Options<UpdateUserData, ThrowOnError>, 460 - ) => (options.client ?? client).put< 474 + ) => 475 + (options.client ?? client).put< 461 476 UpdateUserResponses, 462 477 UpdateUserErrors, 463 478 ThrowOnError
+38 -23
examples/openapi-ts-ofetch/src/client/sdk.gen.ts
··· 86 86 */ 87 87 export const addPet = <ThrowOnError extends boolean = false>( 88 88 options: Options<AddPetData, ThrowOnError>, 89 - ) => (options.client ?? client).post< 90 - AddPetResponses, 91 - AddPetErrors, 92 - ThrowOnError 93 - >({ 89 + ) => 90 + (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 94 91 security: [ 95 92 { 96 93 scheme: 'bearer', ··· 112 109 */ 113 110 export const updatePet = <ThrowOnError extends boolean = false>( 114 111 options: Options<UpdatePetData, ThrowOnError>, 115 - ) => (options.client ?? client).put< 112 + ) => 113 + (options.client ?? client).put< 116 114 UpdatePetResponses, 117 115 UpdatePetErrors, 118 116 ThrowOnError ··· 138 136 */ 139 137 export const findPetsByStatus = <ThrowOnError extends boolean = false>( 140 138 options: Options<FindPetsByStatusData, ThrowOnError>, 141 - ) => (options.client ?? client).get< 139 + ) => 140 + (options.client ?? client).get< 142 141 FindPetsByStatusResponses, 143 142 FindPetsByStatusErrors, 144 143 ThrowOnError ··· 160 159 */ 161 160 export const findPetsByTags = <ThrowOnError extends boolean = false>( 162 161 options: Options<FindPetsByTagsData, ThrowOnError>, 163 - ) => (options.client ?? client).get< 162 + ) => 163 + (options.client ?? client).get< 164 164 FindPetsByTagsResponses, 165 165 FindPetsByTagsErrors, 166 166 ThrowOnError ··· 182 182 */ 183 183 export const deletePet = <ThrowOnError extends boolean = false>( 184 184 options: Options<DeletePetData, ThrowOnError>, 185 - ) => (options.client ?? client).delete< 185 + ) => 186 + (options.client ?? client).delete< 186 187 DeletePetResponses, 187 188 DeletePetErrors, 188 189 ThrowOnError ··· 204 205 */ 205 206 export const getPetById = <ThrowOnError extends boolean = false>( 206 207 options: Options<GetPetByIdData, ThrowOnError>, 207 - ) => (options.client ?? client).get< 208 + ) => 209 + (options.client ?? client).get< 208 210 GetPetByIdResponses, 209 211 GetPetByIdErrors, 210 212 ThrowOnError ··· 230 232 */ 231 233 export const updatePetWithForm = <ThrowOnError extends boolean = false>( 232 234 options: Options<UpdatePetWithFormData, ThrowOnError>, 233 - ) => (options.client ?? client).post< 235 + ) => 236 + (options.client ?? client).post< 234 237 UpdatePetWithFormResponses, 235 238 UpdatePetWithFormErrors, 236 239 ThrowOnError ··· 252 255 */ 253 256 export const uploadFile = <ThrowOnError extends boolean = false>( 254 257 options: Options<UploadFileData, ThrowOnError>, 255 - ) => (options.client ?? client).post< 258 + ) => 259 + (options.client ?? client).post< 256 260 UploadFileResponses, 257 261 UploadFileErrors, 258 262 ThrowOnError ··· 279 283 */ 280 284 export const getInventory = <ThrowOnError extends boolean = false>( 281 285 options?: Options<GetInventoryData, ThrowOnError>, 282 - ) => (options?.client ?? client).get< 286 + ) => 287 + (options?.client ?? client).get< 283 288 GetInventoryResponses, 284 289 GetInventoryErrors, 285 290 ThrowOnError ··· 301 306 */ 302 307 export const placeOrder = <ThrowOnError extends boolean = false>( 303 308 options?: Options<PlaceOrderData, ThrowOnError>, 304 - ) => (options?.client ?? client).post< 309 + ) => 310 + (options?.client ?? client).post< 305 311 PlaceOrderResponses, 306 312 PlaceOrderErrors, 307 313 ThrowOnError ··· 321 327 */ 322 328 export const deleteOrder = <ThrowOnError extends boolean = false>( 323 329 options: Options<DeleteOrderData, ThrowOnError>, 324 - ) => (options.client ?? client).delete< 330 + ) => 331 + (options.client ?? client).delete< 325 332 DeleteOrderResponses, 326 333 DeleteOrderErrors, 327 334 ThrowOnError ··· 337 344 */ 338 345 export const getOrderById = <ThrowOnError extends boolean = false>( 339 346 options: Options<GetOrderByIdData, ThrowOnError>, 340 - ) => (options.client ?? client).get< 347 + ) => 348 + (options.client ?? client).get< 341 349 GetOrderByIdResponses, 342 350 GetOrderByIdErrors, 343 351 ThrowOnError ··· 353 361 */ 354 362 export const createUser = <ThrowOnError extends boolean = false>( 355 363 options?: Options<CreateUserData, ThrowOnError>, 356 - ) => (options?.client ?? client).post< 364 + ) => 365 + (options?.client ?? client).post< 357 366 CreateUserResponses, 358 367 CreateUserErrors, 359 368 ThrowOnError ··· 373 382 */ 374 383 export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 375 384 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 376 - ) => (options?.client ?? client).post< 385 + ) => 386 + (options?.client ?? client).post< 377 387 CreateUsersWithListInputResponses, 378 388 CreateUsersWithListInputErrors, 379 389 ThrowOnError ··· 393 403 */ 394 404 export const loginUser = <ThrowOnError extends boolean = false>( 395 405 options?: Options<LoginUserData, ThrowOnError>, 396 - ) => (options?.client ?? client).get< 406 + ) => 407 + (options?.client ?? client).get< 397 408 LoginUserResponses, 398 409 LoginUserErrors, 399 410 ThrowOnError ··· 409 420 */ 410 421 export const logoutUser = <ThrowOnError extends boolean = false>( 411 422 options?: Options<LogoutUserData, ThrowOnError>, 412 - ) => (options?.client ?? client).get< 423 + ) => 424 + (options?.client ?? client).get< 413 425 LogoutUserResponses, 414 426 LogoutUserErrors, 415 427 ThrowOnError ··· 425 437 */ 426 438 export const deleteUser = <ThrowOnError extends boolean = false>( 427 439 options: Options<DeleteUserData, ThrowOnError>, 428 - ) => (options.client ?? client).delete< 440 + ) => 441 + (options.client ?? client).delete< 429 442 DeleteUserResponses, 430 443 DeleteUserErrors, 431 444 ThrowOnError ··· 441 454 */ 442 455 export const getUserByName = <ThrowOnError extends boolean = false>( 443 456 options: Options<GetUserByNameData, ThrowOnError>, 444 - ) => (options.client ?? client).get< 457 + ) => 458 + (options.client ?? client).get< 445 459 GetUserByNameResponses, 446 460 GetUserByNameErrors, 447 461 ThrowOnError ··· 457 471 */ 458 472 export const updateUser = <ThrowOnError extends boolean = false>( 459 473 options: Options<UpdateUserData, ThrowOnError>, 460 - ) => (options.client ?? client).put< 474 + ) => 475 + (options.client ?? client).put< 461 476 UpdateUserResponses, 462 477 UpdateUserErrors, 463 478 ThrowOnError
+280 -280
examples/openapi-ts-openai/src/client/types.gen.ts
··· 215 215 } & ErrorEvent); 216 216 217 217 export const AssistantSupportedModels = { 218 - GPT_4_1: 'gpt-4.1', 219 - GPT_4_1_2025_04_14: 'gpt-4.1-2025-04-14', 220 - GPT_4_1_MINI: 'gpt-4.1-mini', 221 - GPT_4_1_MINI_2025_04_14: 'gpt-4.1-mini-2025-04-14', 222 - GPT_5: 'gpt-5', 223 - GPT_4_1_NANO: 'gpt-4.1-nano', 224 - GPT_5_2025_08_07: 'gpt-5-2025-08-07', 225 218 GPT_4O: 'gpt-4o', 226 - GPT_5_MINI: 'gpt-5-mini', 219 + GPT_4: 'gpt-4', 220 + GPT_4O_2024_05_13: 'gpt-4o-2024-05-13', 227 221 GPT_4O_2024_08_06: 'gpt-4o-2024-08-06', 228 - GPT_5_MINI_2025_08_07: 'gpt-5-mini-2025-08-07', 229 - GPT_4O_2024_05_13: 'gpt-4o-2024-05-13', 230 - GPT_5_NANO: 'gpt-5-nano', 231 222 GPT_4O_2024_11_20: 'gpt-4o-2024-11-20', 232 223 GPT_4O_MINI: 'gpt-4o-mini', 233 - GPT_5_NANO_2025_08_07: 'gpt-5-nano-2025-08-07', 234 224 GPT_4O_MINI_2024_07_18: 'gpt-4o-mini-2024-07-18', 235 - GPT_4_1_NANO_2025_04_14: 'gpt-4.1-nano-2025-04-14', 225 + GPT_3_5_TURBO: 'gpt-3.5-turbo', 236 226 GPT_4_0125_PREVIEW: 'gpt-4-0125-preview', 237 - O1: 'o1', 238 - GPT_4: 'gpt-4', 239 - O3_MINI: 'o3-mini', 227 + GPT_3_5_TURBO_0613: 'gpt-3.5-turbo-0613', 240 228 GPT_4_0314: 'gpt-4-0314', 241 - O3_MINI_2025_01_31: 'o3-mini-2025-01-31', 229 + GPT_3_5_TURBO_0125: 'gpt-3.5-turbo-0125', 242 230 GPT_4_0613: 'gpt-4-0613', 243 - O1_2024_12_17: 'o1-2024-12-17', 244 - GPT_3_5_TURBO: 'gpt-3.5-turbo', 231 + GPT_3_5_TURBO_1106: 'gpt-3.5-turbo-1106', 232 + GPT_4_1: 'gpt-4.1', 233 + GPT_3_5_TURBO_16K: 'gpt-3.5-turbo-16k', 234 + GPT_4_1_2025_04_14: 'gpt-4.1-2025-04-14', 235 + GPT_3_5_TURBO_16K_0613: 'gpt-3.5-turbo-16k-0613', 236 + GPT_4_1_MINI: 'gpt-4.1-mini', 245 237 GPT_4_1106_PREVIEW: 'gpt-4-1106-preview', 246 - GPT_3_5_TURBO_0613: 'gpt-3.5-turbo-0613', 238 + GPT_4_1_MINI_2025_04_14: 'gpt-4.1-mini-2025-04-14', 239 + GPT_4_1_NANO: 'gpt-4.1-nano', 240 + GPT_4_1_NANO_2025_04_14: 'gpt-4.1-nano-2025-04-14', 241 + GPT_4_32K: 'gpt-4-32k', 242 + GPT_5: 'gpt-5', 243 + GPT_4_32K_0314: 'gpt-4-32k-0314', 244 + GPT_5_2025_08_07: 'gpt-5-2025-08-07', 245 + GPT_4_32K_0613: 'gpt-4-32k-0613', 246 + GPT_5_MINI: 'gpt-5-mini', 247 247 GPT_4_5_PREVIEW: 'gpt-4.5-preview', 248 - GPT_3_5_TURBO_0125: 'gpt-3.5-turbo-0125', 248 + GPT_5_MINI_2025_08_07: 'gpt-5-mini-2025-08-07', 249 249 GPT_4_5_PREVIEW_2025_02_27: 'gpt-4.5-preview-2025-02-27', 250 - GPT_3_5_TURBO_1106: 'gpt-3.5-turbo-1106', 250 + GPT_5_NANO: 'gpt-5-nano', 251 251 GPT_4_TURBO: 'gpt-4-turbo', 252 - GPT_3_5_TURBO_16K: 'gpt-3.5-turbo-16k', 253 252 GPT_4_TURBO_2024_04_09: 'gpt-4-turbo-2024-04-09', 254 - GPT_3_5_TURBO_16K_0613: 'gpt-3.5-turbo-16k-0613', 253 + GPT_5_NANO_2025_08_07: 'gpt-5-nano-2025-08-07', 255 254 GPT_4_TURBO_PREVIEW: 'gpt-4-turbo-preview', 256 - GPT_4_32K: 'gpt-4-32k', 257 255 GPT_4_VISION_PREVIEW: 'gpt-4-vision-preview', 258 - GPT_4_32K_0314: 'gpt-4-32k-0314', 259 - GPT_4_32K_0613: 'gpt-4-32k-0613', 256 + O1: 'o1', 257 + O1_2024_12_17: 'o1-2024-12-17', 258 + O3_MINI: 'o3-mini', 259 + O3_MINI_2025_01_31: 'o3-mini-2025-01-31', 260 260 } as const; 261 261 262 262 export type AssistantSupportedModels = ··· 540 540 */ 541 541 effective_at: number; 542 542 /** 543 + * The ID of this log. 544 + */ 545 + id: string; 546 + /** 547 + * The details for events with this `type`. 548 + */ 549 + 'invite.accepted'?: { 550 + /** 551 + * The ID of the invite. 552 + */ 553 + id?: string; 554 + }; 555 + /** 543 556 * The details for events with this `type`. 544 557 */ 545 558 'invite.deleted'?: { ··· 551 564 /** 552 565 * The details for events with this `type`. 553 566 */ 554 - 'invite.accepted'?: { 567 + 'invite.sent'?: { 568 + /** 569 + * The payload used to create the invite. 570 + */ 571 + data?: { 572 + /** 573 + * The email invited to the organization. 574 + */ 575 + email?: string; 576 + /** 577 + * The role the email was invited to be. Is either `owner` or `member`. 578 + */ 579 + role?: string; 580 + }; 555 581 /** 556 582 * The ID of the invite. 557 583 */ ··· 560 586 /** 561 587 * The details for events with this `type`. 562 588 */ 589 + 'login.failed'?: { 590 + /** 591 + * The error code of the failure. 592 + */ 593 + error_code?: string; 594 + /** 595 + * The error message of the failure. 596 + */ 597 + error_message?: string; 598 + }; 599 + /** 600 + * The details for events with this `type`. 601 + */ 563 602 'logout.failed'?: { 564 603 /** 565 604 * The error code of the failure. ··· 579 618 */ 580 619 changes_requested?: { 581 620 /** 582 - * The organization title. 621 + * How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects` 583 622 */ 584 - title?: string; 623 + api_call_logging?: string; 624 + /** 625 + * The list of project ids if api_call_logging is set to `enabled_for_selected_projects` 626 + */ 627 + api_call_logging_project_ids?: string; 585 628 /** 586 629 * The organization description. 587 630 */ ··· 595 638 */ 596 639 threads_ui_visibility?: string; 597 640 /** 598 - * Visibility of the usage dashboard which shows activity and costs for your organization. One of `ANY_ROLE` or `OWNERS`. 599 - */ 600 - usage_dashboard_visibility?: string; 601 - /** 602 - * How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects` 641 + * The organization title. 603 642 */ 604 - api_call_logging?: string; 643 + title?: string; 605 644 /** 606 - * The list of project ids if api_call_logging is set to `enabled_for_selected_projects` 645 + * Visibility of the usage dashboard which shows activity and costs for your organization. One of `ANY_ROLE` or `OWNERS`. 607 646 */ 608 - api_call_logging_project_ids?: string; 647 + usage_dashboard_visibility?: string; 609 648 }; 610 649 /** 611 650 * The organization ID. ··· 613 652 id?: string; 614 653 }; 615 654 /** 655 + * The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project. 656 + */ 657 + project?: { 658 + /** 659 + * The project ID. 660 + */ 661 + id?: string; 662 + /** 663 + * The project title. 664 + */ 665 + name?: string; 666 + }; 667 + /** 668 + * The details for events with this `type`. 669 + */ 670 + 'project.archived'?: { 671 + /** 672 + * The project ID. 673 + */ 674 + id?: string; 675 + }; 676 + /** 616 677 * The details for events with this `type`. 617 678 */ 618 679 'project.created'?: { ··· 666 727 */ 667 728 'rate_limit.updated'?: { 668 729 /** 669 - * The rate limit ID 670 - */ 671 - id?: string; 672 - /** 673 730 * The payload used to update the rate limits. 674 731 */ 675 732 changes_requested?: { 676 733 /** 677 - * The maximum requests per minute. 734 + * The maximum batch input tokens per day. Only relevant for certain models. 678 735 */ 679 - max_requests_per_1_minute?: number; 736 + batch_1_day_max_input_tokens?: number; 680 737 /** 681 - * The maximum tokens per minute. 738 + * The maximum audio megabytes per minute. Only relevant for certain models. 682 739 */ 683 - max_tokens_per_1_minute?: number; 740 + max_audio_megabytes_per_1_minute?: number; 684 741 /** 685 742 * The maximum images per minute. Only relevant for certain models. 686 743 */ 687 744 max_images_per_1_minute?: number; 688 745 /** 689 - * The maximum audio megabytes per minute. Only relevant for certain models. 746 + * The maximum requests per day. Only relevant for certain models. 690 747 */ 691 - max_audio_megabytes_per_1_minute?: number; 748 + max_requests_per_1_day?: number; 692 749 /** 693 - * The maximum requests per day. Only relevant for certain models. 750 + * The maximum requests per minute. 694 751 */ 695 - max_requests_per_1_day?: number; 752 + max_requests_per_1_minute?: number; 696 753 /** 697 - * The maximum batch input tokens per day. Only relevant for certain models. 754 + * The maximum tokens per minute. 698 755 */ 699 - batch_1_day_max_input_tokens?: number; 756 + max_tokens_per_1_minute?: number; 700 757 }; 701 - }; 702 - /** 703 - * The details for events with this `type`. 704 - */ 705 - 'project.archived'?: { 706 758 /** 707 - * The project ID. 759 + * The rate limit ID 708 760 */ 709 761 id?: string; 710 762 }; ··· 729 781 /** 730 782 * The details for events with this `type`. 731 783 */ 784 + 'service_account.deleted'?: { 785 + /** 786 + * The service account ID. 787 + */ 788 + id?: string; 789 + }; 790 + /** 791 + * The details for events with this `type`. 792 + */ 732 793 'service_account.updated'?: { 733 794 /** 734 795 * The payload used to updated the service account. ··· 744 805 */ 745 806 id?: string; 746 807 }; 747 - /** 748 - * The details for events with this `type`. 749 - */ 750 - 'user.deleted'?: { 751 - /** 752 - * The user ID. 753 - */ 754 - id?: string; 755 - }; 808 + type: AuditLogEventType; 756 809 /** 757 810 * The details for events with this `type`. 758 811 */ 759 812 'user.added'?: { 760 - /** 761 - * The user ID. 762 - */ 763 - id?: string; 764 813 /** 765 814 * The payload used to add the user to the project. 766 815 */ ··· 770 819 */ 771 820 role?: string; 772 821 }; 773 - }; 774 - /** 775 - * The details for events with this `type`. 776 - */ 777 - 'user.updated'?: { 778 822 /** 779 - * The project ID. 823 + * The user ID. 780 824 */ 781 825 id?: string; 782 - /** 783 - * The payload used to update the user. 784 - */ 785 - changes_requested?: { 786 - /** 787 - * The role of the user. Is either `owner` or `member`. 788 - */ 789 - role?: string; 790 - }; 791 826 }; 792 827 /** 793 828 * The details for events with this `type`. 794 829 */ 795 - 'service_account.deleted'?: { 796 - /** 797 - * The service account ID. 798 - */ 799 - id?: string; 800 - }; 801 - /** 802 - * The ID of this log. 803 - */ 804 - id: string; 805 - /** 806 - * The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project. 807 - */ 808 - project?: { 830 + 'user.deleted'?: { 809 831 /** 810 - * The project ID. 832 + * The user ID. 811 833 */ 812 834 id?: string; 813 - /** 814 - * The project title. 815 - */ 816 - name?: string; 817 835 }; 818 - type: AuditLogEventType; 819 836 /** 820 837 * The details for events with this `type`. 821 838 */ 822 - 'login.failed'?: { 839 + 'user.updated'?: { 823 840 /** 824 - * The error code of the failure. 825 - */ 826 - error_code?: string; 827 - /** 828 - * The error message of the failure. 841 + * The payload used to update the user. 829 842 */ 830 - error_message?: string; 831 - }; 832 - /** 833 - * The details for events with this `type`. 834 - */ 835 - 'invite.sent'?: { 836 - /** 837 - * The payload used to create the invite. 838 - */ 839 - data?: { 843 + changes_requested?: { 840 844 /** 841 - * The email invited to the organization. 842 - */ 843 - email?: string; 844 - /** 845 - * The role the email was invited to be. Is either `owner` or `member`. 845 + * The role of the user. Is either `owner` or `member`. 846 846 */ 847 847 role?: string; 848 848 }; 849 849 /** 850 - * The ID of the invite. 850 + * The project ID. 851 851 */ 852 852 id?: string; 853 853 }; ··· 1018 1018 finalizing_at?: number; 1019 1019 id: string; 1020 1020 /** 1021 - * The ID of the file containing the outputs of successfully executed requests. 1022 - */ 1023 - output_file_id?: string; 1024 - /** 1025 1021 * The Unix timestamp (in seconds) for when the batch started processing. 1026 1022 */ 1027 1023 in_progress_at?: number; 1024 + /** 1025 + * The ID of the input file for the batch. 1026 + */ 1027 + input_file_id: string; 1028 1028 metadata?: Metadata; 1029 1029 /** 1030 1030 * The object type, which is always `batch`. 1031 1031 */ 1032 1032 object: 'batch'; 1033 1033 /** 1034 - * The ID of the input file for the batch. 1034 + * The ID of the file containing the outputs of successfully executed requests. 1035 1035 */ 1036 - input_file_id: string; 1036 + output_file_id?: string; 1037 1037 request_counts?: BatchRequestCounts; 1038 1038 /** 1039 1039 * The current status of the batch. ··· 2910 2910 */ 2911 2911 model: ModelIdsShared; 2912 2912 /** 2913 - * Web search 2914 - * 2915 - * This tool searches the web for relevant results to use in a response. 2916 - * Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). 2917 - * 2913 + * How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs. 2918 2914 */ 2919 - web_search_options?: { 2920 - /** 2921 - * Approximate location parameters for the search. 2922 - * 2923 - */ 2924 - user_location?: { 2925 - /** 2926 - * The type of location approximation. Always `approximate`. 2927 - * 2928 - */ 2929 - type: 'approximate'; 2930 - approximate: WebSearchLocation; 2931 - }; 2932 - search_context_size?: WebSearchContextSize; 2933 - }; 2915 + n?: number; 2934 2916 parallel_tool_calls?: ParallelToolCalls; 2935 2917 /** 2936 - * If set to true, the model response data will be streamed to the client 2937 - * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). 2938 - * See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) 2939 - * for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) 2940 - * guide for more information on how to handle the streaming events. 2918 + * Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs), 2919 + * which can greatly improve response times when large parts of the model 2920 + * response are known ahead of time. This is most common when you are 2921 + * regenerating a file with only minor changes to most of the content. 2941 2922 * 2942 2923 */ 2943 - stream?: boolean; 2924 + prediction?: { 2925 + type?: 'PredictionContent'; 2926 + } & PredictionContent; 2944 2927 /** 2945 - * How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs. 2928 + * Number between -2.0 and 2.0. Positive values penalize new tokens based on 2929 + * whether they appear in the text so far, increasing the model's likelihood 2930 + * to talk about new topics. 2931 + * 2946 2932 */ 2947 - n?: number; 2933 + presence_penalty?: number; 2948 2934 reasoning_effort?: ReasoningEffort; 2949 2935 /** 2950 2936 * An object specifying the format that the model must output. ··· 2983 2969 */ 2984 2970 store?: boolean; 2985 2971 /** 2986 - * Number between -2.0 and 2.0. Positive values penalize new tokens based on 2987 - * whether they appear in the text so far, increasing the model's likelihood 2988 - * to talk about new topics. 2972 + * If set to true, the model response data will be streamed to the client 2973 + * as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). 2974 + * See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) 2975 + * for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) 2976 + * guide for more information on how to handle the streaming events. 2989 2977 * 2990 2978 */ 2991 - presence_penalty?: number; 2979 + stream?: boolean; 2992 2980 stream_options?: ChatCompletionStreamOptions; 2993 2981 tool_choice?: ChatCompletionToolChoiceOption; 2994 2982 /** ··· 3006 2994 } & CustomToolChatCompletions) 3007 2995 >; 3008 2996 /** 3009 - * Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs), 3010 - * which can greatly improve response times when large parts of the model 3011 - * response are known ahead of time. This is most common when you are 3012 - * regenerating a file with only minor changes to most of the content. 3013 - * 3014 - */ 3015 - prediction?: { 3016 - type?: 'PredictionContent'; 3017 - } & PredictionContent; 3018 - /** 3019 2997 * An integer between 0 and 20 specifying the number of most likely tokens to 3020 2998 * return at each token position, each with an associated log probability. 3021 2999 * `logprobs` must be set to `true` if this parameter is used. ··· 3023 3001 */ 3024 3002 top_logprobs?: number; 3025 3003 verbosity?: Verbosity; 3004 + /** 3005 + * Web search 3006 + * 3007 + * This tool searches the web for relevant results to use in a response. 3008 + * Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). 3009 + * 3010 + */ 3011 + web_search_options?: { 3012 + search_context_size?: WebSearchContextSize; 3013 + /** 3014 + * Approximate location parameters for the search. 3015 + * 3016 + */ 3017 + user_location?: { 3018 + approximate: WebSearchLocation; 3019 + /** 3020 + * The type of location approximation. Always `approximate`. 3021 + * 3022 + */ 3023 + type: 'approximate'; 3024 + }; 3025 + }; 3026 3026 }; 3027 3027 3028 3028 /** ··· 5824 5824 */ 5825 5825 completion_tokens: number; 5826 5826 /** 5827 - * The number of prompt tokens used. 5828 - */ 5829 - prompt_tokens: number; 5830 - /** 5831 5827 * The number of invocations. 5832 5828 */ 5833 5829 invocation_count: number; 5834 - /** 5835 - * The total number of tokens used. 5836 - */ 5837 - total_tokens: number; 5838 5830 /** 5839 5831 * The name of the model. 5840 5832 */ 5841 5833 model_name: string; 5834 + /** 5835 + * The number of prompt tokens used. 5836 + */ 5837 + prompt_tokens: number; 5838 + /** 5839 + * The total number of tokens used. 5840 + */ 5841 + total_tokens: number; 5842 5842 }>; 5843 5843 /** 5844 5844 * Results per testing criteria applied during the evaluation run. ··· 5870 5870 */ 5871 5871 errored: number; 5872 5872 /** 5873 - * Total number of executed output items. 5874 - */ 5875 - total: number; 5876 - /** 5877 5873 * Number of output items that failed to pass the evaluation. 5878 5874 */ 5879 5875 failed: number; ··· 5881 5877 * Number of output items that passed the evaluation. 5882 5878 */ 5883 5879 passed: number; 5880 + /** 5881 + * Total number of executed output items. 5882 + */ 5883 + total: number; 5884 5884 }; 5885 5885 /** 5886 5886 * The status of the evaluation run. ··· 6633 6633 */ 6634 6634 result_files: Array<string>; 6635 6635 /** 6636 - * The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running. 6637 - */ 6638 - trained_tokens: number; 6639 - /** 6640 6636 * The seed used for the fine-tuning job. 6641 6637 */ 6642 6638 seed: number; ··· 6651 6647 | 'failed' 6652 6648 | 'cancelled'; 6653 6649 /** 6654 - * The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). 6650 + * The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running. 6655 6651 */ 6656 - validation_file: string; 6652 + trained_tokens: number; 6657 6653 /** 6658 6654 * The file ID used for training. You can retrieve the training data with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). 6659 6655 */ 6660 6656 training_file: string; 6657 + /** 6658 + * The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). 6659 + */ 6660 + validation_file: string; 6661 6661 }; 6662 6662 6663 6663 /** ··· 10146 10146 */ 10147 10147 error?: { 10148 10148 /** 10149 - * The type of error. 10150 - */ 10151 - type?: string; 10152 - /** 10153 10149 * Error code, if any. 10154 10150 */ 10155 10151 code?: string; 10152 + /** 10153 + * The type of error. 10154 + */ 10155 + type?: string; 10156 10156 }; 10157 10157 /** 10158 10158 * The reason the Response did not complete. For a `cancelled` Response, ··· 10193 10193 */ 10194 10194 input_token_details?: { 10195 10195 /** 10196 + * The number of audio tokens used in the Response. 10197 + */ 10198 + audio_tokens?: number; 10199 + /** 10196 10200 * The number of cached tokens used in the Response. 10197 10201 */ 10198 10202 cached_tokens?: number; ··· 10200 10204 * The number of text tokens used in the Response. 10201 10205 */ 10202 10206 text_tokens?: number; 10203 - /** 10204 - * The number of audio tokens used in the Response. 10205 - */ 10206 - audio_tokens?: number; 10207 10207 }; 10208 10208 /** 10209 10209 * The number of input tokens used in the Response, including text and ··· 10212 10212 */ 10213 10213 input_tokens?: number; 10214 10214 /** 10215 - * The number of output tokens sent in the Response, including text and 10216 - * audio tokens. 10217 - * 10218 - */ 10219 - output_tokens?: number; 10220 - /** 10221 - * The total number of tokens in the Response including input and output 10222 - * text and audio tokens. 10223 - * 10224 - */ 10225 - total_tokens?: number; 10226 - /** 10227 10215 * Details about the output tokens used in the Response. 10228 10216 */ 10229 10217 output_token_details?: { ··· 10236 10224 */ 10237 10225 text_tokens?: number; 10238 10226 }; 10227 + /** 10228 + * The number of output tokens sent in the Response, including text and 10229 + * audio tokens. 10230 + * 10231 + */ 10232 + output_tokens?: number; 10233 + /** 10234 + * The total number of tokens in the Response including input and output 10235 + * text and audio tokens. 10236 + * 10237 + */ 10238 + total_tokens?: number; 10239 10239 }; 10240 10240 /** 10241 10241 * The voice the model used to respond. ··· 12996 12996 * 12997 12997 */ 12998 12998 export const ResponseErrorCode = { 12999 - IMAGE_TOO_LARGE: 'image_too_large', 13000 - IMAGE_PARSE_ERROR: 'image_parse_error', 13001 - INVALID_BASE64_IMAGE: 'invalid_base64_image', 13002 - IMAGE_CONTENT_POLICY_VIOLATION: 'image_content_policy_violation', 13003 - INVALID_IMAGE: 'invalid_image', 13004 - IMAGE_FILE_TOO_LARGE: 'image_file_too_large', 13005 - INVALID_PROMPT: 'invalid_prompt', 13006 12999 EMPTY_IMAGE_FILE: 'empty_image_file', 13007 - RATE_LIMIT_EXCEEDED: 'rate_limit_exceeded', 13008 13000 FAILED_TO_DOWNLOAD_IMAGE: 'failed_to_download_image', 13009 - SERVER_ERROR: 'server_error', 13001 + IMAGE_CONTENT_POLICY_VIOLATION: 'image_content_policy_violation', 13010 13002 IMAGE_FILE_NOT_FOUND: 'image_file_not_found', 13003 + IMAGE_FILE_TOO_LARGE: 'image_file_too_large', 13004 + IMAGE_PARSE_ERROR: 'image_parse_error', 13005 + IMAGE_TOO_LARGE: 'image_too_large', 13011 13006 IMAGE_TOO_SMALL: 'image_too_small', 13012 - VECTOR_STORE_TIMEOUT: 'vector_store_timeout', 13007 + INVALID_BASE64_IMAGE: 'invalid_base64_image', 13008 + INVALID_IMAGE: 'invalid_image', 13013 13009 INVALID_IMAGE_FORMAT: 'invalid_image_format', 13014 13010 INVALID_IMAGE_MODE: 'invalid_image_mode', 13015 13011 INVALID_IMAGE_URL: 'invalid_image_url', 13012 + INVALID_PROMPT: 'invalid_prompt', 13013 + RATE_LIMIT_EXCEEDED: 'rate_limit_exceeded', 13014 + SERVER_ERROR: 'server_error', 13016 13015 UNSUPPORTED_IMAGE_MEDIA_TYPE: 'unsupported_image_media_type', 13016 + VECTOR_STORE_TIMEOUT: 'vector_store_timeout', 13017 13017 } as const; 13018 13018 13019 13019 /** ··· 14719 14719 python_grader_runtime_error: boolean; 14720 14720 python_grader_runtime_error_details: string; 14721 14721 python_grader_server_error: boolean; 14722 + python_grader_server_error_type: string; 14722 14723 sample_parse_error: boolean; 14723 - unresponsive_reward_error: boolean; 14724 14724 truncated_observation_error: boolean; 14725 - python_grader_server_error_type: string; 14725 + unresponsive_reward_error: boolean; 14726 14726 }; 14727 14727 execution_time: number; 14728 14728 name: string; ··· 14803 14803 message: string; 14804 14804 }; 14805 14805 /** 14806 - * The Unix timestamp (in seconds) for when the run was started. 14806 + * The maximum number of completion tokens specified to have been used over the course of the run. 14807 + * 14807 14808 */ 14808 - started_at: number; 14809 + max_completion_tokens: number; 14809 14810 /** 14810 14811 * The maximum number of prompt tokens specified to have been used over the course of the run. 14811 14812 * ··· 14840 14841 type: 'submit_tool_outputs'; 14841 14842 }; 14842 14843 response_format: AssistantsApiResponseFormatOption; 14843 - usage: RunCompletionUsage; 14844 + /** 14845 + * The Unix timestamp (in seconds) for when the run was started. 14846 + */ 14847 + started_at: number; 14844 14848 status: RunStatus; 14845 14849 /** 14846 14850 * The sampling temperature used for this run. If not set, defaults to 1. 14847 14851 */ 14848 14852 temperature?: number; 14849 14853 /** 14850 - * The maximum number of completion tokens specified to have been used over the course of the run. 14851 - * 14854 + * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run. 14852 14855 */ 14853 - max_completion_tokens: number; 14856 + thread_id: string; 14854 14857 tool_choice: AssistantsApiToolChoiceOption & unknown; 14855 - truncation_strategy: TruncationObject & unknown; 14856 - /** 14857 - * The nucleus sampling value used for this run. If not set, defaults to 1. 14858 - */ 14859 - top_p?: number; 14860 14858 /** 14861 14859 * The list of tools that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. 14862 14860 */ 14863 14861 tools: Array<AssistantTool>; 14864 14862 /** 14865 - * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run. 14863 + * The nucleus sampling value used for this run. If not set, defaults to 1. 14866 14864 */ 14867 - thread_id: string; 14865 + top_p?: number; 14866 + truncation_strategy: TruncationObject & unknown; 14867 + usage: RunCompletionUsage; 14868 14868 }; 14869 14869 14870 14870 /** ··· 15353 15353 type?: 'RunStepDetailsToolCallsObject'; 15354 15354 } & RunStepDetailsToolCallsObject); 15355 15355 /** 15356 - * The type of run step, which can be either `message_creation` or `tool_calls`. 15357 - */ 15358 - type: 'message_creation' | 'tool_calls'; 15359 - /** 15360 15356 * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. 15361 15357 */ 15362 15358 thread_id: string; 15359 + /** 15360 + * The type of run step, which can be either `message_creation` or `tool_calls`. 15361 + */ 15362 + type: 'message_creation' | 'tool_calls'; 15363 15363 usage: RunStepCompletionUsage; 15364 15364 }; 15365 15365 ··· 18391 18391 } & MessageDeltaContentImageUrlObject); 18392 18392 18393 18393 export const ChatModel = { 18394 - GPT_4_1: 'gpt-4.1', 18395 - GPT_4_1_2025_04_14: 'gpt-4.1-2025-04-14', 18396 - GPT_5: 'gpt-5', 18397 - GPT_4_1_MINI: 'gpt-4.1-mini', 18398 - GPT_5_2025_08_07: 'gpt-5-2025-08-07', 18399 - GPT_4_1_MINI_2025_04_14: 'gpt-4.1-mini-2025-04-14', 18400 - GPT_5_CHAT_LATEST: 'gpt-5-chat-latest', 18401 - GPT_4_1_NANO: 'gpt-4.1-nano', 18402 - GPT_5_MINI: 'gpt-5-mini', 18403 - GPT_4_1_NANO_2025_04_14: 'gpt-4.1-nano-2025-04-14', 18404 - GPT_5_MINI_2025_08_07: 'gpt-5-mini-2025-08-07', 18405 - GPT_5_NANO: 'gpt-5-nano', 18406 - GPT_5_NANO_2025_08_07: 'gpt-5-nano-2025-08-07', 18407 - O1: 'o1', 18408 - O1_2024_12_17: 'o1-2024-12-17', 18409 18394 GPT_4O: 'gpt-4o', 18410 - O1_MINI: 'o1-mini', 18395 + GPT_4O_2024_05_13: 'gpt-4o-2024-05-13', 18411 18396 GPT_4O_2024_08_06: 'gpt-4o-2024-08-06', 18412 - O3: 'o3', 18413 - GPT_4O_2024_05_13: 'gpt-4o-2024-05-13', 18414 - O3_2025_04_16: 'o3-2025-04-16', 18415 18397 GPT_4O_2024_11_20: 'gpt-4o-2024-11-20', 18416 - O4_MINI: 'o4-mini', 18417 18398 GPT_4O_AUDIO_PREVIEW: 'gpt-4o-audio-preview', 18418 - O4_MINI_2025_04_16: 'o4-mini-2025-04-16', 18419 18399 GPT_4O_AUDIO_PREVIEW_2024_10_01: 'gpt-4o-audio-preview-2024-10-01', 18420 - O3_MINI: 'o3-mini', 18400 + GPT_4_1: 'gpt-4.1', 18421 18401 GPT_4O_AUDIO_PREVIEW_2024_12_17: 'gpt-4o-audio-preview-2024-12-17', 18422 - O3_MINI_2025_01_31: 'o3-mini-2025-01-31', 18402 + GPT_4_1_2025_04_14: 'gpt-4.1-2025-04-14', 18423 18403 GPT_4O_AUDIO_PREVIEW_2025_06_03: 'gpt-4o-audio-preview-2025-06-03', 18424 - O1_PREVIEW: 'o1-preview', 18404 + GPT_4_1_MINI: 'gpt-4.1-mini', 18425 18405 CHATGPT_4O_LATEST: 'chatgpt-4o-latest', 18426 - O1_PREVIEW_2024_09_12: 'o1-preview-2024-09-12', 18406 + GPT_4_1_MINI_2025_04_14: 'gpt-4.1-mini-2025-04-14', 18427 18407 CODEX_MINI_LATEST: 'codex-mini-latest', 18428 - O1_MINI_2024_09_12: 'o1-mini-2024-09-12', 18408 + GPT_4_1_NANO: 'gpt-4.1-nano', 18429 18409 GPT_4O_MINI: 'gpt-4o-mini', 18410 + GPT_4_1_NANO_2025_04_14: 'gpt-4.1-nano-2025-04-14', 18430 18411 GPT_4O_MINI_2024_07_18: 'gpt-4o-mini-2024-07-18', 18412 + GPT_5: 'gpt-5', 18413 + GPT_4: 'gpt-4', 18414 + GPT_5_2025_08_07: 'gpt-5-2025-08-07', 18431 18415 GPT_4O_MINI_AUDIO_PREVIEW: 'gpt-4o-mini-audio-preview', 18416 + GPT_5_CHAT_LATEST: 'gpt-5-chat-latest', 18432 18417 GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17: 'gpt-4o-mini-audio-preview-2024-12-17', 18433 - GPT_4: 'gpt-4', 18418 + GPT_5_MINI: 'gpt-5-mini', 18419 + GPT_3_5_TURBO: 'gpt-3.5-turbo', 18420 + GPT_5_MINI_2025_08_07: 'gpt-5-mini-2025-08-07', 18421 + GPT_3_5_TURBO_0301: 'gpt-3.5-turbo-0301', 18422 + GPT_5_NANO: 'gpt-5-nano', 18423 + GPT_3_5_TURBO_0613: 'gpt-3.5-turbo-0613', 18424 + GPT_5_NANO_2025_08_07: 'gpt-5-nano-2025-08-07', 18425 + GPT_3_5_TURBO_0125: 'gpt-3.5-turbo-0125', 18426 + O1: 'o1', 18427 + GPT_3_5_TURBO_1106: 'gpt-3.5-turbo-1106', 18428 + O1_2024_12_17: 'o1-2024-12-17', 18429 + GPT_3_5_TURBO_16K: 'gpt-3.5-turbo-16k', 18430 + O1_MINI: 'o1-mini', 18431 + GPT_3_5_TURBO_16K_0613: 'gpt-3.5-turbo-16k-0613', 18432 + O3: 'o3', 18434 18433 GPT_4O_MINI_SEARCH_PREVIEW: 'gpt-4o-mini-search-preview', 18434 + O3_2025_04_16: 'o3-2025-04-16', 18435 18435 GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11: 18436 18436 'gpt-4o-mini-search-preview-2025-03-11', 18437 + O4_MINI: 'o4-mini', 18437 18438 GPT_4O_SEARCH_PREVIEW: 'gpt-4o-search-preview', 18439 + O4_MINI_2025_04_16: 'o4-mini-2025-04-16', 18438 18440 GPT_4O_SEARCH_PREVIEW_2025_03_11: 'gpt-4o-search-preview-2025-03-11', 18441 + O3_MINI: 'o3-mini', 18439 18442 GPT_4_0125_PREVIEW: 'gpt-4-0125-preview', 18440 - GPT_3_5_TURBO: 'gpt-3.5-turbo', 18443 + O3_MINI_2025_01_31: 'o3-mini-2025-01-31', 18441 18444 GPT_4_0314: 'gpt-4-0314', 18442 - GPT_3_5_TURBO_0301: 'gpt-3.5-turbo-0301', 18445 + O1_PREVIEW: 'o1-preview', 18443 18446 GPT_4_0613: 'gpt-4-0613', 18444 - GPT_3_5_TURBO_0613: 'gpt-3.5-turbo-0613', 18447 + O1_PREVIEW_2024_09_12: 'o1-preview-2024-09-12', 18445 18448 GPT_4_1106_PREVIEW: 'gpt-4-1106-preview', 18446 - GPT_3_5_TURBO_0125: 'gpt-3.5-turbo-0125', 18449 + O1_MINI_2024_09_12: 'o1-mini-2024-09-12', 18450 + GPT_4_32K: 'gpt-4-32k', 18451 + GPT_4_32K_0314: 'gpt-4-32k-0314', 18452 + GPT_4_32K_0613: 'gpt-4-32k-0613', 18447 18453 GPT_4_TURBO: 'gpt-4-turbo', 18448 - GPT_3_5_TURBO_1106: 'gpt-3.5-turbo-1106', 18449 18454 GPT_4_TURBO_2024_04_09: 'gpt-4-turbo-2024-04-09', 18450 - GPT_3_5_TURBO_16K: 'gpt-3.5-turbo-16k', 18451 18455 GPT_4_TURBO_PREVIEW: 'gpt-4-turbo-preview', 18452 - GPT_3_5_TURBO_16K_0613: 'gpt-3.5-turbo-16k-0613', 18453 18456 GPT_4_VISION_PREVIEW: 'gpt-4-vision-preview', 18454 - GPT_4_32K: 'gpt-4-32k', 18455 - GPT_4_32K_0314: 'gpt-4-32k-0314', 18456 - GPT_4_32K_0613: 'gpt-4-32k-0613', 18457 18457 } as const; 18458 18458 18459 18459 export type ChatModel = (typeof ChatModel)[keyof typeof ChatModel];
+99 -99
examples/openapi-ts-pinia-colada/src/client/@pinia/colada.gen.ts
··· 63 63 export const addPetMutation = ( 64 64 options?: Partial<Options<AddPetData>> 65 65 ): UseMutationOptions<AddPetResponse, Options<AddPetData>, Error> => ({ 66 - mutation: async (fnOptions) => { 67 - const { data } = await addPet({ 68 - ...options, 69 - ...fnOptions, 70 - throwOnError: true 71 - }) 72 - return data 73 - } 74 - }) 66 + mutation: async (fnOptions) => { 67 + const { data } = await addPet({ 68 + ...options, 69 + ...fnOptions, 70 + throwOnError: true 71 + }) 72 + return data 73 + } 74 + }) 75 75 76 76 /** 77 77 * Update an existing pet. ··· 81 81 export const updatePetMutation = ( 82 82 options?: Partial<Options<UpdatePetData>> 83 83 ): UseMutationOptions<UpdatePetResponse, Options<UpdatePetData>, Error> => ({ 84 - mutation: async (fnOptions) => { 85 - const { data } = await updatePet({ 86 - ...options, 87 - ...fnOptions, 88 - throwOnError: true 89 - }) 90 - return data 91 - } 92 - }) 84 + mutation: async (fnOptions) => { 85 + const { data } = await updatePet({ 86 + ...options, 87 + ...fnOptions, 88 + throwOnError: true 89 + }) 90 + return data 91 + } 92 + }) 93 93 94 94 export type QueryKey<TOptions extends Options> = [ 95 95 Pick<TOptions, 'path'> & { ··· 175 175 export const deletePetMutation = ( 176 176 options?: Partial<Options<DeletePetData>> 177 177 ): UseMutationOptions<unknown, Options<DeletePetData>, Error> => ({ 178 - mutation: async (fnOptions) => { 179 - const { data } = await deletePet({ 180 - ...options, 181 - ...fnOptions, 182 - throwOnError: true 183 - }) 184 - return data 185 - } 186 - }) 178 + mutation: async (fnOptions) => { 179 + const { data } = await deletePet({ 180 + ...options, 181 + ...fnOptions, 182 + throwOnError: true 183 + }) 184 + return data 185 + } 186 + }) 187 187 188 188 /** 189 189 * Find pet by ID. ··· 210 210 export const updatePetWithFormMutation = ( 211 211 options?: Partial<Options<UpdatePetWithFormData>> 212 212 ): UseMutationOptions<UpdatePetWithFormResponse, Options<UpdatePetWithFormData>, Error> => ({ 213 - mutation: async (fnOptions) => { 214 - const { data } = await updatePetWithForm({ 215 - ...options, 216 - ...fnOptions, 217 - throwOnError: true 218 - }) 219 - return data 220 - } 221 - }) 213 + mutation: async (fnOptions) => { 214 + const { data } = await updatePetWithForm({ 215 + ...options, 216 + ...fnOptions, 217 + throwOnError: true 218 + }) 219 + return data 220 + } 221 + }) 222 222 223 223 /** 224 224 * Uploads an image. ··· 228 228 export const uploadFileMutation = ( 229 229 options?: Partial<Options<UploadFileData>> 230 230 ): UseMutationOptions<UploadFileResponse, Options<UploadFileData>, Error> => ({ 231 - mutation: async (fnOptions) => { 232 - const { data } = await uploadFile({ 233 - ...options, 234 - ...fnOptions, 235 - throwOnError: true 236 - }) 237 - return data 238 - } 239 - }) 231 + mutation: async (fnOptions) => { 232 + const { data } = await uploadFile({ 233 + ...options, 234 + ...fnOptions, 235 + throwOnError: true 236 + }) 237 + return data 238 + } 239 + }) 240 240 241 241 /** 242 242 * Returns pet inventories by status. ··· 263 263 export const placeOrderMutation = ( 264 264 options?: Partial<Options<PlaceOrderData>> 265 265 ): UseMutationOptions<PlaceOrderResponse, Options<PlaceOrderData>, Error> => ({ 266 - mutation: async (fnOptions) => { 267 - const { data } = await placeOrder({ 268 - ...options, 269 - ...fnOptions, 270 - throwOnError: true 271 - }) 272 - return data 273 - } 274 - }) 266 + mutation: async (fnOptions) => { 267 + const { data } = await placeOrder({ 268 + ...options, 269 + ...fnOptions, 270 + throwOnError: true 271 + }) 272 + return data 273 + } 274 + }) 275 275 276 276 /** 277 277 * Delete purchase order by identifier. ··· 281 281 export const deleteOrderMutation = ( 282 282 options?: Partial<Options<DeleteOrderData>> 283 283 ): UseMutationOptions<unknown, Options<DeleteOrderData>, Error> => ({ 284 - mutation: async (fnOptions) => { 285 - const { data } = await deleteOrder({ 286 - ...options, 287 - ...fnOptions, 288 - throwOnError: true 289 - }) 290 - return data 291 - } 292 - }) 284 + mutation: async (fnOptions) => { 285 + const { data } = await deleteOrder({ 286 + ...options, 287 + ...fnOptions, 288 + throwOnError: true 289 + }) 290 + return data 291 + } 292 + }) 293 293 294 294 /** 295 295 * Find purchase order by ID. ··· 316 316 export const createUserMutation = ( 317 317 options?: Partial<Options<CreateUserData>> 318 318 ): UseMutationOptions<CreateUserResponse, Options<CreateUserData>, Error> => ({ 319 - mutation: async (fnOptions) => { 320 - const { data } = await createUser({ 321 - ...options, 322 - ...fnOptions, 323 - throwOnError: true 324 - }) 325 - return data 326 - } 327 - }) 319 + mutation: async (fnOptions) => { 320 + const { data } = await createUser({ 321 + ...options, 322 + ...fnOptions, 323 + throwOnError: true 324 + }) 325 + return data 326 + } 327 + }) 328 328 329 329 /** 330 330 * Creates list of users with given input array. ··· 338 338 Options<CreateUsersWithListInputData>, 339 339 Error 340 340 > => ({ 341 - mutation: async (fnOptions) => { 342 - const { data } = await createUsersWithListInput({ 343 - ...options, 344 - ...fnOptions, 345 - throwOnError: true 346 - }) 347 - return data 348 - } 349 - }) 341 + mutation: async (fnOptions) => { 342 + const { data } = await createUsersWithListInput({ 343 + ...options, 344 + ...fnOptions, 345 + throwOnError: true 346 + }) 347 + return data 348 + } 349 + }) 350 350 351 351 /** 352 352 * Logs user into the system. ··· 390 390 export const deleteUserMutation = ( 391 391 options?: Partial<Options<DeleteUserData>> 392 392 ): UseMutationOptions<unknown, Options<DeleteUserData>, Error> => ({ 393 - mutation: async (fnOptions) => { 394 - const { data } = await deleteUser({ 395 - ...options, 396 - ...fnOptions, 397 - throwOnError: true 398 - }) 399 - return data 400 - } 401 - }) 393 + mutation: async (fnOptions) => { 394 + const { data } = await deleteUser({ 395 + ...options, 396 + ...fnOptions, 397 + throwOnError: true 398 + }) 399 + return data 400 + } 401 + }) 402 402 403 403 /** 404 404 * Get user by user name. ··· 425 425 export const updateUserMutation = ( 426 426 options?: Partial<Options<UpdateUserData>> 427 427 ): UseMutationOptions<unknown, Options<UpdateUserData>, Error> => ({ 428 - mutation: async (fnOptions) => { 429 - const { data } = await updateUser({ 430 - ...options, 431 - ...fnOptions, 432 - throwOnError: true 433 - }) 434 - return data 435 - } 436 - }) 428 + mutation: async (fnOptions) => { 429 + const { data } = await updateUser({ 430 + ...options, 431 + ...fnOptions, 432 + throwOnError: true 433 + }) 434 + return data 435 + } 436 + })
+38 -27
examples/openapi-ts-pinia-colada/src/client/sdk.gen.ts
··· 86 86 */ 87 87 export const addPet = <ThrowOnError extends boolean = false>( 88 88 options: Options<AddPetData, ThrowOnError> 89 - ) => (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 89 + ) => 90 + (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 90 91 security: [ 91 92 { 92 93 scheme: 'bearer', ··· 108 109 */ 109 110 export const updatePet = <ThrowOnError extends boolean = false>( 110 111 options: Options<UpdatePetData, ThrowOnError> 111 - ) => (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({ 112 + ) => 113 + (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({ 112 114 security: [ 113 115 { 114 116 scheme: 'bearer', ··· 130 132 */ 131 133 export const findPetsByStatus = <ThrowOnError extends boolean = false>( 132 134 options: Options<FindPetsByStatusData, ThrowOnError> 133 - ) => (options.client ?? client).get< 134 - FindPetsByStatusResponses, 135 - FindPetsByStatusErrors, 136 - ThrowOnError 137 - >({ 135 + ) => 136 + (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({ 138 137 security: [ 139 138 { 140 139 scheme: 'bearer', ··· 152 151 */ 153 152 export const findPetsByTags = <ThrowOnError extends boolean = false>( 154 153 options: Options<FindPetsByTagsData, ThrowOnError> 155 - ) => (options.client ?? client).get< 156 - FindPetsByTagsResponses, 157 - FindPetsByTagsErrors, 158 - ThrowOnError 159 - >({ 154 + ) => 155 + (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({ 160 156 security: [ 161 157 { 162 158 scheme: 'bearer', ··· 174 170 */ 175 171 export const deletePet = <ThrowOnError extends boolean = false>( 176 172 options: Options<DeletePetData, ThrowOnError> 177 - ) => (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({ 173 + ) => 174 + (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({ 178 175 security: [ 179 176 { 180 177 scheme: 'bearer', ··· 192 189 */ 193 190 export const getPetById = <ThrowOnError extends boolean = false>( 194 191 options: Options<GetPetByIdData, ThrowOnError> 195 - ) => (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({ 192 + ) => 193 + (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({ 196 194 security: [ 197 195 { 198 196 name: 'api_key', ··· 214 212 */ 215 213 export const updatePetWithForm = <ThrowOnError extends boolean = false>( 216 214 options: Options<UpdatePetWithFormData, ThrowOnError> 217 - ) => (options.client ?? client).post< 215 + ) => 216 + (options.client ?? client).post< 218 217 UpdatePetWithFormResponses, 219 218 UpdatePetWithFormErrors, 220 219 ThrowOnError ··· 236 235 */ 237 236 export const uploadFile = <ThrowOnError extends boolean = false>( 238 237 options: Options<UploadFileData, ThrowOnError> 239 - ) => (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({ 238 + ) => 239 + (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({ 240 240 bodySerializer: null, 241 241 security: [ 242 242 { ··· 259 259 */ 260 260 export const getInventory = <ThrowOnError extends boolean = false>( 261 261 options?: Options<GetInventoryData, ThrowOnError> 262 - ) => (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({ 262 + ) => 263 + (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({ 263 264 security: [ 264 265 { 265 266 name: 'api_key', ··· 277 278 */ 278 279 export const placeOrder = <ThrowOnError extends boolean = false>( 279 280 options?: Options<PlaceOrderData, ThrowOnError> 280 - ) => (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({ 281 + ) => 282 + (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({ 281 283 url: '/store/order', 282 284 ...options, 283 285 headers: { ··· 293 295 */ 294 296 export const deleteOrder = <ThrowOnError extends boolean = false>( 295 297 options: Options<DeleteOrderData, ThrowOnError> 296 - ) => (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({ 298 + ) => 299 + (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({ 297 300 url: '/store/order/{orderId}', 298 301 ...options 299 302 }) ··· 305 308 */ 306 309 export const getOrderById = <ThrowOnError extends boolean = false>( 307 310 options: Options<GetOrderByIdData, ThrowOnError> 308 - ) => (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({ 311 + ) => 312 + (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({ 309 313 url: '/store/order/{orderId}', 310 314 ...options 311 315 }) ··· 317 321 */ 318 322 export const createUser = <ThrowOnError extends boolean = false>( 319 323 options?: Options<CreateUserData, ThrowOnError> 320 - ) => (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({ 324 + ) => 325 + (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({ 321 326 url: '/user', 322 327 ...options, 323 328 headers: { ··· 333 338 */ 334 339 export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 335 340 options?: Options<CreateUsersWithListInputData, ThrowOnError> 336 - ) => (options?.client ?? client).post< 341 + ) => 342 + (options?.client ?? client).post< 337 343 CreateUsersWithListInputResponses, 338 344 CreateUsersWithListInputErrors, 339 345 ThrowOnError ··· 353 359 */ 354 360 export const loginUser = <ThrowOnError extends boolean = false>( 355 361 options?: Options<LoginUserData, ThrowOnError> 356 - ) => (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({ 362 + ) => 363 + (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({ 357 364 url: '/user/login', 358 365 ...options 359 366 }) ··· 365 372 */ 366 373 export const logoutUser = <ThrowOnError extends boolean = false>( 367 374 options?: Options<LogoutUserData, ThrowOnError> 368 - ) => (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({ 375 + ) => 376 + (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({ 369 377 url: '/user/logout', 370 378 ...options 371 379 }) ··· 377 385 */ 378 386 export const deleteUser = <ThrowOnError extends boolean = false>( 379 387 options: Options<DeleteUserData, ThrowOnError> 380 - ) => (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({ 388 + ) => 389 + (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({ 381 390 url: '/user/{username}', 382 391 ...options 383 392 }) ··· 389 398 */ 390 399 export const getUserByName = <ThrowOnError extends boolean = false>( 391 400 options: Options<GetUserByNameData, ThrowOnError> 392 - ) => (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({ 401 + ) => 402 + (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({ 393 403 url: '/user/{username}', 394 404 ...options 395 405 }) ··· 401 411 */ 402 412 export const updateUser = <ThrowOnError extends boolean = false>( 403 413 options: Options<UpdateUserData, ThrowOnError> 404 - ) => (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({ 414 + ) => 415 + (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({ 405 416 url: '/user/{username}', 406 417 ...options, 407 418 headers: {
+17 -17
examples/openapi-ts-pinia-colada/src/client/types.gen.ts
··· 5 5 } 6 6 7 7 export type Order = { 8 - complete?: boolean, 9 - id?: number, 10 - petId?: number, 11 - quantity?: number, 12 - shipDate?: string, 8 + complete?: boolean 9 + id?: number 10 + petId?: number 11 + quantity?: number 12 + shipDate?: string 13 13 /** 14 14 * Order Status 15 15 */ ··· 22 22 } 23 23 24 24 export type User = { 25 - email?: string, 26 - firstName?: string, 27 - id?: number, 25 + email?: string 26 + firstName?: string 27 + id?: number 28 28 lastName?: string 29 - password?: string, 30 - phone?: string, 29 + password?: string 30 + phone?: string 31 31 /** 32 32 * User Status 33 33 */ 34 - userStatus?: number, 34 + userStatus?: number 35 35 username?: string 36 36 } 37 37 ··· 41 41 } 42 42 43 43 export type Pet = { 44 - category?: Category, 45 - id?: number, 46 - name: string, 44 + category?: Category 45 + id?: number 46 + name: string 47 47 photoUrls: Array<string> 48 48 /** 49 49 * pet status in the store 50 50 */ 51 - status?: 'available' | 'pending' | 'sold', 51 + status?: 'available' | 'pending' | 'sold' 52 52 tags?: Array<Tag> 53 53 } 54 54 55 55 export type ApiResponse = { 56 56 code?: number 57 - message?: string, 57 + message?: string 58 58 type?: string 59 59 } 60 60 ··· 535 535 /** 536 536 * The password for login in clear text 537 537 */ 538 - password?: string, 538 + password?: string 539 539 /** 540 540 * The user name for login 541 541 */
+72 -40
examples/openapi-ts-sample/src/client/sdk.gen.ts
··· 121 121 */ 122 122 export const addPet = <ThrowOnError extends boolean = false>( 123 123 options: Options<AddPetData, ThrowOnError>, 124 - ) => (options.client ?? client).post< 125 - AddPetResponses, 126 - AddPetErrors, 127 - ThrowOnError 128 - >({ 124 + ) => 125 + (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 129 126 requestValidator: async (data) => await zAddPetData.parseAsync(data), 130 127 responseValidator: async (data) => await zAddPetResponse.parseAsync(data), 131 128 security: [ ··· 149 146 */ 150 147 export const updatePet = <ThrowOnError extends boolean = false>( 151 148 options: Options<UpdatePetData, ThrowOnError>, 152 - ) => (options.client ?? client).put< 149 + ) => 150 + (options.client ?? client).put< 153 151 UpdatePetResponses, 154 152 UpdatePetErrors, 155 153 ThrowOnError 156 154 >({ 157 155 requestValidator: async (data) => await zUpdatePetData.parseAsync(data), 158 - responseValidator: async (data) => await zUpdatePetResponse.parseAsync(data), 156 + responseValidator: async (data) => 157 + await zUpdatePetResponse.parseAsync(data), 159 158 security: [ 160 159 { 161 160 scheme: 'bearer', ··· 177 176 */ 178 177 export const findPetsByStatus = <ThrowOnError extends boolean = false>( 179 178 options: Options<FindPetsByStatusData, ThrowOnError>, 180 - ) => (options.client ?? client).get< 179 + ) => 180 + (options.client ?? client).get< 181 181 FindPetsByStatusResponses, 182 182 FindPetsByStatusErrors, 183 183 ThrowOnError 184 184 >({ 185 - requestValidator: async (data) => await zFindPetsByStatusData.parseAsync(data), 186 - responseValidator: async (data) => await zFindPetsByStatusResponse.parseAsync(data), 185 + requestValidator: async (data) => 186 + await zFindPetsByStatusData.parseAsync(data), 187 + responseValidator: async (data) => 188 + await zFindPetsByStatusResponse.parseAsync(data), 187 189 security: [ 188 190 { 189 191 scheme: 'bearer', ··· 201 203 */ 202 204 export const findPetsByTags = <ThrowOnError extends boolean = false>( 203 205 options: Options<FindPetsByTagsData, ThrowOnError>, 204 - ) => (options.client ?? client).get< 206 + ) => 207 + (options.client ?? client).get< 205 208 FindPetsByTagsResponses, 206 209 FindPetsByTagsErrors, 207 210 ThrowOnError 208 211 >({ 209 - requestValidator: async (data) => await zFindPetsByTagsData.parseAsync(data), 210 - responseValidator: async (data) => await zFindPetsByTagsResponse.parseAsync(data), 212 + requestValidator: async (data) => 213 + await zFindPetsByTagsData.parseAsync(data), 214 + responseValidator: async (data) => 215 + await zFindPetsByTagsResponse.parseAsync(data), 211 216 security: [ 212 217 { 213 218 scheme: 'bearer', ··· 225 230 */ 226 231 export const deletePet = <ThrowOnError extends boolean = false>( 227 232 options: Options<DeletePetData, ThrowOnError>, 228 - ) => (options.client ?? client).delete< 233 + ) => 234 + (options.client ?? client).delete< 229 235 DeletePetResponses, 230 236 DeletePetErrors, 231 237 ThrowOnError ··· 248 254 */ 249 255 export const getPetById = <ThrowOnError extends boolean = false>( 250 256 options: Options<GetPetByIdData, ThrowOnError>, 251 - ) => (options.client ?? client).get< 257 + ) => 258 + (options.client ?? client).get< 252 259 GetPetByIdResponses, 253 260 GetPetByIdErrors, 254 261 ThrowOnError 255 262 >({ 256 263 requestValidator: async (data) => await zGetPetByIdData.parseAsync(data), 257 - responseValidator: async (data) => await zGetPetByIdResponse.parseAsync(data), 264 + responseValidator: async (data) => 265 + await zGetPetByIdResponse.parseAsync(data), 258 266 security: [ 259 267 { 260 268 name: 'api_key', ··· 276 284 */ 277 285 export const updatePetWithForm = <ThrowOnError extends boolean = false>( 278 286 options: Options<UpdatePetWithFormData, ThrowOnError>, 279 - ) => (options.client ?? client).post< 287 + ) => 288 + (options.client ?? client).post< 280 289 UpdatePetWithFormResponses, 281 290 UpdatePetWithFormErrors, 282 291 ThrowOnError 283 292 >({ 284 - requestValidator: async (data) => await zUpdatePetWithFormData.parseAsync(data), 285 - responseValidator: async (data) => await zUpdatePetWithFormResponse.parseAsync(data), 293 + requestValidator: async (data) => 294 + await zUpdatePetWithFormData.parseAsync(data), 295 + responseValidator: async (data) => 296 + await zUpdatePetWithFormResponse.parseAsync(data), 286 297 security: [ 287 298 { 288 299 scheme: 'bearer', ··· 300 311 */ 301 312 export const uploadFile = <ThrowOnError extends boolean = false>( 302 313 options: Options<UploadFileData, ThrowOnError>, 303 - ) => (options.client ?? client).post< 314 + ) => 315 + (options.client ?? client).post< 304 316 UploadFileResponses, 305 317 UploadFileErrors, 306 318 ThrowOnError 307 319 >({ 308 320 bodySerializer: null, 309 321 requestValidator: async (data) => await zUploadFileData.parseAsync(data), 310 - responseValidator: async (data) => await zUploadFileResponse.parseAsync(data), 322 + responseValidator: async (data) => 323 + await zUploadFileResponse.parseAsync(data), 311 324 security: [ 312 325 { 313 326 scheme: 'bearer', ··· 329 342 */ 330 343 export const getInventory = <ThrowOnError extends boolean = false>( 331 344 options?: Options<GetInventoryData, ThrowOnError>, 332 - ) => (options?.client ?? client).get< 345 + ) => 346 + (options?.client ?? client).get< 333 347 GetInventoryResponses, 334 348 GetInventoryErrors, 335 349 ThrowOnError 336 350 >({ 337 351 requestValidator: async (data) => await zGetInventoryData.parseAsync(data), 338 - responseValidator: async (data) => await zGetInventoryResponse.parseAsync(data), 352 + responseValidator: async (data) => 353 + await zGetInventoryResponse.parseAsync(data), 339 354 security: [ 340 355 { 341 356 name: 'api_key', ··· 353 368 */ 354 369 export const placeOrder = <ThrowOnError extends boolean = false>( 355 370 options?: Options<PlaceOrderData, ThrowOnError>, 356 - ) => (options?.client ?? client).post< 371 + ) => 372 + (options?.client ?? client).post< 357 373 PlaceOrderResponses, 358 374 PlaceOrderErrors, 359 375 ThrowOnError 360 376 >({ 361 377 requestValidator: async (data) => await zPlaceOrderData.parseAsync(data), 362 - responseValidator: async (data) => await zPlaceOrderResponse.parseAsync(data), 378 + responseValidator: async (data) => 379 + await zPlaceOrderResponse.parseAsync(data), 363 380 url: '/store/order', 364 381 ...options, 365 382 headers: { ··· 375 392 */ 376 393 export const deleteOrder = <ThrowOnError extends boolean = false>( 377 394 options: Options<DeleteOrderData, ThrowOnError>, 378 - ) => (options.client ?? client).delete< 395 + ) => 396 + (options.client ?? client).delete< 379 397 DeleteOrderResponses, 380 398 DeleteOrderErrors, 381 399 ThrowOnError ··· 392 410 */ 393 411 export const getOrderById = <ThrowOnError extends boolean = false>( 394 412 options: Options<GetOrderByIdData, ThrowOnError>, 395 - ) => (options.client ?? client).get< 413 + ) => 414 + (options.client ?? client).get< 396 415 GetOrderByIdResponses, 397 416 GetOrderByIdErrors, 398 417 ThrowOnError 399 418 >({ 400 419 requestValidator: async (data) => await zGetOrderByIdData.parseAsync(data), 401 - responseValidator: async (data) => await zGetOrderByIdResponse.parseAsync(data), 420 + responseValidator: async (data) => 421 + await zGetOrderByIdResponse.parseAsync(data), 402 422 url: '/store/order/{orderId}', 403 423 ...options, 404 424 }); ··· 410 430 */ 411 431 export const createUser = <ThrowOnError extends boolean = false>( 412 432 options?: Options<CreateUserData, ThrowOnError>, 413 - ) => (options?.client ?? client).post< 433 + ) => 434 + (options?.client ?? client).post< 414 435 CreateUserResponses, 415 436 CreateUserErrors, 416 437 ThrowOnError 417 438 >({ 418 439 requestValidator: async (data) => await zCreateUserData.parseAsync(data), 419 - responseValidator: async (data) => await zCreateUserResponse.parseAsync(data), 440 + responseValidator: async (data) => 441 + await zCreateUserResponse.parseAsync(data), 420 442 url: '/user', 421 443 ...options, 422 444 headers: { ··· 432 454 */ 433 455 export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 434 456 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 435 - ) => (options?.client ?? client).post< 457 + ) => 458 + (options?.client ?? client).post< 436 459 CreateUsersWithListInputResponses, 437 460 CreateUsersWithListInputErrors, 438 461 ThrowOnError 439 462 >({ 440 - requestValidator: async (data) => await zCreateUsersWithListInputData.parseAsync(data), 441 - responseValidator: async (data) => await zCreateUsersWithListInputResponse.parseAsync(data), 463 + requestValidator: async (data) => 464 + await zCreateUsersWithListInputData.parseAsync(data), 465 + responseValidator: async (data) => 466 + await zCreateUsersWithListInputResponse.parseAsync(data), 442 467 url: '/user/createWithList', 443 468 ...options, 444 469 headers: { ··· 454 479 */ 455 480 export const loginUser = <ThrowOnError extends boolean = false>( 456 481 options?: Options<LoginUserData, ThrowOnError>, 457 - ) => (options?.client ?? client).get< 482 + ) => 483 + (options?.client ?? client).get< 458 484 LoginUserResponses, 459 485 LoginUserErrors, 460 486 ThrowOnError 461 487 >({ 462 488 requestValidator: async (data) => await zLoginUserData.parseAsync(data), 463 - responseValidator: async (data) => await zLoginUserResponse.parseAsync(data), 489 + responseValidator: async (data) => 490 + await zLoginUserResponse.parseAsync(data), 464 491 url: '/user/login', 465 492 ...options, 466 493 }); ··· 472 499 */ 473 500 export const logoutUser = <ThrowOnError extends boolean = false>( 474 501 options?: Options<LogoutUserData, ThrowOnError>, 475 - ) => (options?.client ?? client).get< 502 + ) => 503 + (options?.client ?? client).get< 476 504 LogoutUserResponses, 477 505 LogoutUserErrors, 478 506 ThrowOnError ··· 489 517 */ 490 518 export const deleteUser = <ThrowOnError extends boolean = false>( 491 519 options: Options<DeleteUserData, ThrowOnError>, 492 - ) => (options.client ?? client).delete< 520 + ) => 521 + (options.client ?? client).delete< 493 522 DeleteUserResponses, 494 523 DeleteUserErrors, 495 524 ThrowOnError ··· 506 535 */ 507 536 export const getUserByName = <ThrowOnError extends boolean = false>( 508 537 options: Options<GetUserByNameData, ThrowOnError>, 509 - ) => (options.client ?? client).get< 538 + ) => 539 + (options.client ?? client).get< 510 540 GetUserByNameResponses, 511 541 GetUserByNameErrors, 512 542 ThrowOnError 513 543 >({ 514 544 requestValidator: async (data) => await zGetUserByNameData.parseAsync(data), 515 - responseValidator: async (data) => await zGetUserByNameResponse.parseAsync(data), 545 + responseValidator: async (data) => 546 + await zGetUserByNameResponse.parseAsync(data), 516 547 url: '/user/{username}', 517 548 ...options, 518 549 }); ··· 524 555 */ 525 556 export const updateUser = <ThrowOnError extends boolean = false>( 526 557 options: Options<UpdateUserData, ThrowOnError>, 527 - ) => (options.client ?? client).put< 558 + ) => 559 + (options.client ?? client).put< 528 560 UpdateUserResponses, 529 561 UpdateUserErrors, 530 562 ThrowOnError
+16 -8
examples/openapi-ts-tanstack-angular-query-experimental/src/client/@tanstack/angular-query-experimental.gen.ts
··· 159 159 */ 160 160 export const findPetsByStatusOptions = ( 161 161 options: Options<FindPetsByStatusData>, 162 - ) => queryOptions({ 162 + ) => 163 + queryOptions({ 163 164 queryFn: async ({ queryKey, signal }) => { 164 165 const { data } = await findPetsByStatus({ 165 166 ...options, ··· 180 181 * 181 182 * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. 182 183 */ 183 - export const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) => queryOptions({ 184 + export const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) => 185 + queryOptions({ 184 186 queryFn: async ({ queryKey, signal }) => { 185 187 const { data } = await findPetsByTags({ 186 188 ...options, ··· 226 228 * 227 229 * Returns a single pet. 228 230 */ 229 - export const getPetByIdOptions = (options: Options<GetPetByIdData>) => queryOptions({ 231 + export const getPetByIdOptions = (options: Options<GetPetByIdData>) => 232 + queryOptions({ 230 233 queryFn: async ({ queryKey, signal }) => { 231 234 const { data } = await getPetById({ 232 235 ...options, ··· 305 308 * 306 309 * Returns a map of status codes to quantities. 307 310 */ 308 - export const getInventoryOptions = (options?: Options<GetInventoryData>) => queryOptions({ 311 + export const getInventoryOptions = (options?: Options<GetInventoryData>) => 312 + queryOptions({ 309 313 queryFn: async ({ queryKey, signal }) => { 310 314 const { data } = await getInventory({ 311 315 ...options, ··· 380 384 * 381 385 * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. 382 386 */ 383 - export const getOrderByIdOptions = (options: Options<GetOrderByIdData>) => queryOptions({ 387 + export const getOrderByIdOptions = (options: Options<GetOrderByIdData>) => 388 + queryOptions({ 384 389 queryFn: async ({ queryKey, signal }) => { 385 390 const { data } = await getOrderById({ 386 391 ...options, ··· 459 464 * 460 465 * Log into the system. 461 466 */ 462 - export const loginUserOptions = (options?: Options<LoginUserData>) => queryOptions({ 467 + export const loginUserOptions = (options?: Options<LoginUserData>) => 468 + queryOptions({ 463 469 queryFn: async ({ queryKey, signal }) => { 464 470 const { data } = await loginUser({ 465 471 ...options, ··· 480 486 * 481 487 * Log user out of the system. 482 488 */ 483 - export const logoutUserOptions = (options?: Options<LogoutUserData>) => queryOptions({ 489 + export const logoutUserOptions = (options?: Options<LogoutUserData>) => 490 + queryOptions({ 484 491 queryFn: async ({ queryKey, signal }) => { 485 492 const { data } = await logoutUser({ 486 493 ...options, ··· 526 533 * 527 534 * Get user detail based on username. 528 535 */ 529 - export const getUserByNameOptions = (options: Options<GetUserByNameData>) => queryOptions({ 536 + export const getUserByNameOptions = (options: Options<GetUserByNameData>) => 537 + queryOptions({ 530 538 queryFn: async ({ queryKey, signal }) => { 531 539 const { data } = await getUserByName({ 532 540 ...options,
+38 -23
examples/openapi-ts-tanstack-angular-query-experimental/src/client/sdk.gen.ts
··· 86 86 */ 87 87 export const addPet = <ThrowOnError extends boolean = false>( 88 88 options: Options<AddPetData, ThrowOnError>, 89 - ) => (options.client ?? client).post< 90 - AddPetResponses, 91 - AddPetErrors, 92 - ThrowOnError 93 - >({ 89 + ) => 90 + (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 94 91 security: [ 95 92 { 96 93 scheme: 'bearer', ··· 112 109 */ 113 110 export const updatePet = <ThrowOnError extends boolean = false>( 114 111 options: Options<UpdatePetData, ThrowOnError>, 115 - ) => (options.client ?? client).put< 112 + ) => 113 + (options.client ?? client).put< 116 114 UpdatePetResponses, 117 115 UpdatePetErrors, 118 116 ThrowOnError ··· 138 136 */ 139 137 export const findPetsByStatus = <ThrowOnError extends boolean = false>( 140 138 options: Options<FindPetsByStatusData, ThrowOnError>, 141 - ) => (options.client ?? client).get< 139 + ) => 140 + (options.client ?? client).get< 142 141 FindPetsByStatusResponses, 143 142 FindPetsByStatusErrors, 144 143 ThrowOnError ··· 160 159 */ 161 160 export const findPetsByTags = <ThrowOnError extends boolean = false>( 162 161 options: Options<FindPetsByTagsData, ThrowOnError>, 163 - ) => (options.client ?? client).get< 162 + ) => 163 + (options.client ?? client).get< 164 164 FindPetsByTagsResponses, 165 165 FindPetsByTagsErrors, 166 166 ThrowOnError ··· 182 182 */ 183 183 export const deletePet = <ThrowOnError extends boolean = false>( 184 184 options: Options<DeletePetData, ThrowOnError>, 185 - ) => (options.client ?? client).delete< 185 + ) => 186 + (options.client ?? client).delete< 186 187 DeletePetResponses, 187 188 DeletePetErrors, 188 189 ThrowOnError ··· 204 205 */ 205 206 export const getPetById = <ThrowOnError extends boolean = false>( 206 207 options: Options<GetPetByIdData, ThrowOnError>, 207 - ) => (options.client ?? client).get< 208 + ) => 209 + (options.client ?? client).get< 208 210 GetPetByIdResponses, 209 211 GetPetByIdErrors, 210 212 ThrowOnError ··· 230 232 */ 231 233 export const updatePetWithForm = <ThrowOnError extends boolean = false>( 232 234 options: Options<UpdatePetWithFormData, ThrowOnError>, 233 - ) => (options.client ?? client).post< 235 + ) => 236 + (options.client ?? client).post< 234 237 UpdatePetWithFormResponses, 235 238 UpdatePetWithFormErrors, 236 239 ThrowOnError ··· 252 255 */ 253 256 export const uploadFile = <ThrowOnError extends boolean = false>( 254 257 options: Options<UploadFileData, ThrowOnError>, 255 - ) => (options.client ?? client).post< 258 + ) => 259 + (options.client ?? client).post< 256 260 UploadFileResponses, 257 261 UploadFileErrors, 258 262 ThrowOnError ··· 279 283 */ 280 284 export const getInventory = <ThrowOnError extends boolean = false>( 281 285 options?: Options<GetInventoryData, ThrowOnError>, 282 - ) => (options?.client ?? client).get< 286 + ) => 287 + (options?.client ?? client).get< 283 288 GetInventoryResponses, 284 289 GetInventoryErrors, 285 290 ThrowOnError ··· 301 306 */ 302 307 export const placeOrder = <ThrowOnError extends boolean = false>( 303 308 options?: Options<PlaceOrderData, ThrowOnError>, 304 - ) => (options?.client ?? client).post< 309 + ) => 310 + (options?.client ?? client).post< 305 311 PlaceOrderResponses, 306 312 PlaceOrderErrors, 307 313 ThrowOnError ··· 321 327 */ 322 328 export const deleteOrder = <ThrowOnError extends boolean = false>( 323 329 options: Options<DeleteOrderData, ThrowOnError>, 324 - ) => (options.client ?? client).delete< 330 + ) => 331 + (options.client ?? client).delete< 325 332 DeleteOrderResponses, 326 333 DeleteOrderErrors, 327 334 ThrowOnError ··· 337 344 */ 338 345 export const getOrderById = <ThrowOnError extends boolean = false>( 339 346 options: Options<GetOrderByIdData, ThrowOnError>, 340 - ) => (options.client ?? client).get< 347 + ) => 348 + (options.client ?? client).get< 341 349 GetOrderByIdResponses, 342 350 GetOrderByIdErrors, 343 351 ThrowOnError ··· 353 361 */ 354 362 export const createUser = <ThrowOnError extends boolean = false>( 355 363 options?: Options<CreateUserData, ThrowOnError>, 356 - ) => (options?.client ?? client).post< 364 + ) => 365 + (options?.client ?? client).post< 357 366 CreateUserResponses, 358 367 CreateUserErrors, 359 368 ThrowOnError ··· 373 382 */ 374 383 export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 375 384 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 376 - ) => (options?.client ?? client).post< 385 + ) => 386 + (options?.client ?? client).post< 377 387 CreateUsersWithListInputResponses, 378 388 CreateUsersWithListInputErrors, 379 389 ThrowOnError ··· 393 403 */ 394 404 export const loginUser = <ThrowOnError extends boolean = false>( 395 405 options?: Options<LoginUserData, ThrowOnError>, 396 - ) => (options?.client ?? client).get< 406 + ) => 407 + (options?.client ?? client).get< 397 408 LoginUserResponses, 398 409 LoginUserErrors, 399 410 ThrowOnError ··· 409 420 */ 410 421 export const logoutUser = <ThrowOnError extends boolean = false>( 411 422 options?: Options<LogoutUserData, ThrowOnError>, 412 - ) => (options?.client ?? client).get< 423 + ) => 424 + (options?.client ?? client).get< 413 425 LogoutUserResponses, 414 426 LogoutUserErrors, 415 427 ThrowOnError ··· 425 437 */ 426 438 export const deleteUser = <ThrowOnError extends boolean = false>( 427 439 options: Options<DeleteUserData, ThrowOnError>, 428 - ) => (options.client ?? client).delete< 440 + ) => 441 + (options.client ?? client).delete< 429 442 DeleteUserResponses, 430 443 DeleteUserErrors, 431 444 ThrowOnError ··· 441 454 */ 442 455 export const getUserByName = <ThrowOnError extends boolean = false>( 443 456 options: Options<GetUserByNameData, ThrowOnError>, 444 - ) => (options.client ?? client).get< 457 + ) => 458 + (options.client ?? client).get< 445 459 GetUserByNameResponses, 446 460 GetUserByNameErrors, 447 461 ThrowOnError ··· 457 471 */ 458 472 export const updateUser = <ThrowOnError extends boolean = false>( 459 473 options: Options<UpdateUserData, ThrowOnError>, 460 - ) => (options.client ?? client).put< 474 + ) => 475 + (options.client ?? client).put< 461 476 UpdateUserResponses, 462 477 UpdateUserErrors, 463 478 ThrowOnError
+16 -8
examples/openapi-ts-tanstack-react-query/src/client/@tanstack/react-query.gen.ts
··· 163 163 */ 164 164 export const findPetsByStatusOptions = ( 165 165 options: Options<FindPetsByStatusData>, 166 - ) => queryOptions({ 166 + ) => 167 + queryOptions({ 167 168 queryFn: async ({ queryKey, signal }) => { 168 169 const { data } = await findPetsByStatus({ 169 170 ...options, ··· 184 185 * 185 186 * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. 186 187 */ 187 - export const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) => queryOptions({ 188 + export const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) => 189 + queryOptions({ 188 190 queryFn: async ({ queryKey, signal }) => { 189 191 const { data } = await findPetsByTags({ 190 192 ...options, ··· 230 232 * 231 233 * Returns a single pet. 232 234 */ 233 - export const getPetByIdOptions = (options: Options<GetPetByIdData>) => queryOptions({ 235 + export const getPetByIdOptions = (options: Options<GetPetByIdData>) => 236 + queryOptions({ 234 237 queryFn: async ({ queryKey, signal }) => { 235 238 const { data } = await getPetById({ 236 239 ...options, ··· 309 312 * 310 313 * Returns a map of status codes to quantities. 311 314 */ 312 - export const getInventoryOptions = (options?: Options<GetInventoryData>) => queryOptions({ 315 + export const getInventoryOptions = (options?: Options<GetInventoryData>) => 316 + queryOptions({ 313 317 queryFn: async ({ queryKey, signal }) => { 314 318 const { data } = await getInventory({ 315 319 ...options, ··· 384 388 * 385 389 * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. 386 390 */ 387 - export const getOrderByIdOptions = (options: Options<GetOrderByIdData>) => queryOptions({ 391 + export const getOrderByIdOptions = (options: Options<GetOrderByIdData>) => 392 + queryOptions({ 388 393 queryFn: async ({ queryKey, signal }) => { 389 394 const { data } = await getOrderById({ 390 395 ...options, ··· 463 468 * 464 469 * Log into the system. 465 470 */ 466 - export const loginUserOptions = (options?: Options<LoginUserData>) => queryOptions({ 471 + export const loginUserOptions = (options?: Options<LoginUserData>) => 472 + queryOptions({ 467 473 queryFn: async ({ queryKey, signal }) => { 468 474 const { data } = await loginUser({ 469 475 ...options, ··· 484 490 * 485 491 * Log user out of the system. 486 492 */ 487 - export const logoutUserOptions = (options?: Options<LogoutUserData>) => queryOptions({ 493 + export const logoutUserOptions = (options?: Options<LogoutUserData>) => 494 + queryOptions({ 488 495 queryFn: async ({ queryKey, signal }) => { 489 496 const { data } = await logoutUser({ 490 497 ...options, ··· 530 537 * 531 538 * Get user detail based on username. 532 539 */ 533 - export const getUserByNameOptions = (options: Options<GetUserByNameData>) => queryOptions({ 540 + export const getUserByNameOptions = (options: Options<GetUserByNameData>) => 541 + queryOptions({ 534 542 queryFn: async ({ queryKey, signal }) => { 535 543 const { data } = await getUserByName({ 536 544 ...options,
+38 -23
examples/openapi-ts-tanstack-react-query/src/client/sdk.gen.ts
··· 86 86 */ 87 87 export const addPet = <ThrowOnError extends boolean = false>( 88 88 options: Options<AddPetData, ThrowOnError>, 89 - ) => (options.client ?? client).post< 90 - AddPetResponses, 91 - AddPetErrors, 92 - ThrowOnError 93 - >({ 89 + ) => 90 + (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 94 91 security: [ 95 92 { 96 93 scheme: 'bearer', ··· 112 109 */ 113 110 export const updatePet = <ThrowOnError extends boolean = false>( 114 111 options: Options<UpdatePetData, ThrowOnError>, 115 - ) => (options.client ?? client).put< 112 + ) => 113 + (options.client ?? client).put< 116 114 UpdatePetResponses, 117 115 UpdatePetErrors, 118 116 ThrowOnError ··· 138 136 */ 139 137 export const findPetsByStatus = <ThrowOnError extends boolean = false>( 140 138 options: Options<FindPetsByStatusData, ThrowOnError>, 141 - ) => (options.client ?? client).get< 139 + ) => 140 + (options.client ?? client).get< 142 141 FindPetsByStatusResponses, 143 142 FindPetsByStatusErrors, 144 143 ThrowOnError ··· 160 159 */ 161 160 export const findPetsByTags = <ThrowOnError extends boolean = false>( 162 161 options: Options<FindPetsByTagsData, ThrowOnError>, 163 - ) => (options.client ?? client).get< 162 + ) => 163 + (options.client ?? client).get< 164 164 FindPetsByTagsResponses, 165 165 FindPetsByTagsErrors, 166 166 ThrowOnError ··· 182 182 */ 183 183 export const deletePet = <ThrowOnError extends boolean = false>( 184 184 options: Options<DeletePetData, ThrowOnError>, 185 - ) => (options.client ?? client).delete< 185 + ) => 186 + (options.client ?? client).delete< 186 187 DeletePetResponses, 187 188 DeletePetErrors, 188 189 ThrowOnError ··· 204 205 */ 205 206 export const getPetById = <ThrowOnError extends boolean = false>( 206 207 options: Options<GetPetByIdData, ThrowOnError>, 207 - ) => (options.client ?? client).get< 208 + ) => 209 + (options.client ?? client).get< 208 210 GetPetByIdResponses, 209 211 GetPetByIdErrors, 210 212 ThrowOnError ··· 230 232 */ 231 233 export const updatePetWithForm = <ThrowOnError extends boolean = false>( 232 234 options: Options<UpdatePetWithFormData, ThrowOnError>, 233 - ) => (options.client ?? client).post< 235 + ) => 236 + (options.client ?? client).post< 234 237 UpdatePetWithFormResponses, 235 238 UpdatePetWithFormErrors, 236 239 ThrowOnError ··· 252 255 */ 253 256 export const uploadFile = <ThrowOnError extends boolean = false>( 254 257 options: Options<UploadFileData, ThrowOnError>, 255 - ) => (options.client ?? client).post< 258 + ) => 259 + (options.client ?? client).post< 256 260 UploadFileResponses, 257 261 UploadFileErrors, 258 262 ThrowOnError ··· 279 283 */ 280 284 export const getInventory = <ThrowOnError extends boolean = false>( 281 285 options?: Options<GetInventoryData, ThrowOnError>, 282 - ) => (options?.client ?? client).get< 286 + ) => 287 + (options?.client ?? client).get< 283 288 GetInventoryResponses, 284 289 GetInventoryErrors, 285 290 ThrowOnError ··· 301 306 */ 302 307 export const placeOrder = <ThrowOnError extends boolean = false>( 303 308 options?: Options<PlaceOrderData, ThrowOnError>, 304 - ) => (options?.client ?? client).post< 309 + ) => 310 + (options?.client ?? client).post< 305 311 PlaceOrderResponses, 306 312 PlaceOrderErrors, 307 313 ThrowOnError ··· 321 327 */ 322 328 export const deleteOrder = <ThrowOnError extends boolean = false>( 323 329 options: Options<DeleteOrderData, ThrowOnError>, 324 - ) => (options.client ?? client).delete< 330 + ) => 331 + (options.client ?? client).delete< 325 332 DeleteOrderResponses, 326 333 DeleteOrderErrors, 327 334 ThrowOnError ··· 337 344 */ 338 345 export const getOrderById = <ThrowOnError extends boolean = false>( 339 346 options: Options<GetOrderByIdData, ThrowOnError>, 340 - ) => (options.client ?? client).get< 347 + ) => 348 + (options.client ?? client).get< 341 349 GetOrderByIdResponses, 342 350 GetOrderByIdErrors, 343 351 ThrowOnError ··· 353 361 */ 354 362 export const createUser = <ThrowOnError extends boolean = false>( 355 363 options?: Options<CreateUserData, ThrowOnError>, 356 - ) => (options?.client ?? client).post< 364 + ) => 365 + (options?.client ?? client).post< 357 366 CreateUserResponses, 358 367 CreateUserErrors, 359 368 ThrowOnError ··· 373 382 */ 374 383 export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 375 384 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 376 - ) => (options?.client ?? client).post< 385 + ) => 386 + (options?.client ?? client).post< 377 387 CreateUsersWithListInputResponses, 378 388 CreateUsersWithListInputErrors, 379 389 ThrowOnError ··· 393 403 */ 394 404 export const loginUser = <ThrowOnError extends boolean = false>( 395 405 options?: Options<LoginUserData, ThrowOnError>, 396 - ) => (options?.client ?? client).get< 406 + ) => 407 + (options?.client ?? client).get< 397 408 LoginUserResponses, 398 409 LoginUserErrors, 399 410 ThrowOnError ··· 409 420 */ 410 421 export const logoutUser = <ThrowOnError extends boolean = false>( 411 422 options?: Options<LogoutUserData, ThrowOnError>, 412 - ) => (options?.client ?? client).get< 423 + ) => 424 + (options?.client ?? client).get< 413 425 LogoutUserResponses, 414 426 LogoutUserErrors, 415 427 ThrowOnError ··· 425 437 */ 426 438 export const deleteUser = <ThrowOnError extends boolean = false>( 427 439 options: Options<DeleteUserData, ThrowOnError>, 428 - ) => (options.client ?? client).delete< 440 + ) => 441 + (options.client ?? client).delete< 429 442 DeleteUserResponses, 430 443 DeleteUserErrors, 431 444 ThrowOnError ··· 441 454 */ 442 455 export const getUserByName = <ThrowOnError extends boolean = false>( 443 456 options: Options<GetUserByNameData, ThrowOnError>, 444 - ) => (options.client ?? client).get< 457 + ) => 458 + (options.client ?? client).get< 445 459 GetUserByNameResponses, 446 460 GetUserByNameErrors, 447 461 ThrowOnError ··· 457 471 */ 458 472 export const updateUser = <ThrowOnError extends boolean = false>( 459 473 options: Options<UpdateUserData, ThrowOnError>, 460 - ) => (options.client ?? client).put< 474 + ) => 475 + (options.client ?? client).put< 461 476 UpdateUserResponses, 462 477 UpdateUserErrors, 463 478 ThrowOnError
+16 -8
examples/openapi-ts-tanstack-svelte-query/src/client/@tanstack/svelte-query.gen.ts
··· 159 159 */ 160 160 export const findPetsByStatusOptions = ( 161 161 options: Options<FindPetsByStatusData>, 162 - ) => queryOptions({ 162 + ) => 163 + queryOptions({ 163 164 queryFn: async ({ queryKey, signal }) => { 164 165 const { data } = await findPetsByStatus({ 165 166 ...options, ··· 180 181 * 181 182 * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. 182 183 */ 183 - export const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) => queryOptions({ 184 + export const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) => 185 + queryOptions({ 184 186 queryFn: async ({ queryKey, signal }) => { 185 187 const { data } = await findPetsByTags({ 186 188 ...options, ··· 226 228 * 227 229 * Returns a single pet. 228 230 */ 229 - export const getPetByIdOptions = (options: Options<GetPetByIdData>) => queryOptions({ 231 + export const getPetByIdOptions = (options: Options<GetPetByIdData>) => 232 + queryOptions({ 230 233 queryFn: async ({ queryKey, signal }) => { 231 234 const { data } = await getPetById({ 232 235 ...options, ··· 305 308 * 306 309 * Returns a map of status codes to quantities. 307 310 */ 308 - export const getInventoryOptions = (options?: Options<GetInventoryData>) => queryOptions({ 311 + export const getInventoryOptions = (options?: Options<GetInventoryData>) => 312 + queryOptions({ 309 313 queryFn: async ({ queryKey, signal }) => { 310 314 const { data } = await getInventory({ 311 315 ...options, ··· 380 384 * 381 385 * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. 382 386 */ 383 - export const getOrderByIdOptions = (options: Options<GetOrderByIdData>) => queryOptions({ 387 + export const getOrderByIdOptions = (options: Options<GetOrderByIdData>) => 388 + queryOptions({ 384 389 queryFn: async ({ queryKey, signal }) => { 385 390 const { data } = await getOrderById({ 386 391 ...options, ··· 459 464 * 460 465 * Log into the system. 461 466 */ 462 - export const loginUserOptions = (options?: Options<LoginUserData>) => queryOptions({ 467 + export const loginUserOptions = (options?: Options<LoginUserData>) => 468 + queryOptions({ 463 469 queryFn: async ({ queryKey, signal }) => { 464 470 const { data } = await loginUser({ 465 471 ...options, ··· 480 486 * 481 487 * Log user out of the system. 482 488 */ 483 - export const logoutUserOptions = (options?: Options<LogoutUserData>) => queryOptions({ 489 + export const logoutUserOptions = (options?: Options<LogoutUserData>) => 490 + queryOptions({ 484 491 queryFn: async ({ queryKey, signal }) => { 485 492 const { data } = await logoutUser({ 486 493 ...options, ··· 526 533 * 527 534 * Get user detail based on username. 528 535 */ 529 - export const getUserByNameOptions = (options: Options<GetUserByNameData>) => queryOptions({ 536 + export const getUserByNameOptions = (options: Options<GetUserByNameData>) => 537 + queryOptions({ 530 538 queryFn: async ({ queryKey, signal }) => { 531 539 const { data } = await getUserByName({ 532 540 ...options,
+38 -23
examples/openapi-ts-tanstack-svelte-query/src/client/sdk.gen.ts
··· 86 86 */ 87 87 export const addPet = <ThrowOnError extends boolean = false>( 88 88 options: Options<AddPetData, ThrowOnError>, 89 - ) => (options.client ?? client).post< 90 - AddPetResponses, 91 - AddPetErrors, 92 - ThrowOnError 93 - >({ 89 + ) => 90 + (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 94 91 security: [ 95 92 { 96 93 scheme: 'bearer', ··· 112 109 */ 113 110 export const updatePet = <ThrowOnError extends boolean = false>( 114 111 options: Options<UpdatePetData, ThrowOnError>, 115 - ) => (options.client ?? client).put< 112 + ) => 113 + (options.client ?? client).put< 116 114 UpdatePetResponses, 117 115 UpdatePetErrors, 118 116 ThrowOnError ··· 138 136 */ 139 137 export const findPetsByStatus = <ThrowOnError extends boolean = false>( 140 138 options: Options<FindPetsByStatusData, ThrowOnError>, 141 - ) => (options.client ?? client).get< 139 + ) => 140 + (options.client ?? client).get< 142 141 FindPetsByStatusResponses, 143 142 FindPetsByStatusErrors, 144 143 ThrowOnError ··· 160 159 */ 161 160 export const findPetsByTags = <ThrowOnError extends boolean = false>( 162 161 options: Options<FindPetsByTagsData, ThrowOnError>, 163 - ) => (options.client ?? client).get< 162 + ) => 163 + (options.client ?? client).get< 164 164 FindPetsByTagsResponses, 165 165 FindPetsByTagsErrors, 166 166 ThrowOnError ··· 182 182 */ 183 183 export const deletePet = <ThrowOnError extends boolean = false>( 184 184 options: Options<DeletePetData, ThrowOnError>, 185 - ) => (options.client ?? client).delete< 185 + ) => 186 + (options.client ?? client).delete< 186 187 DeletePetResponses, 187 188 DeletePetErrors, 188 189 ThrowOnError ··· 204 205 */ 205 206 export const getPetById = <ThrowOnError extends boolean = false>( 206 207 options: Options<GetPetByIdData, ThrowOnError>, 207 - ) => (options.client ?? client).get< 208 + ) => 209 + (options.client ?? client).get< 208 210 GetPetByIdResponses, 209 211 GetPetByIdErrors, 210 212 ThrowOnError ··· 230 232 */ 231 233 export const updatePetWithForm = <ThrowOnError extends boolean = false>( 232 234 options: Options<UpdatePetWithFormData, ThrowOnError>, 233 - ) => (options.client ?? client).post< 235 + ) => 236 + (options.client ?? client).post< 234 237 UpdatePetWithFormResponses, 235 238 UpdatePetWithFormErrors, 236 239 ThrowOnError ··· 252 255 */ 253 256 export const uploadFile = <ThrowOnError extends boolean = false>( 254 257 options: Options<UploadFileData, ThrowOnError>, 255 - ) => (options.client ?? client).post< 258 + ) => 259 + (options.client ?? client).post< 256 260 UploadFileResponses, 257 261 UploadFileErrors, 258 262 ThrowOnError ··· 279 283 */ 280 284 export const getInventory = <ThrowOnError extends boolean = false>( 281 285 options?: Options<GetInventoryData, ThrowOnError>, 282 - ) => (options?.client ?? client).get< 286 + ) => 287 + (options?.client ?? client).get< 283 288 GetInventoryResponses, 284 289 GetInventoryErrors, 285 290 ThrowOnError ··· 301 306 */ 302 307 export const placeOrder = <ThrowOnError extends boolean = false>( 303 308 options?: Options<PlaceOrderData, ThrowOnError>, 304 - ) => (options?.client ?? client).post< 309 + ) => 310 + (options?.client ?? client).post< 305 311 PlaceOrderResponses, 306 312 PlaceOrderErrors, 307 313 ThrowOnError ··· 321 327 */ 322 328 export const deleteOrder = <ThrowOnError extends boolean = false>( 323 329 options: Options<DeleteOrderData, ThrowOnError>, 324 - ) => (options.client ?? client).delete< 330 + ) => 331 + (options.client ?? client).delete< 325 332 DeleteOrderResponses, 326 333 DeleteOrderErrors, 327 334 ThrowOnError ··· 337 344 */ 338 345 export const getOrderById = <ThrowOnError extends boolean = false>( 339 346 options: Options<GetOrderByIdData, ThrowOnError>, 340 - ) => (options.client ?? client).get< 347 + ) => 348 + (options.client ?? client).get< 341 349 GetOrderByIdResponses, 342 350 GetOrderByIdErrors, 343 351 ThrowOnError ··· 353 361 */ 354 362 export const createUser = <ThrowOnError extends boolean = false>( 355 363 options?: Options<CreateUserData, ThrowOnError>, 356 - ) => (options?.client ?? client).post< 364 + ) => 365 + (options?.client ?? client).post< 357 366 CreateUserResponses, 358 367 CreateUserErrors, 359 368 ThrowOnError ··· 373 382 */ 374 383 export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 375 384 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 376 - ) => (options?.client ?? client).post< 385 + ) => 386 + (options?.client ?? client).post< 377 387 CreateUsersWithListInputResponses, 378 388 CreateUsersWithListInputErrors, 379 389 ThrowOnError ··· 393 403 */ 394 404 export const loginUser = <ThrowOnError extends boolean = false>( 395 405 options?: Options<LoginUserData, ThrowOnError>, 396 - ) => (options?.client ?? client).get< 406 + ) => 407 + (options?.client ?? client).get< 397 408 LoginUserResponses, 398 409 LoginUserErrors, 399 410 ThrowOnError ··· 409 420 */ 410 421 export const logoutUser = <ThrowOnError extends boolean = false>( 411 422 options?: Options<LogoutUserData, ThrowOnError>, 412 - ) => (options?.client ?? client).get< 423 + ) => 424 + (options?.client ?? client).get< 413 425 LogoutUserResponses, 414 426 LogoutUserErrors, 415 427 ThrowOnError ··· 425 437 */ 426 438 export const deleteUser = <ThrowOnError extends boolean = false>( 427 439 options: Options<DeleteUserData, ThrowOnError>, 428 - ) => (options.client ?? client).delete< 440 + ) => 441 + (options.client ?? client).delete< 429 442 DeleteUserResponses, 430 443 DeleteUserErrors, 431 444 ThrowOnError ··· 441 454 */ 442 455 export const getUserByName = <ThrowOnError extends boolean = false>( 443 456 options: Options<GetUserByNameData, ThrowOnError>, 444 - ) => (options.client ?? client).get< 457 + ) => 458 + (options.client ?? client).get< 445 459 GetUserByNameResponses, 446 460 GetUserByNameErrors, 447 461 ThrowOnError ··· 457 471 */ 458 472 export const updateUser = <ThrowOnError extends boolean = false>( 459 473 options: Options<UpdateUserData, ThrowOnError>, 460 - ) => (options.client ?? client).put< 474 + ) => 475 + (options.client ?? client).put< 461 476 UpdateUserResponses, 462 477 UpdateUserErrors, 463 478 ThrowOnError
+16 -8
examples/openapi-ts-tanstack-vue-query/src/client/@tanstack/vue-query.gen.ts
··· 147 147 * 148 148 * Multiple status values can be provided with comma separated strings. 149 149 */ 150 - export const findPetsByStatusOptions = (options: Options<FindPetsByStatusData>) => queryOptions({ 150 + export const findPetsByStatusOptions = (options: Options<FindPetsByStatusData>) => 151 + queryOptions({ 151 152 queryFn: async ({ queryKey, signal }) => { 152 153 const { data } = await findPetsByStatus({ 153 154 ...options, ··· 168 169 * 169 170 * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. 170 171 */ 171 - export const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) => queryOptions({ 172 + export const findPetsByTagsOptions = (options: Options<FindPetsByTagsData>) => 173 + queryOptions({ 172 174 queryFn: async ({ queryKey, signal }) => { 173 175 const { data } = await findPetsByTags({ 174 176 ...options, ··· 210 212 * 211 213 * Returns a single pet. 212 214 */ 213 - export const getPetByIdOptions = (options: Options<GetPetByIdData>) => queryOptions({ 215 + export const getPetByIdOptions = (options: Options<GetPetByIdData>) => 216 + queryOptions({ 214 217 queryFn: async ({ queryKey, signal }) => { 215 218 const { data } = await getPetById({ 216 219 ...options, ··· 281 284 * 282 285 * Returns a map of status codes to quantities. 283 286 */ 284 - export const getInventoryOptions = (options?: Options<GetInventoryData>) => queryOptions({ 287 + export const getInventoryOptions = (options?: Options<GetInventoryData>) => 288 + queryOptions({ 285 289 queryFn: async ({ queryKey, signal }) => { 286 290 const { data } = await getInventory({ 287 291 ...options, ··· 348 352 * 349 353 * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. 350 354 */ 351 - export const getOrderByIdOptions = (options: Options<GetOrderByIdData>) => queryOptions({ 355 + export const getOrderByIdOptions = (options: Options<GetOrderByIdData>) => 356 + queryOptions({ 352 357 queryFn: async ({ queryKey, signal }) => { 353 358 const { data } = await getOrderById({ 354 359 ...options, ··· 423 428 * 424 429 * Log into the system. 425 430 */ 426 - export const loginUserOptions = (options?: Options<LoginUserData>) => queryOptions({ 431 + export const loginUserOptions = (options?: Options<LoginUserData>) => 432 + queryOptions({ 427 433 queryFn: async ({ queryKey, signal }) => { 428 434 const { data } = await loginUser({ 429 435 ...options, ··· 444 450 * 445 451 * Log user out of the system. 446 452 */ 447 - export const logoutUserOptions = (options?: Options<LogoutUserData>) => queryOptions({ 453 + export const logoutUserOptions = (options?: Options<LogoutUserData>) => 454 + queryOptions({ 448 455 queryFn: async ({ queryKey, signal }) => { 449 456 const { data } = await logoutUser({ 450 457 ...options, ··· 486 493 * 487 494 * Get user detail based on username. 488 495 */ 489 - export const getUserByNameOptions = (options: Options<GetUserByNameData>) => queryOptions({ 496 + export const getUserByNameOptions = (options: Options<GetUserByNameData>) => 497 + queryOptions({ 490 498 queryFn: async ({ queryKey, signal }) => { 491 499 const { data } = await getUserByName({ 492 500 ...options,
+38 -27
examples/openapi-ts-tanstack-vue-query/src/client/sdk.gen.ts
··· 86 86 */ 87 87 export const addPet = <ThrowOnError extends boolean = false>( 88 88 options: Options<AddPetData, ThrowOnError> 89 - ) => (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 89 + ) => 90 + (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 90 91 security: [ 91 92 { 92 93 scheme: 'bearer', ··· 108 109 */ 109 110 export const updatePet = <ThrowOnError extends boolean = false>( 110 111 options: Options<UpdatePetData, ThrowOnError> 111 - ) => (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({ 112 + ) => 113 + (options.client ?? client).put<UpdatePetResponses, UpdatePetErrors, ThrowOnError>({ 112 114 security: [ 113 115 { 114 116 scheme: 'bearer', ··· 130 132 */ 131 133 export const findPetsByStatus = <ThrowOnError extends boolean = false>( 132 134 options: Options<FindPetsByStatusData, ThrowOnError> 133 - ) => (options.client ?? client).get< 134 - FindPetsByStatusResponses, 135 - FindPetsByStatusErrors, 136 - ThrowOnError 137 - >({ 135 + ) => 136 + (options.client ?? client).get<FindPetsByStatusResponses, FindPetsByStatusErrors, ThrowOnError>({ 138 137 security: [ 139 138 { 140 139 scheme: 'bearer', ··· 152 151 */ 153 152 export const findPetsByTags = <ThrowOnError extends boolean = false>( 154 153 options: Options<FindPetsByTagsData, ThrowOnError> 155 - ) => (options.client ?? client).get< 156 - FindPetsByTagsResponses, 157 - FindPetsByTagsErrors, 158 - ThrowOnError 159 - >({ 154 + ) => 155 + (options.client ?? client).get<FindPetsByTagsResponses, FindPetsByTagsErrors, ThrowOnError>({ 160 156 security: [ 161 157 { 162 158 scheme: 'bearer', ··· 174 170 */ 175 171 export const deletePet = <ThrowOnError extends boolean = false>( 176 172 options: Options<DeletePetData, ThrowOnError> 177 - ) => (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({ 173 + ) => 174 + (options.client ?? client).delete<DeletePetResponses, DeletePetErrors, ThrowOnError>({ 178 175 security: [ 179 176 { 180 177 scheme: 'bearer', ··· 192 189 */ 193 190 export const getPetById = <ThrowOnError extends boolean = false>( 194 191 options: Options<GetPetByIdData, ThrowOnError> 195 - ) => (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({ 192 + ) => 193 + (options.client ?? client).get<GetPetByIdResponses, GetPetByIdErrors, ThrowOnError>({ 196 194 security: [ 197 195 { 198 196 name: 'api_key', ··· 214 212 */ 215 213 export const updatePetWithForm = <ThrowOnError extends boolean = false>( 216 214 options: Options<UpdatePetWithFormData, ThrowOnError> 217 - ) => (options.client ?? client).post< 215 + ) => 216 + (options.client ?? client).post< 218 217 UpdatePetWithFormResponses, 219 218 UpdatePetWithFormErrors, 220 219 ThrowOnError ··· 236 235 */ 237 236 export const uploadFile = <ThrowOnError extends boolean = false>( 238 237 options: Options<UploadFileData, ThrowOnError> 239 - ) => (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({ 238 + ) => 239 + (options.client ?? client).post<UploadFileResponses, UploadFileErrors, ThrowOnError>({ 240 240 bodySerializer: null, 241 241 security: [ 242 242 { ··· 259 259 */ 260 260 export const getInventory = <ThrowOnError extends boolean = false>( 261 261 options?: Options<GetInventoryData, ThrowOnError> 262 - ) => (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({ 262 + ) => 263 + (options?.client ?? client).get<GetInventoryResponses, GetInventoryErrors, ThrowOnError>({ 263 264 security: [ 264 265 { 265 266 name: 'api_key', ··· 277 278 */ 278 279 export const placeOrder = <ThrowOnError extends boolean = false>( 279 280 options?: Options<PlaceOrderData, ThrowOnError> 280 - ) => (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({ 281 + ) => 282 + (options?.client ?? client).post<PlaceOrderResponses, PlaceOrderErrors, ThrowOnError>({ 281 283 url: '/store/order', 282 284 ...options, 283 285 headers: { ··· 293 295 */ 294 296 export const deleteOrder = <ThrowOnError extends boolean = false>( 295 297 options: Options<DeleteOrderData, ThrowOnError> 296 - ) => (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({ 298 + ) => 299 + (options.client ?? client).delete<DeleteOrderResponses, DeleteOrderErrors, ThrowOnError>({ 297 300 url: '/store/order/{orderId}', 298 301 ...options 299 302 }) ··· 305 308 */ 306 309 export const getOrderById = <ThrowOnError extends boolean = false>( 307 310 options: Options<GetOrderByIdData, ThrowOnError> 308 - ) => (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({ 311 + ) => 312 + (options.client ?? client).get<GetOrderByIdResponses, GetOrderByIdErrors, ThrowOnError>({ 309 313 url: '/store/order/{orderId}', 310 314 ...options 311 315 }) ··· 317 321 */ 318 322 export const createUser = <ThrowOnError extends boolean = false>( 319 323 options?: Options<CreateUserData, ThrowOnError> 320 - ) => (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({ 324 + ) => 325 + (options?.client ?? client).post<CreateUserResponses, CreateUserErrors, ThrowOnError>({ 321 326 url: '/user', 322 327 ...options, 323 328 headers: { ··· 333 338 */ 334 339 export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 335 340 options?: Options<CreateUsersWithListInputData, ThrowOnError> 336 - ) => (options?.client ?? client).post< 341 + ) => 342 + (options?.client ?? client).post< 337 343 CreateUsersWithListInputResponses, 338 344 CreateUsersWithListInputErrors, 339 345 ThrowOnError ··· 353 359 */ 354 360 export const loginUser = <ThrowOnError extends boolean = false>( 355 361 options?: Options<LoginUserData, ThrowOnError> 356 - ) => (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({ 362 + ) => 363 + (options?.client ?? client).get<LoginUserResponses, LoginUserErrors, ThrowOnError>({ 357 364 url: '/user/login', 358 365 ...options 359 366 }) ··· 365 372 */ 366 373 export const logoutUser = <ThrowOnError extends boolean = false>( 367 374 options?: Options<LogoutUserData, ThrowOnError> 368 - ) => (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({ 375 + ) => 376 + (options?.client ?? client).get<LogoutUserResponses, LogoutUserErrors, ThrowOnError>({ 369 377 url: '/user/logout', 370 378 ...options 371 379 }) ··· 377 385 */ 378 386 export const deleteUser = <ThrowOnError extends boolean = false>( 379 387 options: Options<DeleteUserData, ThrowOnError> 380 - ) => (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({ 388 + ) => 389 + (options.client ?? client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({ 381 390 url: '/user/{username}', 382 391 ...options 383 392 }) ··· 389 398 */ 390 399 export const getUserByName = <ThrowOnError extends boolean = false>( 391 400 options: Options<GetUserByNameData, ThrowOnError> 392 - ) => (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({ 401 + ) => 402 + (options.client ?? client).get<GetUserByNameResponses, GetUserByNameErrors, ThrowOnError>({ 393 403 url: '/user/{username}', 394 404 ...options 395 405 }) ··· 401 411 */ 402 412 export const updateUser = <ThrowOnError extends boolean = false>( 403 413 options: Options<UpdateUserData, ThrowOnError> 404 - ) => (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({ 414 + ) => 415 + (options.client ?? client).put<UpdateUserResponses, UpdateUserErrors, ThrowOnError>({ 405 416 url: '/user/{username}', 406 417 ...options, 407 418 headers: {
+17 -17
examples/openapi-ts-tanstack-vue-query/src/client/types.gen.ts
··· 5 5 } 6 6 7 7 export type Order = { 8 - complete?: boolean, 9 - id?: number, 10 - petId?: number, 11 - quantity?: number, 12 - shipDate?: string, 8 + complete?: boolean 9 + id?: number 10 + petId?: number 11 + quantity?: number 12 + shipDate?: string 13 13 /** 14 14 * Order Status 15 15 */ ··· 22 22 } 23 23 24 24 export type User = { 25 - email?: string, 26 - firstName?: string, 27 - id?: number, 25 + email?: string 26 + firstName?: string 27 + id?: number 28 28 lastName?: string 29 - password?: string, 30 - phone?: string, 29 + password?: string 30 + phone?: string 31 31 /** 32 32 * User Status 33 33 */ 34 - userStatus?: number, 34 + userStatus?: number 35 35 username?: string 36 36 } 37 37 ··· 41 41 } 42 42 43 43 export type Pet = { 44 - category?: Category, 45 - id?: number, 46 - name: string, 44 + category?: Category 45 + id?: number 46 + name: string 47 47 photoUrls: Array<string> 48 48 /** 49 49 * pet status in the store 50 50 */ 51 - status?: 'available' | 'pending' | 'sold', 51 + status?: 'available' | 'pending' | 'sold' 52 52 tags?: Array<Tag> 53 53 } 54 54 55 55 export type ApiResponse = { 56 56 code?: number 57 - message?: string, 57 + message?: string 58 58 type?: string 59 59 } 60 60 ··· 535 535 /** 536 536 * The password for login in clear text 537 537 */ 538 - password?: string, 538 + password?: string 539 539 /** 540 540 * The user name for login 541 541 */