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

test(pinia-colada): update snapshots

+240 -136
+14 -8
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts
··· 41 41 42 42 export const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options); 43 43 44 - export const getFooQuery = defineQueryOptions({ 45 - key: getFooQueryKey(), 44 + export const getFooQuery = defineQueryOptions((options?: Options<GetFooData>) => ({ 45 + key: getFooQueryKey(options), 46 46 query: async () => { 47 - const { data } = await FooBazService.getFoo({ throwOnError: true }); 47 + const { data } = await FooBazService.getFoo({ 48 + ...options, 49 + throwOnError: true 50 + }); 48 51 return data; 49 52 } 50 - }); 53 + })); 51 54 52 55 export const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, Options<FooPostData>, Error> => { 53 56 return { ··· 77 80 78 81 export const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options); 79 82 80 - export const getFooBarQuery = defineQueryOptions({ 81 - key: getFooBarQueryKey(), 83 + export const getFooBarQuery = defineQueryOptions((options?: Options<GetFooBarData>) => ({ 84 + key: getFooBarQueryKey(options), 82 85 query: async () => { 83 - const { data } = await BarBazService.getFooBar({ throwOnError: true }); 86 + const { data } = await BarBazService.getFooBar({ 87 + ...options, 88 + throwOnError: true 89 + }); 84 90 return data; 85 91 } 86 - }); 92 + })); 87 93 88 94 export const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, Options<FooBarPostData>, Error> => { 89 95 return {
+56 -32
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts
··· 41 41 42 42 export const serviceWithEmptyTagQueryKey = (options?: Options<ServiceWithEmptyTagData>) => createQueryKey('serviceWithEmptyTag', options); 43 43 44 - export const serviceWithEmptyTagQuery = defineQueryOptions({ 45 - key: serviceWithEmptyTagQueryKey(), 44 + export const serviceWithEmptyTagQuery = defineQueryOptions((options?: Options<ServiceWithEmptyTagData>) => ({ 45 + key: serviceWithEmptyTagQueryKey(options), 46 46 query: async () => { 47 - const { data } = await serviceWithEmptyTag({ throwOnError: true }); 47 + const { data } = await serviceWithEmptyTag({ 48 + ...options, 49 + throwOnError: true 50 + }); 48 51 return data; 49 52 } 50 - }); 53 + })); 51 54 52 55 export const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, Options<PatchApiVbyApiVersionNoTagData>, Error> => { 53 56 return { ··· 90 93 91 94 export const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options); 92 95 93 - export const getCallWithoutParametersAndResponseQuery = defineQueryOptions({ 94 - key: getCallWithoutParametersAndResponseQueryKey(), 96 + export const getCallWithoutParametersAndResponseQuery = defineQueryOptions((options?: Options<GetCallWithoutParametersAndResponseData>) => ({ 97 + key: getCallWithoutParametersAndResponseQueryKey(options), 95 98 query: async () => { 96 - const { data } = await getCallWithoutParametersAndResponse({ throwOnError: true }); 99 + const { data } = await getCallWithoutParametersAndResponse({ 100 + ...options, 101 + throwOnError: true 102 + }); 97 103 return data; 98 104 } 99 - }); 105 + })); 100 106 101 107 export const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PatchCallWithoutParametersAndResponseData>, Error> => { 102 108 return { ··· 230 236 231 237 export const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options); 232 238 233 - export const duplicateName2Query = defineQueryOptions({ 234 - key: duplicateName2QueryKey(), 239 + export const duplicateName2Query = defineQueryOptions((options?: Options<DuplicateName2Data>) => ({ 240 + key: duplicateName2QueryKey(options), 235 241 query: async () => { 236 - const { data } = await duplicateName2({ throwOnError: true }); 242 + const { data } = await duplicateName2({ 243 + ...options, 244 + throwOnError: true 245 + }); 237 246 return data; 238 247 } 239 - }); 248 + })); 240 249 241 250 export const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, Options<DuplicateName3Data>, Error> => { 242 251 return { ··· 266 275 267 276 export const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options); 268 277 269 - export const callWithNoContentResponseQuery = defineQueryOptions({ 270 - key: callWithNoContentResponseQueryKey(), 278 + export const callWithNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithNoContentResponseData>) => ({ 279 + key: callWithNoContentResponseQueryKey(options), 271 280 query: async () => { 272 - const { data } = await callWithNoContentResponse({ throwOnError: true }); 281 + const { data } = await callWithNoContentResponse({ 282 + ...options, 283 + throwOnError: true 284 + }); 273 285 return data; 274 286 } 275 - }); 287 + })); 276 288 277 289 export const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options); 278 290 279 - export const callWithResponseAndNoContentResponseQuery = defineQueryOptions({ 280 - key: callWithResponseAndNoContentResponseQueryKey(), 291 + export const callWithResponseAndNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithResponseAndNoContentResponseData>) => ({ 292 + key: callWithResponseAndNoContentResponseQueryKey(options), 281 293 query: async () => { 282 - const { data } = await callWithResponseAndNoContentResponse({ throwOnError: true }); 294 + const { data } = await callWithResponseAndNoContentResponse({ 295 + ...options, 296 + throwOnError: true 297 + }); 283 298 return data; 284 299 } 285 - }); 300 + })); 286 301 287 302 export const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options); 288 303 289 - export const dummyAQuery = defineQueryOptions({ 290 - key: dummyAQueryKey(), 304 + export const dummyAQuery = defineQueryOptions((options?: Options<DummyAData>) => ({ 305 + key: dummyAQueryKey(options), 291 306 query: async () => { 292 - const { data } = await dummyA({ throwOnError: true }); 307 + const { data } = await dummyA({ 308 + ...options, 309 + throwOnError: true 310 + }); 293 311 return data; 294 312 } 295 - }); 313 + })); 296 314 297 315 export const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options); 298 316 299 - export const dummyBQuery = defineQueryOptions({ 300 - key: dummyBQueryKey(), 317 + export const dummyBQuery = defineQueryOptions((options?: Options<DummyBData>) => ({ 318 + key: dummyBQueryKey(options), 301 319 query: async () => { 302 - const { data } = await dummyB({ throwOnError: true }); 320 + const { data } = await dummyB({ 321 + ...options, 322 + throwOnError: true 323 + }); 303 324 return data; 304 325 } 305 - }); 326 + })); 306 327 307 328 export const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options); 308 329 309 - export const callWithResponseQuery = defineQueryOptions({ 310 - key: callWithResponseQueryKey(), 330 + export const callWithResponseQuery = defineQueryOptions((options?: Options<CallWithResponseData>) => ({ 331 + key: callWithResponseQueryKey(options), 311 332 query: async () => { 312 - const { data } = await callWithResponse({ throwOnError: true }); 333 + const { data } = await callWithResponse({ 334 + ...options, 335 + throwOnError: true 336 + }); 313 337 return data; 314 338 } 315 - }); 339 + })); 316 340 317 341 export const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, Options<CallWithDuplicateResponsesData>, CallWithDuplicateResponsesError> => { 318 342 return {
+14 -8
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts
··· 41 41 42 42 export const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options); 43 43 44 - export const getFooQuery = defineQueryOptions({ 45 - key: getFooQueryKey(), 44 + export const getFooQuery = defineQueryOptions((options?: Options<GetFooData>) => ({ 45 + key: getFooQueryKey(options), 46 46 query: async () => { 47 - const { data } = await FooBazService.getFoo({ throwOnError: true }); 47 + const { data } = await FooBazService.getFoo({ 48 + ...options, 49 + throwOnError: true 50 + }); 48 51 return data; 49 52 } 50 - }); 53 + })); 51 54 52 55 export const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, Options<FooPostData>, Error> => { 53 56 return { ··· 77 80 78 81 export const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options); 79 82 80 - export const getFooBarQuery = defineQueryOptions({ 81 - key: getFooBarQueryKey(), 83 + export const getFooBarQuery = defineQueryOptions((options?: Options<GetFooBarData>) => ({ 84 + key: getFooBarQueryKey(options), 82 85 query: async () => { 83 - const { data } = await BarBazService.getFooBar({ throwOnError: true }); 86 + const { data } = await BarBazService.getFooBar({ 87 + ...options, 88 + throwOnError: true 89 + }); 84 90 return data; 85 91 } 86 - }); 92 + })); 87 93 88 94 export const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, Options<FooBarPostData>, Error> => { 89 95 return {
+71 -40
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts
··· 41 41 42 42 export const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options); 43 43 44 - export const exportQuery = defineQueryOptions({ 45 - key: exportQueryKey(), 44 + export const exportQuery = defineQueryOptions((options?: Options<ExportData>) => ({ 45 + key: exportQueryKey(options), 46 46 query: async () => { 47 - const { data } = await export_({ throwOnError: true }); 47 + const { data } = await export_({ 48 + ...options, 49 + throwOnError: true 50 + }); 48 51 return data; 49 52 } 50 - }); 53 + })); 51 54 52 55 export const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, Options<PatchApiVbyApiVersionNoTagData>, Error> => { 53 56 return { ··· 90 93 91 94 export const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options); 92 95 93 - export const apiVVersionODataControllerCountQuery = defineQueryOptions({ 94 - key: apiVVersionODataControllerCountQueryKey(), 96 + export const apiVVersionODataControllerCountQuery = defineQueryOptions((options?: Options<ApiVVersionODataControllerCountData>) => ({ 97 + key: apiVVersionODataControllerCountQueryKey(options), 95 98 query: async () => { 96 - const { data } = await apiVVersionODataControllerCount({ throwOnError: true }); 99 + const { data } = await apiVVersionODataControllerCount({ 100 + ...options, 101 + throwOnError: true 102 + }); 97 103 return data; 98 104 } 99 - }); 105 + })); 100 106 101 107 export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); 102 108 ··· 126 132 127 133 export const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options); 128 134 129 - export const getCallWithoutParametersAndResponseQuery = defineQueryOptions({ 130 - key: getCallWithoutParametersAndResponseQueryKey(), 135 + export const getCallWithoutParametersAndResponseQuery = defineQueryOptions((options?: Options<GetCallWithoutParametersAndResponseData>) => ({ 136 + key: getCallWithoutParametersAndResponseQueryKey(options), 131 137 query: async () => { 132 - const { data } = await getCallWithoutParametersAndResponse({ throwOnError: true }); 138 + const { data } = await getCallWithoutParametersAndResponse({ 139 + ...options, 140 + throwOnError: true 141 + }); 133 142 return data; 134 143 } 135 - }); 144 + })); 136 145 137 146 export const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PatchCallWithoutParametersAndResponseData>, Error> => { 138 147 return { ··· 299 308 key: callWithDefaultParametersQueryKey(options), 300 309 query: async () => { 301 310 const { data } = await callWithDefaultParameters({ 311 + ...options, 302 312 throwOnError: true 303 313 }); 304 314 return data; ··· 346 356 347 357 export const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options); 348 358 349 - export const duplicateName2Query = defineQueryOptions({ 350 - key: duplicateName2QueryKey(), 359 + export const duplicateName2Query = defineQueryOptions((options?: Options<DuplicateName2Data>) => ({ 360 + key: duplicateName2QueryKey(options), 351 361 query: async () => { 352 - const { data } = await duplicateName2({ throwOnError: true }); 362 + const { data } = await duplicateName2({ 363 + ...options, 364 + throwOnError: true 365 + }); 353 366 return data; 354 367 } 355 - }); 368 + })); 356 369 357 370 export const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, Options<DuplicateName3Data>, Error> => { 358 371 return { ··· 382 395 383 396 export const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options); 384 397 385 - export const callWithNoContentResponseQuery = defineQueryOptions({ 386 - key: callWithNoContentResponseQueryKey(), 398 + export const callWithNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithNoContentResponseData>) => ({ 399 + key: callWithNoContentResponseQueryKey(options), 387 400 query: async () => { 388 - const { data } = await callWithNoContentResponse({ throwOnError: true }); 401 + const { data } = await callWithNoContentResponse({ 402 + ...options, 403 + throwOnError: true 404 + }); 389 405 return data; 390 406 } 391 - }); 407 + })); 392 408 393 409 export const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options); 394 410 395 - export const callWithResponseAndNoContentResponseQuery = defineQueryOptions({ 396 - key: callWithResponseAndNoContentResponseQueryKey(), 411 + export const callWithResponseAndNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithResponseAndNoContentResponseData>) => ({ 412 + key: callWithResponseAndNoContentResponseQueryKey(options), 397 413 query: async () => { 398 - const { data } = await callWithResponseAndNoContentResponse({ throwOnError: true }); 414 + const { data } = await callWithResponseAndNoContentResponse({ 415 + ...options, 416 + throwOnError: true 417 + }); 399 418 return data; 400 419 } 401 - }); 420 + })); 402 421 403 422 export const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options); 404 423 405 - export const dummyAQuery = defineQueryOptions({ 406 - key: dummyAQueryKey(), 424 + export const dummyAQuery = defineQueryOptions((options?: Options<DummyAData>) => ({ 425 + key: dummyAQueryKey(options), 407 426 query: async () => { 408 - const { data } = await dummyA({ throwOnError: true }); 427 + const { data } = await dummyA({ 428 + ...options, 429 + throwOnError: true 430 + }); 409 431 return data; 410 432 } 411 - }); 433 + })); 412 434 413 435 export const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options); 414 436 415 - export const dummyBQuery = defineQueryOptions({ 416 - key: dummyBQueryKey(), 437 + export const dummyBQuery = defineQueryOptions((options?: Options<DummyBData>) => ({ 438 + key: dummyBQueryKey(options), 417 439 query: async () => { 418 - const { data } = await dummyB({ throwOnError: true }); 440 + const { data } = await dummyB({ 441 + ...options, 442 + throwOnError: true 443 + }); 419 444 return data; 420 445 } 421 - }); 446 + })); 422 447 423 448 export const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options); 424 449 425 - export const callWithResponseQuery = defineQueryOptions({ 426 - key: callWithResponseQueryKey(), 450 + export const callWithResponseQuery = defineQueryOptions((options?: Options<CallWithResponseData>) => ({ 451 + key: callWithResponseQueryKey(options), 427 452 query: async () => { 428 - const { data } = await callWithResponse({ throwOnError: true }); 453 + const { data } = await callWithResponse({ 454 + ...options, 455 + throwOnError: true 456 + }); 429 457 return data; 430 458 } 431 - }); 459 + })); 432 460 433 461 export const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, Options<CallWithDuplicateResponsesData>, CallWithDuplicateResponsesError> => { 434 462 return { ··· 523 551 524 552 export const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options); 525 553 526 - export const multipartResponseQuery = defineQueryOptions({ 527 - key: multipartResponseQueryKey(), 554 + export const multipartResponseQuery = defineQueryOptions((options?: Options<MultipartResponseData>) => ({ 555 + key: multipartResponseQueryKey(options), 528 556 query: async () => { 529 - const { data } = await multipartResponse({ throwOnError: true }); 557 + const { data } = await multipartResponse({ 558 + ...options, 559 + throwOnError: true 560 + }); 530 561 return data; 531 562 } 532 - }); 563 + })); 533 564 534 565 export const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, Options<MultipartRequestData>, Error> => { 535 566 return {
+14 -8
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts
··· 41 41 42 42 export const getFooQueryKey = (options?: Options<GetFooData>) => createQueryKey('getFoo', options); 43 43 44 - export const getFooQuery = defineQueryOptions({ 45 - key: getFooQueryKey(), 44 + export const getFooQuery = defineQueryOptions((options?: Options<GetFooData>) => ({ 45 + key: getFooQueryKey(options), 46 46 query: async () => { 47 - const { data } = await FooBazService.getFoo({ throwOnError: true }); 47 + const { data } = await FooBazService.getFoo({ 48 + ...options, 49 + throwOnError: true 50 + }); 48 51 return data; 49 52 } 50 - }); 53 + })); 51 54 52 55 export const fooPostMutation = (options?: Partial<Options<FooPostData>>): UseMutationOptions<FooPostResponse, Options<FooPostData>, Error> => { 53 56 return { ··· 77 80 78 81 export const getFooBarQueryKey = (options?: Options<GetFooBarData>) => createQueryKey('getFooBar', options); 79 82 80 - export const getFooBarQuery = defineQueryOptions({ 81 - key: getFooBarQueryKey(), 83 + export const getFooBarQuery = defineQueryOptions((options?: Options<GetFooBarData>) => ({ 84 + key: getFooBarQueryKey(options), 82 85 query: async () => { 83 - const { data } = await BarBazService.getFooBar({ throwOnError: true }); 86 + const { data } = await BarBazService.getFooBar({ 87 + ...options, 88 + throwOnError: true 89 + }); 84 90 return data; 85 91 } 86 - }); 92 + })); 87 93 88 94 export const fooBarPostMutation = (options?: Partial<Options<FooBarPostData>>): UseMutationOptions<FooBarPostResponse, Options<FooBarPostData>, Error> => { 89 95 return {
+71 -40
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts
··· 41 41 42 42 export const exportQueryKey = (options?: Options<ExportData>) => createQueryKey('export', options); 43 43 44 - export const exportQuery = defineQueryOptions({ 45 - key: exportQueryKey(), 44 + export const exportQuery = defineQueryOptions((options?: Options<ExportData>) => ({ 45 + key: exportQueryKey(options), 46 46 query: async () => { 47 - const { data } = await export_({ throwOnError: true }); 47 + const { data } = await export_({ 48 + ...options, 49 + throwOnError: true 50 + }); 48 51 return data; 49 52 } 50 - }); 53 + })); 51 54 52 55 export const patchApiVbyApiVersionNoTagMutation = (options?: Partial<Options<PatchApiVbyApiVersionNoTagData>>): UseMutationOptions<unknown, Options<PatchApiVbyApiVersionNoTagData>, Error> => { 53 56 return { ··· 90 93 91 94 export const apiVVersionODataControllerCountQueryKey = (options?: Options<ApiVVersionODataControllerCountData>) => createQueryKey('apiVVersionODataControllerCount', options); 92 95 93 - export const apiVVersionODataControllerCountQuery = defineQueryOptions({ 94 - key: apiVVersionODataControllerCountQueryKey(), 96 + export const apiVVersionODataControllerCountQuery = defineQueryOptions((options?: Options<ApiVVersionODataControllerCountData>) => ({ 97 + key: apiVVersionODataControllerCountQueryKey(options), 95 98 query: async () => { 96 - const { data } = await apiVVersionODataControllerCount({ throwOnError: true }); 99 + const { data } = await apiVVersionODataControllerCount({ 100 + ...options, 101 + throwOnError: true 102 + }); 97 103 return data; 98 104 } 99 - }); 105 + })); 100 106 101 107 export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options<GetApiVbyApiVersionSimpleOperationData>) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); 102 108 ··· 126 132 127 133 export const getCallWithoutParametersAndResponseQueryKey = (options?: Options<GetCallWithoutParametersAndResponseData>) => createQueryKey('getCallWithoutParametersAndResponse', options); 128 134 129 - export const getCallWithoutParametersAndResponseQuery = defineQueryOptions({ 130 - key: getCallWithoutParametersAndResponseQueryKey(), 135 + export const getCallWithoutParametersAndResponseQuery = defineQueryOptions((options?: Options<GetCallWithoutParametersAndResponseData>) => ({ 136 + key: getCallWithoutParametersAndResponseQueryKey(options), 131 137 query: async () => { 132 - const { data } = await getCallWithoutParametersAndResponse({ throwOnError: true }); 138 + const { data } = await getCallWithoutParametersAndResponse({ 139 + ...options, 140 + throwOnError: true 141 + }); 133 142 return data; 134 143 } 135 - }); 144 + })); 136 145 137 146 export const patchCallWithoutParametersAndResponseMutation = (options?: Partial<Options<PatchCallWithoutParametersAndResponseData>>): UseMutationOptions<unknown, Options<PatchCallWithoutParametersAndResponseData>, Error> => { 138 147 return { ··· 299 308 key: callWithDefaultParametersQueryKey(options), 300 309 query: async () => { 301 310 const { data } = await callWithDefaultParameters({ 311 + ...options, 302 312 throwOnError: true 303 313 }); 304 314 return data; ··· 346 356 347 357 export const duplicateName2QueryKey = (options?: Options<DuplicateName2Data>) => createQueryKey('duplicateName2', options); 348 358 349 - export const duplicateName2Query = defineQueryOptions({ 350 - key: duplicateName2QueryKey(), 359 + export const duplicateName2Query = defineQueryOptions((options?: Options<DuplicateName2Data>) => ({ 360 + key: duplicateName2QueryKey(options), 351 361 query: async () => { 352 - const { data } = await duplicateName2({ throwOnError: true }); 362 + const { data } = await duplicateName2({ 363 + ...options, 364 + throwOnError: true 365 + }); 353 366 return data; 354 367 } 355 - }); 368 + })); 356 369 357 370 export const duplicateName3Mutation = (options?: Partial<Options<DuplicateName3Data>>): UseMutationOptions<unknown, Options<DuplicateName3Data>, Error> => { 358 371 return { ··· 382 395 383 396 export const callWithNoContentResponseQueryKey = (options?: Options<CallWithNoContentResponseData>) => createQueryKey('callWithNoContentResponse', options); 384 397 385 - export const callWithNoContentResponseQuery = defineQueryOptions({ 386 - key: callWithNoContentResponseQueryKey(), 398 + export const callWithNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithNoContentResponseData>) => ({ 399 + key: callWithNoContentResponseQueryKey(options), 387 400 query: async () => { 388 - const { data } = await callWithNoContentResponse({ throwOnError: true }); 401 + const { data } = await callWithNoContentResponse({ 402 + ...options, 403 + throwOnError: true 404 + }); 389 405 return data; 390 406 } 391 - }); 407 + })); 392 408 393 409 export const callWithResponseAndNoContentResponseQueryKey = (options?: Options<CallWithResponseAndNoContentResponseData>) => createQueryKey('callWithResponseAndNoContentResponse', options); 394 410 395 - export const callWithResponseAndNoContentResponseQuery = defineQueryOptions({ 396 - key: callWithResponseAndNoContentResponseQueryKey(), 411 + export const callWithResponseAndNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithResponseAndNoContentResponseData>) => ({ 412 + key: callWithResponseAndNoContentResponseQueryKey(options), 397 413 query: async () => { 398 - const { data } = await callWithResponseAndNoContentResponse({ throwOnError: true }); 414 + const { data } = await callWithResponseAndNoContentResponse({ 415 + ...options, 416 + throwOnError: true 417 + }); 399 418 return data; 400 419 } 401 - }); 420 + })); 402 421 403 422 export const dummyAQueryKey = (options?: Options<DummyAData>) => createQueryKey('dummyA', options); 404 423 405 - export const dummyAQuery = defineQueryOptions({ 406 - key: dummyAQueryKey(), 424 + export const dummyAQuery = defineQueryOptions((options?: Options<DummyAData>) => ({ 425 + key: dummyAQueryKey(options), 407 426 query: async () => { 408 - const { data } = await dummyA({ throwOnError: true }); 427 + const { data } = await dummyA({ 428 + ...options, 429 + throwOnError: true 430 + }); 409 431 return data; 410 432 } 411 - }); 433 + })); 412 434 413 435 export const dummyBQueryKey = (options?: Options<DummyBData>) => createQueryKey('dummyB', options); 414 436 415 - export const dummyBQuery = defineQueryOptions({ 416 - key: dummyBQueryKey(), 437 + export const dummyBQuery = defineQueryOptions((options?: Options<DummyBData>) => ({ 438 + key: dummyBQueryKey(options), 417 439 query: async () => { 418 - const { data } = await dummyB({ throwOnError: true }); 440 + const { data } = await dummyB({ 441 + ...options, 442 + throwOnError: true 443 + }); 419 444 return data; 420 445 } 421 - }); 446 + })); 422 447 423 448 export const callWithResponseQueryKey = (options?: Options<CallWithResponseData>) => createQueryKey('callWithResponse', options); 424 449 425 - export const callWithResponseQuery = defineQueryOptions({ 426 - key: callWithResponseQueryKey(), 450 + export const callWithResponseQuery = defineQueryOptions((options?: Options<CallWithResponseData>) => ({ 451 + key: callWithResponseQueryKey(options), 427 452 query: async () => { 428 - const { data } = await callWithResponse({ throwOnError: true }); 453 + const { data } = await callWithResponse({ 454 + ...options, 455 + throwOnError: true 456 + }); 429 457 return data; 430 458 } 431 - }); 459 + })); 432 460 433 461 export const callWithDuplicateResponsesMutation = (options?: Partial<Options<CallWithDuplicateResponsesData>>): UseMutationOptions<CallWithDuplicateResponsesResponse, Options<CallWithDuplicateResponsesData>, CallWithDuplicateResponsesError> => { 434 462 return { ··· 523 551 524 552 export const multipartResponseQueryKey = (options?: Options<MultipartResponseData>) => createQueryKey('multipartResponse', options); 525 553 526 - export const multipartResponseQuery = defineQueryOptions({ 527 - key: multipartResponseQueryKey(), 554 + export const multipartResponseQuery = defineQueryOptions((options?: Options<MultipartResponseData>) => ({ 555 + key: multipartResponseQueryKey(options), 528 556 query: async () => { 529 - const { data } = await multipartResponse({ throwOnError: true }); 557 + const { data } = await multipartResponse({ 558 + ...options, 559 + throwOnError: true 560 + }); 530 561 return data; 531 562 } 532 - }); 563 + })); 533 564 534 565 export const multipartRequestMutation = (options?: Partial<Options<MultipartRequestData>>): UseMutationOptions<unknown, Options<MultipartRequestData>, Error> => { 535 566 return {